Skia
2DGraphicsLibrary
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
SkTraceMemoryDump.h
1 /*
2  * Copyright 2015 Google Inc.
3  *
4  * Use of this source code is governed by a BSD-style license that can be
5  * found in the LICENSE file.
6  */
7 
8 #ifndef SkTraceMemoryDump_DEFINED
9 #define SkTraceMemoryDump_DEFINED
10 
11 #include "SkTypes.h"
12 
13 class SkDiscardableMemory;
14 
20 class SK_API SkTraceMemoryDump {
21 public:
26  // Dump only the minimal details to get the total memory usage (Usually just the totals).
27  kLight_LevelOfDetail,
28 
29  // Dump the detailed breakdown of the objects in the caches.
30  kObjectsBreakdowns_LevelOfDetail
31  };
32 
48  virtual void dumpNumericValue(const char* dumpName,
49  const char* valueName,
50  const char* units,
51  uint64_t value) = 0;
52 
58  virtual void setMemoryBacking(const char* dumpName,
59  const char* backingType,
60  const char* backingObjectId) = 0;
61 
65  virtual void setDiscardableMemoryBacking(
66  const char* dumpName,
67  const SkDiscardableMemory& discardableMemoryObject) = 0;
68 
74  virtual LevelOfDetail getRequestedDetails() const = 0;
75 
76 protected:
77  virtual ~SkTraceMemoryDump() { }
78 };
79 
80 #endif
LevelOfDetail
Enum to specify the level of the requested details for the dump from the Skia objects.
Definition: SkTraceMemoryDump.h:25
Interface for memory tracing.
Definition: SkTraceMemoryDump.h:20