Chromium Code Reviews| 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 |