aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkTObjectPool.h
diff options
context:
space:
mode:
authorGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-03-18 09:07:27 +0000
committerGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-03-18 09:07:27 +0000
commita1dfa0cf05b06674175916e0226ba57be7eeadf4 (patch)
treea82ece8676396d868a97877df6408c971189ba6f /src/core/SkTObjectPool.h
parent341241d567db6b31dc905e47afc905275798a9d4 (diff)
Slightly faster quadtree searching
BUG=skia:2125 R=tomhudson@google.com, mtklein@google.com, robertphillips@google.com, reed@google.com Author: iancottrell@google.com Review URL: https://codereview.chromium.org/196383026 git-svn-id: http://skia.googlecode.com/svn/trunk@13847 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/core/SkTObjectPool.h')
-rw-r--r--src/core/SkTObjectPool.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/core/SkTObjectPool.h b/src/core/SkTObjectPool.h
index 01e8e8e53b..f2a471f634 100644
--- a/src/core/SkTObjectPool.h
+++ b/src/core/SkTObjectPool.h
@@ -74,6 +74,11 @@ public:
*/
int blocks() const { return fBlocks.getCount(); }
+ /**
+ * Returns the number of items allocated by the pool in total.
+ */
+ int allocated() const { return fBlocks.getCount() * numItemsPerBlock; }
+
private:
/**
* The type for a new block of entries for the list.