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

Unified Diff: src/core/SkGlyphCache.cpp

Issue 1310123007: Add support for light dumps in SkTraceMemoryDump interface. (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: Fix test. Created 5 years, 3 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
Index: src/core/SkGlyphCache.cpp
diff --git a/src/core/SkGlyphCache.cpp b/src/core/SkGlyphCache.cpp
index 309707c66fede82e8ee775b7d545b3984e44001f..7cc4ebb26301df12c4a5c217b2ae0bdd3b992052 100644
--- a/src/core/SkGlyphCache.cpp
+++ b/src/core/SkGlyphCache.cpp
@@ -451,6 +451,11 @@ void SkGlyphCache::DumpMemoryStatistics(SkTraceMemoryDump* dump) {
dump->dumpNumericValue(gGlyphCacheDumpName, "budget_glyph_count", "objects",
SkGraphics::GetFontCacheCountLimit());
+ if (dump->isLightDump()) {
+ dump->setMemoryBacking(gGlyphCacheDumpName, "malloc", nullptr);
+ return;
+ }
+
int counter = 0;
SkGlyphCacheDumpContext context = { &counter, dump };
SkGlyphCache::VisitAll(sk_trace_dump_visitor, &context);

Powered by Google App Engine
This is Rietveld 408576698