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

Unified Diff: content/browser/compositor/gpu_process_transport_factory.cc

Issue 394023008: Setup GPU process host-output surface mapping with surfaces. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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/browser/compositor/gpu_process_transport_factory.cc
diff --git a/content/browser/compositor/gpu_process_transport_factory.cc b/content/browser/compositor/gpu_process_transport_factory.cc
index 0e1025c495b1e84afe88949146c2a5de960d06a6..25f9dad4e565ae2ab2a67a9b07bdf6cac6780165 100644
--- a/content/browser/compositor/gpu_process_transport_factory.cc
+++ b/content/browser/compositor/gpu_process_transport_factory.cc
@@ -160,6 +160,18 @@ scoped_ptr<cc::OutputSurface> GpuProcessTransportFactory::CreateOutputSurface(
UMA_HISTOGRAM_BOOLEAN("Aura.CreatedGpuBrowserCompositor", !!context_provider);
+ if (context_provider) {
+ scoped_refptr<base::SingleThreadTaskRunner> compositor_thread_task_runner =
+ GetCompositorMessageLoop();
+ if (!compositor_thread_task_runner.get())
+ compositor_thread_task_runner = base::MessageLoopProxy::current();
+
+ // Here we know the GpuProcessHost has been set up, because we created a
+ // context.
+ output_surface_proxy_->ConnectToGpuProcessHost(
+ compositor_thread_task_runner.get());
+ }
+
if (base::CommandLine::ForCurrentProcess()->HasSwitch(
switches::kUseSurfaces)) {
// This gets a bit confusing. Here we have a ContextProvider configured to
@@ -213,16 +225,6 @@ scoped_ptr<cc::OutputSurface> GpuProcessTransportFactory::CreateOutputSurface(
return surface.PassAs<cc::OutputSurface>();
}
- scoped_refptr<base::SingleThreadTaskRunner> compositor_thread_task_runner =
- GetCompositorMessageLoop();
- if (!compositor_thread_task_runner.get())
- compositor_thread_task_runner = base::MessageLoopProxy::current();
-
- // Here we know the GpuProcessHost has been set up, because we created a
- // context.
- output_surface_proxy_->ConnectToGpuProcessHost(
- compositor_thread_task_runner.get());
-
scoped_ptr<BrowserCompositorOutputSurface> surface(
new GpuBrowserCompositorOutputSurface(
context_provider,
« 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