Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(384)

Side by Side Diff: src/core/SkBBoxHierarchy.h

Issue 622773003: Demote getCount, getDepth, and clear to RTree-only methods. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: dox Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « bench/RTreeBench.cpp ('k') | src/core/SkRTree.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « bench/RTreeBench.cpp ('k') | src/core/SkRTree.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698