Index: content/renderer/render_thread_impl.cc |
diff --git a/content/renderer/render_thread_impl.cc b/content/renderer/render_thread_impl.cc |
index 00cb65fd1c216131b234fe9320be1bd8a14efb07..0006eaa0579e35f1c9c595c1df2744726aa56bf8 100644 |
--- a/content/renderer/render_thread_impl.cc |
+++ b/content/renderer/render_thread_impl.cc |
@@ -199,6 +199,7 @@ |
#endif |
#if defined(MOJO_SHELL_CLIENT) |
+#include "components/mus/common/gpu_service.h" |
#include "content/public/common/mojo_shell_connection.h" |
#include "content/renderer/mus/render_widget_mus_connection.h" |
#include "content/renderer/mus/render_widget_window_tree_client_factory.h" |
@@ -1812,8 +1813,10 @@ RenderThreadImpl::CreateCompositorOutputSurface( |
use_software = true; |
#if defined(MOJO_SHELL_CLIENT) |
- if (MojoShellConnection::GetForProcess() && !use_software && |
+ auto shell_connection = MojoShellConnection::GetForProcess(); |
+ if (shell_connection && !use_software && |
command_line.HasSwitch(switches::kUseMusInRenderer)) { |
+ mus::GpuService::Initialize(shell_connection->GetConnector()); |
RenderWidgetMusConnection* connection = |
RenderWidgetMusConnection::GetOrCreate(routing_id); |
return connection->CreateOutputSurface(); |