OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2013 Google Inc. | 2 * Copyright 2013 Google Inc. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 #include "SkChecksum.h" | 8 #include "SkChecksum.h" |
9 #include "SkScaledImageCache.h" | 9 #include "SkScaledImageCache.h" |
10 #include "SkMipMap.h" | 10 #include "SkMipMap.h" |
11 #include "SkPixelRef.h" | 11 #include "SkPixelRef.h" |
12 #include "SkRect.h" | |
13 | 12 |
14 // This can be defined by the caller's build system | 13 // This can be defined by the caller's build system |
15 //#define SK_USE_DISCARDABLE_SCALEDIMAGECACHE | 14 //#define SK_USE_DISCARDABLE_SCALEDIMAGECACHE |
16 | 15 |
17 #ifndef SK_DISCARDABLEMEMORY_SCALEDIMAGECACHE_COUNT_LIMIT | 16 #ifndef SK_DISCARDABLEMEMORY_SCALEDIMAGECACHE_COUNT_LIMIT |
18 # define SK_DISCARDABLEMEMORY_SCALEDIMAGECACHE_COUNT_LIMIT 1024 | 17 # define SK_DISCARDABLEMEMORY_SCALEDIMAGECACHE_COUNT_LIMIT 1024 |
19 #endif | 18 #endif |
20 | 19 |
21 #ifndef SK_DEFAULT_IMAGE_CACHE_LIMIT | 20 #ifndef SK_DEFAULT_IMAGE_CACHE_LIMIT |
22 #define SK_DEFAULT_IMAGE_CACHE_LIMIT (2 * 1024 * 1024) | 21 #define SK_DEFAULT_IMAGE_CACHE_LIMIT (2 * 1024 * 1024) |
(...skipping 632 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
655 } | 654 } |
656 | 655 |
657 size_t SkGraphics::GetImageCacheSingleAllocationByteLimit() { | 656 size_t SkGraphics::GetImageCacheSingleAllocationByteLimit() { |
658 return SkScaledImageCache::GetSingleAllocationByteLimit(); | 657 return SkScaledImageCache::GetSingleAllocationByteLimit(); |
659 } | 658 } |
660 | 659 |
661 size_t SkGraphics::SetImageCacheSingleAllocationByteLimit(size_t newLimit) { | 660 size_t SkGraphics::SetImageCacheSingleAllocationByteLimit(size_t newLimit) { |
662 return SkScaledImageCache::SetSingleAllocationByteLimit(newLimit); | 661 return SkScaledImageCache::SetSingleAllocationByteLimit(newLimit); |
663 } | 662 } |
664 | 663 |
OLD | NEW |