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

Side by Side Diff: skia/ext/SkDiscardableMemory_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: Mac build fix. 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/BUILD.gn ('k') | skia/ext/SkDiscardableMemory_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
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef SKIA_EXT_SK_DISCARDABLE_MEMORY_CHROME_H_ 5 #ifndef SKIA_EXT_SK_DISCARDABLE_MEMORY_CHROME_H_
6 #define SKIA_EXT_SK_DISCARDABLE_MEMORY_CHROME_H_ 6 #define SKIA_EXT_SK_DISCARDABLE_MEMORY_CHROME_H_
7 7
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "third_party/skia/src/core/SkDiscardableMemory.h" 9 #include "third_party/skia/src/core/SkDiscardableMemory.h"
10 10
11 namespace base { 11 namespace base {
12 class DiscardableMemory; 12 class DiscardableMemory;
13
14 namespace trace_event {
15 class MemoryAllocatorDump;
16 class ProcessMemoryDump;
13 } 17 }
14 18
19 } // namespace base
20
15 // This class implements the SkDiscardableMemory interface using 21 // This class implements the SkDiscardableMemory interface using
16 // base::DiscardableMemory. 22 // base::DiscardableMemory.
17 class SK_API SkDiscardableMemoryChrome : public SkDiscardableMemory { 23 class SK_API SkDiscardableMemoryChrome : public SkDiscardableMemory {
18 public: 24 public:
19 ~SkDiscardableMemoryChrome() override; 25 ~SkDiscardableMemoryChrome() override;
20 26
21 // SkDiscardableMemory: 27 // SkDiscardableMemory:
22 bool lock() override; 28 bool lock() override;
23 void* data() override; 29 void* data() override;
24 void unlock() override; 30 void unlock() override;
25 31
32 base::trace_event::MemoryAllocatorDump* CreateMemoryAllocatorDump(
33 const char* name,
34 base::trace_event::ProcessMemoryDump* pmd) const;
35
26 private: 36 private:
27 friend class SkDiscardableMemory; 37 friend class SkDiscardableMemory;
28 38
29 SkDiscardableMemoryChrome(scoped_ptr<base::DiscardableMemory> memory); 39 SkDiscardableMemoryChrome(scoped_ptr<base::DiscardableMemory> memory);
30 40
31 scoped_ptr<base::DiscardableMemory> discardable_; 41 scoped_ptr<base::DiscardableMemory> discardable_;
32 }; 42 };
33 43
34 #endif // SKIA_EXT_SK_DISCARDABLE_MEMORY_CHROME_H_ 44 #endif // SKIA_EXT_SK_DISCARDABLE_MEMORY_CHROME_H_
OLDNEW
« no previous file with comments | « skia/BUILD.gn ('k') | skia/ext/SkDiscardableMemory_chrome.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698