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

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

Issue 2675163002: Add gpu_main_thread_factory.h to expose less of content's guts. (Closed)
Patch Set: Getter does not need exporting Created 3 years, 10 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/gpu/gpu_process_host.h ('k') | content/public/test/content_test_suite_base.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/gpu/gpu_process_host.cc
diff --git a/content/browser/gpu/gpu_process_host.cc b/content/browser/gpu/gpu_process_host.cc
index a9f8824a2242d45513193e3328d5b43d0c41b41d..b3388b1893c4b0fe62b119a21635f25c8db1690d 100644
--- a/content/browser/gpu/gpu_process_host.cc
+++ b/content/browser/gpu/gpu_process_host.cc
@@ -30,6 +30,7 @@
#include "content/browser/browser_child_process_host_impl.h"
#include "content/browser/gpu/compositor_util.h"
#include "content/browser/gpu/gpu_data_manager_impl.h"
+#include "content/browser/gpu/gpu_main_thread_factory.h"
#include "content/browser/gpu/gpu_process_host_ui_shim.h"
#include "content/browser/gpu/shader_cache_factory.h"
#include "content/browser/renderer_host/render_widget_host_impl.h"
@@ -422,8 +423,6 @@ void GpuProcessHost::SendOnIO(GpuProcessKind kind,
}
}
-GpuMainThreadFactoryFunction g_gpu_main_thread_factory = NULL;
-
GpuProcessHost::EstablishChannelRequest::EstablishChannelRequest()
: client_id(0) {}
@@ -432,11 +431,6 @@ GpuProcessHost::EstablishChannelRequest::EstablishChannelRequest(
GpuProcessHost::EstablishChannelRequest::~EstablishChannelRequest() {}
-void GpuProcessHost::RegisterGpuMainThreadFactory(
- GpuMainThreadFactoryFunction create) {
- g_gpu_main_thread_factory = create;
-}
-
service_manager::InterfaceProvider* GpuProcessHost::GetRemoteInterfaces() {
return process_->child_connection()->GetRemoteInterfaces();
}
@@ -596,8 +590,8 @@ bool GpuProcessHost::Init() {
gpu::GpuPreferences gpu_preferences = GetGpuPreferencesFromCommandLine();
if (in_process_) {
DCHECK_CURRENTLY_ON(BrowserThread::IO);
- DCHECK(g_gpu_main_thread_factory);
- in_process_gpu_thread_.reset(g_gpu_main_thread_factory(
+ DCHECK(GetGpuMainThreadFactory());
+ in_process_gpu_thread_.reset(GetGpuMainThreadFactory()(
InProcessChildThreadParams(
base::ThreadTaskRunnerHandle::Get(),
process_->child_connection()->service_token()),
« no previous file with comments | « content/browser/gpu/gpu_process_host.h ('k') | content/public/test/content_test_suite_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698