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

Unified Diff: content/renderer/render_thread_impl.cc

Issue 2087333002: mus::GpuService: Support establish GpuChannel asynchronously. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 6 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
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();

Powered by Google App Engine
This is Rietveld 408576698