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

Unified Diff: src/core/SkResourceCache.cpp

Issue 1346993006: Strip font name of special characters before dumping (Closed) Base URL: https://chromium.googlesource.com/skia.git@resource
Patch Set: Nit. 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
« no previous file with comments | « src/core/SkGlyphCache.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkResourceCache.cpp
diff --git a/src/core/SkResourceCache.cpp b/src/core/SkResourceCache.cpp
index a1234e1fef455ea37997b1b96aade5acd75718d4..240d1977e53968d417de449d84ff42c8e34f405e 100644
--- a/src/core/SkResourceCache.cpp
+++ b/src/core/SkResourceCache.cpp
@@ -679,6 +679,10 @@ static void sk_trace_dump_visitor(const SkResourceCache::Rec& rec, void* context
SkDiscardableMemory* discardable = rec.diagnostic_only_getDiscardable();
if (discardable) {
dump->setDiscardableMemoryBacking(dumpName.c_str(), *discardable);
+
+ // The discardable memory size will be calculated by dumper, but we also dump what we think
+ // the size of object in memory is irrespective of whether object is live or dead.
+ dump->dumpNumericValue(dumpName.c_str(), "discardable_size", "bytes", rec.bytesUsed());
} else {
dump->dumpNumericValue(dumpName.c_str(), "size", "bytes", rec.bytesUsed());
dump->setMemoryBacking(dumpName.c_str(), "malloc", nullptr);
« no previous file with comments | « src/core/SkGlyphCache.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698