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

Unified Diff: src/core/SkGraphics.cpp

Issue 1722603002: add SkGraphics::PurageAllCaches (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 10 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 | « include/core/SkGraphics.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkGraphics.cpp
diff --git a/src/core/SkGraphics.cpp b/src/core/SkGraphics.cpp
index 5290ea1d07a9065dc27329947c2a9b32b7e31beb..2b1212c0dceb708b1b3a3f684e37746113ffc6e5 100644
--- a/src/core/SkGraphics.cpp
+++ b/src/core/SkGraphics.cpp
@@ -13,6 +13,7 @@
#include "SkCanvas.h"
#include "SkGeometry.h"
#include "SkGlyphCache.h"
+#include "SkImageFilter.h"
#include "SkMath.h"
#include "SkMatrix.h"
#include "SkOpts.h"
@@ -65,6 +66,12 @@ void SkGraphics::DumpMemoryStatistics(SkTraceMemoryDump* dump) {
SkGlyphCache::DumpMemoryStatistics(dump);
}
+void SkGraphics::PurgeAllCaches() {
+ SkGraphics::PurgeFontCache();
+ SkGraphics::PurgeResourceCache();
+ SkImageFilter::PurgeCache();
+}
+
///////////////////////////////////////////////////////////////////////////////
static const char kFontCacheLimitStr[] = "font-cache-limit";
« no previous file with comments | « include/core/SkGraphics.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698