945d1e538c
Sorry for yanking you around on whether on not this is worth doing. Seems like SkRTrees are going to stick around for now for Flutter, so I think we might as well keep both implementations up to date. This ripples out a little further than in Chromium, as the math we're deleting here was the only use of the aspect ratio of the passed-in bounds, that itself the only use of those bounds themselves. So we can un-plumb all that too. I'd still like to see how much we can minimize the need for those user-provided bounds at all, especially when we're calculating them all here. Change-Id: Iea07e8e3d23a4dd31da8bcde512b24caabc96a10 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/213840 Reviewed-by: James Bankoski <jimbankoski@google.com> Commit-Queue: Mike Klein <mtklein@google.com>
32 lines
647 B
C++
32 lines
647 B
C++
/*
|
|
* Copyright 2014 Google Inc.
|
|
*
|
|
* Use of this source code is governed by a BSD-style license that can be
|
|
* found in the LICENSE file.
|
|
*/
|
|
|
|
#ifndef SkBBHFactory_DEFINED
|
|
#define SkBBHFactory_DEFINED
|
|
|
|
#include "include/core/SkTypes.h"
|
|
class SkBBoxHierarchy;
|
|
struct SkRect;
|
|
|
|
class SK_API SkBBHFactory {
|
|
public:
|
|
/**
|
|
* Allocate a new SkBBoxHierarchy. Return NULL on failure.
|
|
*/
|
|
virtual SkBBoxHierarchy* operator()() const = 0;
|
|
virtual ~SkBBHFactory() {}
|
|
};
|
|
|
|
class SK_API SkRTreeFactory : public SkBBHFactory {
|
|
public:
|
|
SkBBoxHierarchy* operator()() const override;
|
|
private:
|
|
typedef SkBBHFactory INHERITED;
|
|
};
|
|
|
|
#endif
|