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

Unified Diff: content/gpu/gpu_child_thread.cc

Issue 2158423004: gpu: defer mojo registration and binding resume until full initialization (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/gpu/gpu_child_thread.cc
diff --git a/content/gpu/gpu_child_thread.cc b/content/gpu/gpu_child_thread.cc
index d6720d4a8e703f1ad8c5a57735ead354af6c9b5a..5b8e22d15fae1d81f3856f4c63f6ab407b5cfe8f 100644
--- a/content/gpu/gpu_child_thread.cc
+++ b/content/gpu/gpu_child_thread.cc
@@ -220,18 +220,6 @@ void GpuChildThread::Init(const base::Time& process_start_time) {
if (!in_browser_process_)
media::SetMediaClientAndroid(GetContentClient()->GetMediaClientAndroid());
#endif
-
- // Only set once per process instance.
- process_control_.reset(new GpuProcessControlImpl());
-
- GetInterfaceRegistry()->AddInterface(base::Bind(
- &GpuChildThread::BindProcessControlRequest, base::Unretained(this)));
-
- if (GetContentClient()->gpu()) { // NULL in tests.
- GetContentClient()->gpu()->ExposeInterfacesToBrowser(
- GetInterfaceRegistry());
- }
-
// We don't want to process any incoming interface requests until
// OnInitialize() is invoked.
GetInterfaceRegistry()->PauseBinding();
@@ -348,8 +336,6 @@ void GpuChildThread::StoreShaderToDisk(int32_t client_id,
}
void GpuChildThread::OnInitialize(const gpu::GpuPreferences& gpu_preferences) {
- GetInterfaceRegistry()->ResumeBinding();
-
gpu_preferences_ = gpu_preferences;
gpu_info_.video_decode_accelerator_capabilities =
@@ -408,6 +394,19 @@ void GpuChildThread::OnInitialize(const gpu::GpuPreferences& gpu_preferences) {
->GetGpuPlatformSupport()
->OnChannelEstablished(this);
#endif
+
+ // Only set once per process instance.
+ process_control_.reset(new GpuProcessControlImpl());
+
+ GetInterfaceRegistry()->AddInterface(base::Bind(
+ &GpuChildThread::BindProcessControlRequest, base::Unretained(this)));
+
+ if (GetContentClient()->gpu()) { // NULL in tests.
+ GetContentClient()->gpu()->ExposeInterfacesToBrowser(
+ GetInterfaceRegistry());
+ }
+
+ GetInterfaceRegistry()->ResumeBinding();
}
void GpuChildThread::OnFinalize() {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698