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

Unified Diff: src/core/SkTObjectPool.h

Issue 196383026: Slightly faster quadtree searching (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Use U8CPU for intersection bitmask Created 6 years, 9 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/SkQuadTree.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkTObjectPool.h
diff --git a/src/core/SkTObjectPool.h b/src/core/SkTObjectPool.h
index 01e8e8e53b24495fb0acfb493c531df0028e05d4..f2a471f634aa4c21f85e0bff168fe40e72a51b3b 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.
« no previous file with comments | « src/core/SkQuadTree.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698