Index: content/renderer/render_thread_impl.cc |
diff --git a/content/renderer/render_thread_impl.cc b/content/renderer/render_thread_impl.cc |
index 3fc1dfe73df87f6b55529d03272309c81182b151..a2f52d336b92b4dcab34f1210413521fde94de66 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(); |