Index: src/core/SkScaledImageCache.cpp |
diff --git a/src/core/SkScaledImageCache.cpp b/src/core/SkScaledImageCache.cpp |
index 6d63edb468fa47c20fa91ef5f8b77e192ab0f0df..6fcec7a600acf573d214e835345dde3a4a027345 100644 |
--- a/src/core/SkScaledImageCache.cpp |
+++ b/src/core/SkScaledImageCache.cpp |
@@ -142,6 +142,7 @@ void SkScaledImageCache::init() { |
#endif |
fBytesUsed = 0; |
fCount = 0; |
+ fMaximumOutputSizeForHighQualityFilter = 0; |
fAllocator = NULL; |
// One of these should be explicit set by the caller after we return. |
@@ -638,6 +639,14 @@ void SkScaledImageCache::dump() const { |
fDiscardableFactory ? "discardable" : "malloc"); |
} |
+void SkScaledImageCache::setMaximumOutputSizeForHighQualityFilter(size_t size) { |
+ fMaximumOutputSizeForHighQualityFilter = size; |
+} |
+ |
+size_t SkScaledImageCache::getMaximumOutputSizeForHighQualityFilter() const { |
+ return fMaximumOutputSizeForHighQualityFilter; |
+} |
+ |
/////////////////////////////////////////////////////////////////////////////// |
#include "SkThread.h" |
@@ -749,6 +758,16 @@ void SkScaledImageCache::Dump() { |
get_cache()->dump(); |
} |
+void SkScaledImageCache::SetMaximumOutputSizeForHighQualityFilter(size_t size) { |
+ SkAutoMutexAcquire am(gMutex); |
+ get_cache()->setMaximumOutputSizeForHighQualityFilter(size); |
+} |
+ |
+size_t SkScaledImageCache::GetMaximumOutputSizeForHighQualityFilter() { |
+ SkAutoMutexAcquire am(gMutex); |
+ return get_cache()->getMaximumOutputSizeForHighQualityFilter(); |
+} |
+ |
/////////////////////////////////////////////////////////////////////////////// |
#include "SkGraphics.h" |