aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/core
diff options
context:
space:
mode:
authorGravatar reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-06-19 19:25:36 +0000
committerGravatar reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-06-19 19:25:36 +0000
commit6757a3c71fd6c16af6bbd76f268307f0177b17ae (patch)
tree0031572fda6b00a7ab8b91ad3c0079cede2103bd /include/core
parent3832da1e9cf6066d22007881888d65405d8cc6a5 (diff)
combine glyph and image bulk alloc, and adjust initial alloc size, to reduce total waste from 50% to 30%
add diagnostics to measure cache efficiency BUG= Review URL: https://codereview.chromium.org/17449012 git-svn-id: http://skia.googlecode.com/svn/trunk@9691 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'include/core')
-rw-r--r--include/core/SkChunkAlloc.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/core/SkChunkAlloc.h b/include/core/SkChunkAlloc.h
index 1b52a35c16..e13e2b99c6 100644
--- a/include/core/SkChunkAlloc.h
+++ b/include/core/SkChunkAlloc.h
@@ -42,6 +42,7 @@ public:
size_t unalloc(void* ptr);
size_t totalCapacity() const { return fTotalCapacity; }
+ size_t totalUsed() const { return fTotalUsed; }
int blockCount() const { return fBlockCount; }
/**
@@ -58,6 +59,7 @@ private:
size_t fMinSize;
size_t fChunkSize;
size_t fTotalCapacity;
+ size_t fTotalUsed; // will be <= fTotalCapacity
int fBlockCount;
Block* newBlock(size_t bytes, AllocFailType ftype);