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

Unified Diff: include/core/SkGraphics.h

Issue 394003003: Set maximum output size for scaled-image-cache images (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rename, SkGraphics.h Created 6 years, 5 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 | « gyp/tests.gypi ('k') | src/core/SkBitmapProcState.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkGraphics.h
diff --git a/include/core/SkGraphics.h b/include/core/SkGraphics.h
index 2667a388d2bbb66a7081fe18bb053328fbdc9266..6d04280c7f2935384cc1cf22a5e3f57ed46ce537 100644
--- a/include/core/SkGraphics.h
+++ b/include/core/SkGraphics.h
@@ -84,6 +84,19 @@ public:
static size_t SetImageCacheByteLimit(size_t newLimit);
/**
+ * Scaling bitmaps with the SkPaint::kHigh_FilterLevel setting is
+ * expensive, so the result is saved in the global Scaled Image
+ * Cache. When the resulting bitmap is too large, this can
+ * overload the cache. If the ImageCacheSingleAllocationByteLimit
+ * is set to a non-zero number, and the resulting bitmap would be
+ * larger than that value, the bitmap scaling algorithm falls
+ * back onto a cheaper algorithm and does not cache the result.
+ * Zero is the default value.
+ */
+ static size_t GetImageCacheSingleAllocationByteLimit();
+ static size_t SetImageCacheSingleAllocationByteLimit(size_t newLimit);
reveman 2014/07/16 20:38:04 I know this only affects pre-scaling of images and
+
+ /**
* Applications with command line options may pass optional state, such
* as cache sizes, here, for instance:
* font-cache-limit=12345678
« no previous file with comments | « gyp/tests.gypi ('k') | src/core/SkBitmapProcState.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698