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

Unified Diff: src/core/SkBBoxHierarchy.h

Issue 131343011: Initial QuadTree implementation (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fixed SkScalar conversion issue Created 6 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « samplecode/SamplePictFile.cpp ('k') | src/core/SkQuadTree.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkBBoxHierarchy.h
diff --git a/src/core/SkBBoxHierarchy.h b/src/core/SkBBoxHierarchy.h
index 62b22d80e61f5ca8f64946aab6faf39e4d2e3494..36047b9706ca88fa76cfb3d20cac41fde7e2f8a6 100644
--- a/src/core/SkBBoxHierarchy.h
+++ b/src/core/SkBBoxHierarchy.h
@@ -64,11 +64,21 @@ public:
virtual void clear() = 0;
/**
- * Gets the number of insertions
+ * Gets the number of insertions actually made (does not include deferred insertions)
*/
virtual int getCount() const = 0;
/**
+ * Returns the depth of the currently allocated tree. The root node counts for 1 level,
+ * so it should be 1 or more if there's a root node. This information provides details
+ * about the underlying structure, which is useful mainly for testing purposes.
+ *
+ * Returns 0 if there are currently no nodes in the tree.
+ * Returns -1 if the structure isn't a tree.
+ */
+ virtual int getDepth() 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
« no previous file with comments | « samplecode/SamplePictFile.cpp ('k') | src/core/SkQuadTree.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698