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

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: Including correct header. 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..65e732bbd45eaf57564d7cd6f549a1242edb2eca
--- /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 "base/memory/singleton.h"
+#include "base/trace_event/memory_dump_provider.h"
+#include "third_party/skia/include/core/SkTypes.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