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

Unified Diff: content/browser/gpu/browser_gpu_memory_buffer_manager.cc

Issue 2971083002: gpu: Reduce direct use of BrowserGpuMemoryBufferManager (Closed)
Patch Set: . Created 3 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 | « content/browser/compositor/gpu_process_transport_factory.cc ('k') | content/browser/gpu/compositor_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/gpu/browser_gpu_memory_buffer_manager.cc
diff --git a/content/browser/gpu/browser_gpu_memory_buffer_manager.cc b/content/browser/gpu/browser_gpu_memory_buffer_manager.cc
index 93310633ae2c0fe5da07cbe272140910ac0178e1..bd0afaaf0126e0501c1d92958103db4a590e6135 100644
--- a/content/browser/gpu/browser_gpu_memory_buffer_manager.cc
+++ b/content/browser/gpu/browser_gpu_memory_buffer_manager.cc
@@ -12,6 +12,7 @@
#include "base/strings/stringprintf.h"
#include "base/synchronization/waitable_event.h"
#include "base/threading/thread_restrictions.h"
+#include "base/trace_event/memory_dump_manager.h"
#include "base/trace_event/process_memory_dump.h"
#include "base/trace_event/trace_event.h"
#include "build/build_config.h"
@@ -71,6 +72,14 @@ BrowserGpuMemoryBufferManager::BrowserGpuMemoryBufferManager(
gpu_client_tracing_id_(gpu_client_tracing_id) {
DCHECK(!g_gpu_memory_buffer_manager);
g_gpu_memory_buffer_manager = this;
+
+ // Enable the dump provider with IO thread affinity. Note that
+ // unregistration happens on the IO thread (See
+ // BrowserProcessSubThread::IOThreadPreCleanUp).
+ DCHECK(BrowserThread::GetTaskRunnerForThread(BrowserThread::IO));
+ base::trace_event::MemoryDumpManager::GetInstance()->RegisterDumpProvider(
+ this, "BrowserGpuMemoryBufferManager",
+ BrowserThread::GetTaskRunnerForThread(BrowserThread::IO));
}
BrowserGpuMemoryBufferManager::~BrowserGpuMemoryBufferManager() {
« no previous file with comments | « content/browser/compositor/gpu_process_transport_factory.cc ('k') | content/browser/gpu/compositor_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698