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

Unified Diff: content/common/gpu/client/context_provider_command_buffer.h

Issue 2408513002: Move memory observer off OutputSurface/CompositorFrameSink (Closed)
Patch Set: memoryobs-contextprovider: . Created 4 years, 2 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/output/output_surface.cc ('k') | content/common/gpu/client/context_provider_command_buffer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/gpu/client/context_provider_command_buffer.h
diff --git a/content/common/gpu/client/context_provider_command_buffer.h b/content/common/gpu/client/context_provider_command_buffer.h
index edc279bbdd027c375d49f31d6a793793cec5e56f..a006e5a89fa5160622735afdfe172b841d219144 100644
--- a/content/common/gpu/client/context_provider_command_buffer.h
+++ b/content/common/gpu/client/context_provider_command_buffer.h
@@ -14,6 +14,7 @@
#include "base/single_thread_task_runner.h"
#include "base/synchronization/lock.h"
#include "base/threading/thread_checker.h"
+#include "base/trace_event/memory_dump_provider.h"
#include "cc/output/context_provider.h"
#include "content/common/content_export.h"
#include "content/common/gpu/client/command_buffer_metrics.h"
@@ -45,7 +46,8 @@ class WebGraphicsContext3DCommandBufferImpl;
// Implementation of cc::ContextProvider that provides a GL implementation over
// command buffer to the GPU process.
class CONTENT_EXPORT ContextProviderCommandBuffer
- : NON_EXPORTED_BASE(public cc::ContextProvider) {
+ : NON_EXPORTED_BASE(public cc::ContextProvider),
+ public base::trace_event::MemoryDumpProvider {
public:
ContextProviderCommandBuffer(
scoped_refptr<gpu::GpuChannelHost> channel,
@@ -78,6 +80,10 @@ class CONTENT_EXPORT ContextProviderCommandBuffer
void SetLostContextCallback(
const LostContextCallback& lost_context_callback) override;
+ // base::trace_event::MemoryDumpProvider implementation.
+ bool OnMemoryDump(const base::trace_event::MemoryDumpArgs& args,
+ base::trace_event::ProcessMemoryDump* pmd) override;
+
// Set the default task runner for command buffers to use for handling IPCs.
// If not specified, this will be the ThreadTaskRunner for the thread on
// which BindToThread is called.
« no previous file with comments | « cc/output/output_surface.cc ('k') | content/common/gpu/client/context_provider_command_buffer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698