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

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: Fix the unittests 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
« no previous file with comments | « content/renderer/DEPS ('k') | mash/quick_launch/quick_launch_application.cc » ('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 593b3876710625342178fa04eabe902da3ac400d..1eb07a3b9ecb6c1eaf92ce170a7614f38010463c 100644
--- a/content/renderer/render_thread_impl.cc
+++ b/content/renderer/render_thread_impl.cc
@@ -198,7 +198,8 @@
#include "v8/src/third_party/vtune/v8-vtune.h"
#endif
-#if defined(MOJO_SHELL_CLIENT)
+#if defined(MOJO_SHELL_CLIENT) && defined(USE_AURA)
+#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"
@@ -829,7 +830,7 @@ void RenderThreadImpl::Init(
GetInterfaceRegistry()->AddInterface(base::Bind(CreateFrameFactory));
GetInterfaceRegistry()->AddInterface(base::Bind(CreateEmbeddedWorkerSetup));
-#if defined(MOJO_SHELL_CLIENT)
+#if defined(MOJO_SHELL_CLIENT) && defined(USE_AURA)
// We may not have a MojoShellConnection object in tests that directly
// instantiate a RenderThreadImpl.
if (MojoShellConnection::GetForProcess() &&
@@ -1801,9 +1802,11 @@ RenderThreadImpl::CreateCompositorOutputSurface(
if (command_line.HasSwitch(switches::kDisableGpuCompositing))
use_software = true;
-#if defined(MOJO_SHELL_CLIENT)
- if (MojoShellConnection::GetForProcess() && !use_software &&
+#if defined(MOJO_SHELL_CLIENT) && defined(USE_AURA)
+ 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();
« no previous file with comments | « content/renderer/DEPS ('k') | mash/quick_launch/quick_launch_application.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698