Chromium Code Reviews| Index: src/core/SkBBoxHierarchy.h |
| =================================================================== |
| --- src/core/SkBBoxHierarchy.h (revision 8135) |
| +++ src/core/SkBBoxHierarchy.h (working copy) |
| @@ -13,6 +13,13 @@ |
| #include "SkTDArray.h" |
| #include "SkRefCnt.h" |
|
robertphillips
2013/03/14 18:55:44
comment
Justin Novosad
2013/03/14 20:04:14
Done.
|
| +class SkBBoxHierarchyClient { |
| +public: |
| + virtual ~SkBBoxHierarchyClient() {} |
| + |
|
robertphillips
2013/03/14 18:55:44
Could this be something more than a void*?
Justin Novosad
2013/03/14 20:04:14
void* is used to reference SkPictureStateTree::Dra
|
| + virtual bool shouldRewind(void* data) = 0; |
| +}; |
| + |
| /** |
| * Interface for a spatial data structure that associates user data pointers with axis-aligned |
| * bounding boxes, and allows efficient retrieval of intersections with query rectangles. |
| @@ -21,6 +28,8 @@ |
| public: |
| SK_DECLARE_INST_COUNT(SkBBoxHierarchy) |
| + SkBBoxHierarchy() : fClient(NULL) {} |
| + |
| /** |
| * Insert a data pointer and corresponding bounding box |
| * @param data The data pointer, may be NULL |
| @@ -49,6 +58,19 @@ |
| */ |
| virtual int getCount() const = 0; |
| + /** |
| + * Rewinds all the most recently inserted data elements until an element |
| + * is encountered for which client->shouldRewind(data) returns false. May |
| + * not rewind elements that were inserted prior to the last call to |
| + * flushDeferredInserts. |
| + */ |
| + virtual void rewindInserts() = 0; |
| + |
|
robertphillips
2013/03/14 18:55:44
"{ fClient = client; }" - spaces
Justin Novosad
2013/03/14 20:04:14
Done.
|
| + void setClient(SkBBoxHierarchyClient* client) {fClient = client;} |
| + |
| +protected: |
| + SkBBoxHierarchyClient* fClient; |
| + |
| private: |
| typedef SkRefCnt INHERITED; |
| }; |