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

Unified Diff: content/renderer/render_thread_impl.cc

Issue 2233003003: services/ui: Inject GpuService instance where needed, instead of singleton. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 4 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/renderer/mus/render_widget_mus_connection.cc ('k') | services/ui/common/gpu_service.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_thread_impl.cc
diff --git a/content/renderer/render_thread_impl.cc b/content/renderer/render_thread_impl.cc
index f28d2c4a09dce40f3e2647648765b39dec2d2749..13e32e613c5b117860e7ba09788079364726c100 100644
--- a/content/renderer/render_thread_impl.cc
+++ b/content/renderer/render_thread_impl.cc
@@ -644,9 +644,10 @@ void RenderThreadImpl::Init(
ChildProcess::current()->set_main_thread(this);
#if defined(USE_AURA)
- if (IsRunningInMash())
+ if (IsRunningInMash()) {
gpu_service_ =
ui::GpuService::Initialize(GetMojoShellConnection()->GetConnector());
+ }
#endif
InitializeWebKit(resource_task_queue);
@@ -1829,7 +1830,7 @@ RenderThreadImpl::CreateCompositorOutputSurface(
command_line.HasSwitch(switches::kUseMusInRenderer)) {
RenderWidgetMusConnection* connection =
RenderWidgetMusConnection::GetOrCreate(routing_id);
- return connection->CreateOutputSurface();
+ return connection->CreateOutputSurface(gpu_service_.get());
}
#endif
« no previous file with comments | « content/renderer/mus/render_widget_mus_connection.cc ('k') | services/ui/common/gpu_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698