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

Unified Diff: tests/TraceMemoryDumpTest.cpp

Issue 1310123007: Add support for light dumps in SkTraceMemoryDump interface. (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: Fixing typo. 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/SkResourceCache.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/TraceMemoryDumpTest.cpp
diff --git a/tests/TraceMemoryDumpTest.cpp b/tests/TraceMemoryDumpTest.cpp
index cda007631838bc8a267023ef72138dc7d67108d8..a8cdbfeb5542a06a0f1941d2b234cf0882d0b04c 100644
--- a/tests/TraceMemoryDumpTest.cpp
+++ b/tests/TraceMemoryDumpTest.cpp
@@ -24,9 +24,15 @@ public:
void setDiscardableMemoryBacking(
const char* dumpName,
const SkDiscardableMemory& discardableMemoryObject) override { }
+ LevelOfDetail getRequestedDetails() const override {
+ return SkTraceMemoryDump::kObjectsBreakdowns_LevelOfDetail;
+ }
};
DEF_TEST(SkTraceMemoryDump, reporter) {
TestSkTraceMemoryDump x;
x.dumpNumericValue("foobar", "size", "bytes", 42);
+ if (x.getRequestedDetails() == SkTraceMemoryDump::kObjectsBreakdowns_LevelOfDetail) {
+ x.dumpNumericValue("foobar/object1", "size", "bytes", 23);
+ }
}
« no previous file with comments | « src/core/SkResourceCache.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698