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

Unified Diff: skia/ext/skia_memory_dump_provider.h

Issue 1253403002: [tracing] Adding Skia memory dump provider with cache totals (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Nits. Created 5 years, 5 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 | « skia/BUILD.gn ('k') | skia/ext/skia_memory_dump_provider.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: skia/ext/skia_memory_dump_provider.h
diff --git a/skia/ext/skia_memory_dump_provider.h b/skia/ext/skia_memory_dump_provider.h
new file mode 100644
index 0000000000000000000000000000000000000000..2ce997e819b0aa004dda8c5c9c52b34dc2db0fb9
--- /dev/null
+++ b/skia/ext/skia_memory_dump_provider.h
@@ -0,0 +1,34 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef SKIA_EXT_SKIA_MEMORY_DUMP_PROVIDER_H_
+#define SKIA_EXT_SKIA_MEMORY_DUMP_PROVIDER_H_
+
+#include "SkPreConfig.h"
reed1 2015/07/27 19:11:47 Hmmm, why do you need this? In general, we think P
ssid 2015/07/27 19:17:21 This is needed for the SK_API define. Is that not
reed1 2015/07/27 20:13:48 #include "SkTypes.h" is our "base" header. You sho
+#include "base/memory/singleton.h"
+#include "base/trace_event/memory_dump_provider.h"
+
+namespace skia {
+
+class SK_API SkiaMemoryDumpProvider
+ : public base::trace_event::MemoryDumpProvider {
+ public:
+ static SkiaMemoryDumpProvider* GetInstance();
+
+ // base::trace_event::MemoryDumpProvider implementation:
+ bool OnMemoryDump(
+ base::trace_event::ProcessMemoryDump* process_memory_dump) override;
+
+ private:
+ friend struct DefaultSingletonTraits<SkiaMemoryDumpProvider>;
+
+ SkiaMemoryDumpProvider();
+ ~SkiaMemoryDumpProvider() override;
+
+ DISALLOW_COPY_AND_ASSIGN(SkiaMemoryDumpProvider);
+};
+
+} // namespace skia
+
+#endif // SKIA_EXT_SKIA_MEMORY_DUMP_PROVIDER_H_
« no previous file with comments | « skia/BUILD.gn ('k') | skia/ext/skia_memory_dump_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698