diff options
author | 2017-07-11 09:31:22 -0400 | |
---|---|---|
committer | 2017-07-11 13:56:21 +0000 | |
commit | 012893b4aad813254881fd77f31399cf3d9c965d (patch) | |
tree | 9d52017e8bc11f73e86be9e8c831961a491b2988 /src | |
parent | ceb4d48ef4839aab9d99d0200dcfe403ccd0cdf3 (diff) |
Don't pre-allocate GrTextBlobCache space
Let the pool handle the initial allocation on first use.
Change-Id: I77e0a84f19ccefa0c3bf298483929345787c0d7e
Reviewed-on: https://skia-review.googlesource.com/22078
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Eric Karl <ericrk@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
Diffstat (limited to 'src')
-rw-r--r-- | src/gpu/text/GrTextBlobCache.h | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/gpu/text/GrTextBlobCache.h b/src/gpu/text/GrTextBlobCache.h index 87a3751bf8..b294534775 100644 --- a/src/gpu/text/GrTextBlobCache.h +++ b/src/gpu/text/GrTextBlobCache.h @@ -24,7 +24,7 @@ public: typedef void (*PFOverBudgetCB)(void* data); GrTextBlobCache(PFOverBudgetCB cb, void* data) - : fPool(kPreAllocSize, kMinGrowthSize) + : fPool(0u, kMinGrowthSize) , fCallback(cb) , fData(data) , fBudget(kDefaultBudget) { @@ -216,10 +216,7 @@ private: } } - // Budget was chosen to be ~4 megabytes. The min alloc and pre alloc sizes in the pool are - // based off of the largest cached textblob I have seen in the skps(a couple of kilobytes). - static const int kPreAllocSize = 1 << 17; - static const int kMinGrowthSize = 1 << 17; + static const int kMinGrowthSize = 1 << 16; static const int kDefaultBudget = 1 << 22; GrMemoryPool fPool; BitmapBlobList fBlobList; |