Chromium Code Reviews| Index: src/core/SkBruteBBH.h |
| diff --git a/src/core/SkBruteBBH.h b/src/core/SkBruteBBH.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..6df0b747a8aec1dff280b6f9bf6934019a6b4f53 |
| --- /dev/null |
| +++ b/src/core/SkBruteBBH.h |
| @@ -0,0 +1,27 @@ |
| +#ifndef SkBruteBBH_DEFINED |
|
robertphillips
2014/10/29 20:48:11
header!
|
| +#define SkBruteBBH_DEFINED |
| + |
| +// A bounding box hierarchy that brute-force intersects its query with all known bounds. |
| + |
| +#include "SkBBoxHierarchy.h" |
| + |
| +class SkBruteBBH : public SkBBoxHierarchy { |
| +public: |
| + SkBruteBBH(); |
| + virtual ~SkBruteBBH(); |
| + virtual void insert(SkAutoTMalloc<SkRect>*, int) SK_OVERRIDE; |
| + virtual void search(const SkRect&, SkTDArray<unsigned>*) const SK_OVERRIDE; |
| +private: |
| + SkRect* fBBs; |
| + int fNumBBs; |
| +}; |
| + |
| +// While experimental we leave its factory Skia-internal. Might as well live right here. |
| + |
| +#include "SkBBHFactory.h" |
| + |
| +class SK_API SkBruteFactory : public SkBBHFactory { |
| + virtual SkBBoxHierarchy* operator()(int, int) const SK_OVERRIDE { return SkNEW(SkBruteBBH); } |
| +}; |
| + |
| +#endif//SkBruteBBH_DEFINED |