From 04a44d0fd45f5596c716e99e7a3bbcc03db0e05a Mon Sep 17 00:00:00 2001 From: brianosman Date: Wed, 21 Sep 2016 09:46:57 -0700 Subject: Add a transient image filter cache to SkImage::makeWithFilter & PDF Added a bench for makeWithFilter (~23 ms -> ~6 ms median locally). Also fixed indentation. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2360663002 Review-Url: https://codereview.chromium.org/2360663002 --- src/gpu/SkGpuDevice.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/gpu') diff --git a/src/gpu/SkGpuDevice.cpp b/src/gpu/SkGpuDevice.cpp index 9ee71bc708..79b358cc0c 100644 --- a/src/gpu/SkGpuDevice.cpp +++ b/src/gpu/SkGpuDevice.cpp @@ -53,8 +53,6 @@ #define ASSERT_SINGLE_OWNER \ SkDEBUGCODE(GrSingleOwner::AutoEnforce debug_SingleOwner(fContext->debugSingleOwner());) -enum { kDefaultImageFilterCacheSize = 32 * 1024 * 1024 }; - #if 0 extern bool (*gShouldDrawProc)(); #define CHECK_SHOULD_DRAW(draw) \ @@ -1818,7 +1816,7 @@ SkImageFilterCache* SkGpuDevice::getImageFilterCache() { ASSERT_SINGLE_OWNER // We always return a transient cache, so it is freed after each // filter traversal. - return SkImageFilterCache::Create(kDefaultImageFilterCacheSize); + return SkImageFilterCache::Create(SkImageFilterCache::kDefaultTransientSize); } #endif -- cgit v1.2.3