| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2012 Google Inc. | 3 * Copyright 2012 Google Inc. |
| 4 * | 4 * |
| 5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
| 6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
| 7 */ | 7 */ |
| 8 | 8 |
| 9 #ifndef SkBBoxHierarchy_DEFINED | 9 #ifndef SkBBoxHierarchy_DEFINED |
| 10 #define SkBBoxHierarchy_DEFINED | 10 #define SkBBoxHierarchy_DEFINED |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 virtual void flushDeferredInserts() = 0; | 57 virtual void flushDeferredInserts() = 0; |
| 58 | 58 |
| 59 /** | 59 /** |
| 60 * Populate 'results' with data pointers corresponding to bounding boxes tha
t intersect 'query' | 60 * Populate 'results' with data pointers corresponding to bounding boxes tha
t intersect 'query' |
| 61 */ | 61 */ |
| 62 virtual void search(const SkIRect& query, SkTDArray<void*>* results) = 0; | 62 virtual void search(const SkIRect& query, SkTDArray<void*>* results) = 0; |
| 63 | 63 |
| 64 virtual void clear() = 0; | 64 virtual void clear() = 0; |
| 65 | 65 |
| 66 /** | 66 /** |
| 67 * Gets the number of insertions | 67 * Gets the number of insertions actually made (does not include deferred in
sertions) |
| 68 */ | 68 */ |
| 69 virtual int getCount() const = 0; | 69 virtual int getCount() const = 0; |
| 70 | 70 |
| 71 /** | 71 /** |
| 72 * Returns the depth of the currently allocated tree. The root node counts f
or 1 level, |
| 73 * so it should be 1 or more if there's a root node. This information provid
es details |
| 74 * about the underlying structure, which is useful mainly for testing purpos
es. |
| 75 * |
| 76 * Returns 0 if there are currently no nodes in the tree. |
| 77 * Returns -1 if the structure isn't a tree. |
| 78 */ |
| 79 virtual int getDepth() const = 0; |
| 80 |
| 81 /** |
| 72 * Rewinds all the most recently inserted data elements until an element | 82 * Rewinds all the most recently inserted data elements until an element |
| 73 * is encountered for which client->shouldRewind(data) returns false. May | 83 * is encountered for which client->shouldRewind(data) returns false. May |
| 74 * not rewind elements that were inserted prior to the last call to | 84 * not rewind elements that were inserted prior to the last call to |
| 75 * flushDeferredInserts. | 85 * flushDeferredInserts. |
| 76 */ | 86 */ |
| 77 virtual void rewindInserts() = 0; | 87 virtual void rewindInserts() = 0; |
| 78 | 88 |
| 79 void setClient(SkBBoxHierarchyClient* client) { fClient = client; } | 89 void setClient(SkBBoxHierarchyClient* client) { fClient = client; } |
| 80 | 90 |
| 81 protected: | 91 protected: |
| 82 SkBBoxHierarchyClient* fClient; | 92 SkBBoxHierarchyClient* fClient; |
| 83 | 93 |
| 84 private: | 94 private: |
| 85 typedef SkRefCnt INHERITED; | 95 typedef SkRefCnt INHERITED; |
| 86 }; | 96 }; |
| 87 | 97 |
| 88 #endif | 98 #endif |
| OLD | NEW |