aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkRTree.h
diff options
context:
space:
mode:
authorGravatar mtklein <mtklein@chromium.org>2014-10-02 09:53:04 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2014-10-02 09:53:04 -0700
commit8f8c25eabb97da8eda488895f04f2d12cb5ea4cf (patch)
treeb72d7effb991556b669b9ccadba9ab33e43ff7e6 /src/core/SkRTree.h
parented48ebe39e7f06ed00b851abea1270318947c2b8 (diff)
Demote getCount, getDepth, and clear to RTree-only methods.
We use them only to test RTree. BUG=skia: Review URL: https://codereview.chromium.org/622773003
Diffstat (limited to 'src/core/SkRTree.h')
-rw-r--r--src/core/SkRTree.h20
1 files changed, 6 insertions, 14 deletions
diff --git a/src/core/SkRTree.h b/src/core/SkRTree.h
index 85469ccc4c..0d88804c30 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;