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

Unified Diff: src/core/SkRTree.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/core/SkBBoxHierarchy.h ('k') | src/core/SkTileGrid.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkRTree.h
diff --git a/src/core/SkRTree.h b/src/core/SkRTree.h
index 85469ccc4ce346a0c0b7934ba7e61bf6d096a69e..0d88804c3071a9d5f5fe3c61c71bbdf0f4768325 100644
--- a/src/core/SkRTree.h
+++ b/src/core/SkRTree.h
@@ -79,22 +79,14 @@ public:
*/
virtual void search(const SkRect& query, SkTDArray<unsigned>* results) const SK_OVERRIDE;
- virtual void clear() SK_OVERRIDE;
- bool isEmpty() const { return 0 == fCount; }
-
- /**
- * Gets the depth of the tree structure
- */
- virtual int getDepth() const SK_OVERRIDE {
- return this->isEmpty() ? 0 : fRoot.fChild.subtree->fLevel + 1;
- }
-
- /**
- * This gets the insertion count (rather than the node count)
- */
- virtual int getCount() const SK_OVERRIDE { return fCount; }
+ void clear();
+ // Return the depth of the tree structure.
+ int getDepth() const { return this->isEmpty() ? 0 : fRoot.fChild.subtree->fLevel + 1; }
+ // Insertion count (not overall node count, which may be greater).
+ int getCount() const { return fCount; }
private:
+ bool isEmpty() const { return 0 == this->getCount(); }
struct Node;
« no previous file with comments | « src/core/SkBBoxHierarchy.h ('k') | src/core/SkTileGrid.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698