| 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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 |
| 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. |
| 73 * (The root node counts for 1 level, so it should be 1 or more if there's a
root node) |
| 74 * Returns 0 if there are currently no nodes in the tree. |
| 75 * Returns -1 if the structure isn't a tree. |
| 76 */ |
| 77 virtual int getDepth() const = 0; |
| 78 |
| 79 /** |
| 72 * Rewinds all the most recently inserted data elements until an element | 80 * Rewinds all the most recently inserted data elements until an element |
| 73 * is encountered for which client->shouldRewind(data) returns false. May | 81 * is encountered for which client->shouldRewind(data) returns false. May |
| 74 * not rewind elements that were inserted prior to the last call to | 82 * not rewind elements that were inserted prior to the last call to |
| 75 * flushDeferredInserts. | 83 * flushDeferredInserts. |
| 76 */ | 84 */ |
| 77 virtual void rewindInserts() = 0; | 85 virtual void rewindInserts() = 0; |
| 78 | 86 |
| 79 void setClient(SkBBoxHierarchyClient* client) { fClient = client; } | 87 void setClient(SkBBoxHierarchyClient* client) { fClient = client; } |
| 80 | 88 |
| 81 protected: | 89 protected: |
| 82 SkBBoxHierarchyClient* fClient; | 90 SkBBoxHierarchyClient* fClient; |
| 83 | 91 |
| 84 private: | 92 private: |
| 85 typedef SkRefCnt INHERITED; | 93 typedef SkRefCnt INHERITED; |
| 86 }; | 94 }; |
| 87 | 95 |
| 88 #endif | 96 #endif |
| OLD | NEW |