diff options
Diffstat (limited to 'src/core/SkTObjectPool.h')
-rw-r--r-- | src/core/SkTObjectPool.h | 5 |
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. |