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

Unified Diff: include/core/SkChunkAlloc.h

Issue 17449012: combine glyph and image bulk alloc, and adjust initial alloc size, to reduce total waste from 50% t… (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 6 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 | « no previous file | src/core/SkChunkAlloc.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkChunkAlloc.h
diff --git a/include/core/SkChunkAlloc.h b/include/core/SkChunkAlloc.h
index 1b52a35c16c0000c8611c8828c60097a217ad266..e13e2b99c640368ebfbdc5f3e16f6e47f3620807 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);
« no previous file with comments | « no previous file | src/core/SkChunkAlloc.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698