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

Side by Side Diff: skia/ext/SkTraceMemoryDump_chrome.h

Issue 1319473003: [tracing] Add SkResourceCache statistics to chrome://tracing (chrome side) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@discardable_objdumps
Patch Set: Comments. 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 unified diff | Download patch
« no previous file with comments | « skia/ext/SkDiscardableMemory_chrome.cc ('k') | skia/ext/SkTraceMemoryDump_chrome.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef SKIA_EXT_SK_TRACE_MEMORY_DUMP_CHROME_H_
6 #define SKIA_EXT_SK_TRACE_MEMORY_DUMP_CHROME_H_
7
8 #include "base/macros.h"
9 #include "third_party/skia/include/core/SkTraceMemoryDump.h"
10
11 namespace base {
12 namespace trace_event {
13 class MemoryAllocatorDump;
14 class ProcessMemoryDump;
15 }
16 }
17
18 namespace skia {
19
20 class SkTraceMemoryDump_Chrome : public SkTraceMemoryDump {
21 public:
22 // This should never outlive the OnMemoryDump call since the
23 // ProcessMemoryDump is valid only in that timefrace.
24 SkTraceMemoryDump_Chrome(
25 base::trace_event::ProcessMemoryDump* process_memory_dump);
26 ~SkTraceMemoryDump_Chrome() override;
27
28 // SkTraceMemoryDump implementation:
29 void dumpNumericValue(const char* dumpName,
30 const char* valueName,
31 const char* units,
32 uint64_t value) override;
33 void setMemoryBacking(const char* dumpName,
34 const char* backingType,
35 const char* backingObjectId) override;
36 void setDiscardableMemoryBacking(
37 const char* dumpName,
38 const SkDiscardableMemory& discardableMemoryObject) override;
39
40 private:
41 base::trace_event::ProcessMemoryDump* process_memory_dump_;
ericrk 2015/08/26 18:12:06 As I think subclassing will lead to the most sane
42
43 // Helper to create allocator dumps.
44 base::trace_event::MemoryAllocatorDump* GetOrCreateAllocatorDump(
45 const char* dumpName);
46
47 DISALLOW_COPY_AND_ASSIGN(SkTraceMemoryDump_Chrome);
48 };
49
50 } // namespace skia
51
52 #endif // SKIA_EXT_SK_TRACE_MEMORY_DUMP_CHROME_H_
OLDNEW
« no previous file with comments | « skia/ext/SkDiscardableMemory_chrome.cc ('k') | skia/ext/SkTraceMemoryDump_chrome.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698