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 26 matching lines...) Expand all Loading... |
37 /** | 37 /** |
38 * If any insertions have been deferred, this forces them to be inserted | 38 * If any insertions have been deferred, this forces them to be inserted |
39 */ | 39 */ |
40 virtual void flushDeferredInserts() = 0; | 40 virtual void flushDeferredInserts() = 0; |
41 | 41 |
42 /** | 42 /** |
43 * Populate results with sorted opIndex corresponding to bounding boxes that
intersect query. | 43 * Populate results with sorted opIndex corresponding to bounding boxes that
intersect query. |
44 */ | 44 */ |
45 virtual void search(const SkRect& query, SkTDArray<unsigned>* results) const
= 0; | 45 virtual void search(const SkRect& query, SkTDArray<unsigned>* results) const
= 0; |
46 | 46 |
47 virtual void clear() = 0; | |
48 | |
49 /** | |
50 * Gets the number of insertions actually made (does not include deferred in
sertions) | |
51 */ | |
52 virtual int getCount() const = 0; | |
53 | |
54 /** | |
55 * Returns the depth of the currently allocated tree. The root node counts f
or 1 level, | |
56 * so it should be 1 or more if there's a root node. This information provid
es details | |
57 * about the underlying structure, which is useful mainly for testing purpos
es. | |
58 * | |
59 * Returns 0 if there are currently no nodes in the tree. | |
60 * Returns -1 if the structure isn't a tree. | |
61 */ | |
62 virtual int getDepth() const = 0; | |
63 | |
64 private: | 47 private: |
65 typedef SkRefCnt INHERITED; | 48 typedef SkRefCnt INHERITED; |
66 }; | 49 }; |
67 | 50 |
68 #endif | 51 #endif |
OLD | NEW |