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

Unified Diff: cc/resources/resource_provider.h

Issue 1256613002: Add tracing for GL texture objects (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@browser_process_id
Patch Set: Key texture manager memory dump provider registration off of memory_tracker_ Created 5 years, 4 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 | « cc/cc.gyp ('k') | cc/resources/resource_provider.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/resources/resource_provider.h
diff --git a/cc/resources/resource_provider.h b/cc/resources/resource_provider.h
index 44d555ab4b9e705c9e1d5a5523722d22712ecaa6..6cf812515fb4ff98e637ec845cdab89517d3d5be 100644
--- a/cc/resources/resource_provider.h
+++ b/cc/resources/resource_provider.h
@@ -17,6 +17,8 @@
#include "base/memory/linked_ptr.h"
#include "base/memory/scoped_ptr.h"
#include "base/threading/thread_checker.h"
+#include "base/trace_event/memory_allocator_dump.h"
+#include "base/trace_event/memory_dump_provider.h"
#include "cc/base/cc_export.h"
#include "cc/base/resource_id.h"
#include "cc/output/context_provider.h"
@@ -57,7 +59,8 @@ class SharedBitmapManager;
// This class is not thread-safe and can only be called from the thread it was
// created on (in practice, the impl thread).
-class CC_EXPORT ResourceProvider {
+class CC_EXPORT ResourceProvider
+ : public base::trace_event::MemoryDumpProvider {
private:
struct Resource;
@@ -86,7 +89,7 @@ class CC_EXPORT ResourceProvider {
bool use_rgba_4444_texture_format,
size_t id_allocation_chunk_size,
bool use_persistent_map_for_gpu_memory_buffers);
- virtual ~ResourceProvider();
+ ~ResourceProvider() override;
void DidLoseOutputSurface() { lost_output_surface_ = true; }
@@ -438,6 +441,9 @@ class CC_EXPORT ResourceProvider {
void ValidateResource(ResourceId id) const;
+ // base::trace_event::MemoryDumpProvider implementation.
+ bool OnMemoryDump(base::trace_event::ProcessMemoryDump* pmd) override;
+
protected:
ResourceProvider(OutputSurface* output_surface,
SharedBitmapManager* shared_bitmap_manager,
« no previous file with comments | « cc/cc.gyp ('k') | cc/resources/resource_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698