diff options
author | mtklein <mtklein@chromium.org> | 2014-10-02 09:53:04 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-10-02 09:53:04 -0700 |
commit | 8f8c25eabb97da8eda488895f04f2d12cb5ea4cf (patch) | |
tree | b72d7effb991556b669b9ccadba9ab33e43ff7e6 /src/core/SkRTree.h | |
parent | ed48ebe39e7f06ed00b851abea1270318947c2b8 (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.h | 20 |
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; |