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

Unified Diff: include/core/SkTraceMemoryDump.h

Issue 1310123007: Add support for light dumps in SkTraceMemoryDump interface. (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: Nits. 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 | « no previous file | src/core/SkGlyphCache.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkTraceMemoryDump.h
diff --git a/include/core/SkTraceMemoryDump.h b/include/core/SkTraceMemoryDump.h
index d7c565f5707b1ed455b6f1d0be5471636f1a38c3..c0db01a19b2285274dd3ffe3bae5b4d90b8b3f8d 100644
--- a/include/core/SkTraceMemoryDump.h
+++ b/include/core/SkTraceMemoryDump.h
@@ -20,6 +20,16 @@ class SkDiscardableMemory;
class SK_API SkTraceMemoryDump {
public:
/**
+ * Enum of bit fields to specify the requested details for the dump from the Skia objects.
+ */
+ enum RequestedDetails {
+ kMemoryTotals = 1 << 0,
+ kMallocDetails = 1 << 1,
+ kDiscardableDetails = 1 << 2,
+ kGpuMemoryDetails = 1 << 3
+ };
+
+ /**
* Appends a new memory dump (i.e. a row) to the trace memory infrastructure.
* If dumpName does not exist yet, a new one is created. Otherwise, a new column is appended to
* the previously created dump.
@@ -55,6 +65,13 @@ public:
const char* dumpName,
const SkDiscardableMemory& discardableMemoryObject) = 0;
+ /**
+ * Returns a bit mask of RequestedDetails enum. The embedder can request only the details
+ required in the dump. It is expected that the skia objects can add extra details if one mask
+ field is related to the other.
+ */
+ virtual int getRequestedDetails() const = 0;
Primiano Tucci (use gerrit) 2015/09/11 12:16:16 I'd probably make this uint and fixed size (uint32
+
protected:
virtual ~SkTraceMemoryDump() { }
};
« no previous file with comments | « no previous file | src/core/SkGlyphCache.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698