BUG=skia:4755
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=
1722603002
TBR=
Review URL: https://codereview.chromium.org/
1722603002
static void DumpMemoryStatistics(SkTraceMemoryDump* dump);
/**
+ * Free as much globally cached memory as possible. This will purge all private caches in Skia,
+ * including font and image caches.
+ *
+ * If there are caches associated with GPU context, those will not be affected by this call.
+ */
+ static void PurgeAllCaches();
+
+ /**
* Applications with command line options may pass optional state, such
* as cache sizes, here, for instance:
* font-cache-limit=12345678
#include "SkCanvas.h"
#include "SkGeometry.h"
#include "SkGlyphCache.h"
+#include "SkImageFilter.h"
#include "SkMath.h"
#include "SkMatrix.h"
#include "SkOpts.h"
SkGlyphCache::DumpMemoryStatistics(dump);
}
+void SkGraphics::PurgeAllCaches() {
+ SkGraphics::PurgeFontCache();
+ SkGraphics::PurgeResourceCache();
+ SkImageFilter::PurgeCache();
+}
+
///////////////////////////////////////////////////////////////////////////////
static const char kFontCacheLimitStr[] = "font-cache-limit";