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

Unified Diff: content/browser/compositor/gpu_process_transport_factory.cc

Issue 1464663003: Use IsRunningInMojoShell in GpuProcessTransportFactory (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/compositor/gpu_process_transport_factory.cc
diff --git a/content/browser/compositor/gpu_process_transport_factory.cc b/content/browser/compositor/gpu_process_transport_factory.cc
index 2b9cd69683d4ed6c4b9a8f643ec0d72b30c34b0c..5c08731d4fb06016c5beadb4df475f91d0646664 100644
--- a/content/browser/compositor/gpu_process_transport_factory.cc
+++ b/content/browser/compositor/gpu_process_transport_factory.cc
@@ -53,6 +53,10 @@
#include "ui/gfx/geometry/size.h"
#include "ui/gfx/native_widget_types.h"
+#if defined(MOJO_RUNNER_CLIENT)
+#include "content/common/mojo/mojo_shell_connection_impl.h"
+#endif
+
#if defined(OS_WIN)
#include "content/browser/compositor/software_output_device_win.h"
#elif defined(USE_OZONE)
@@ -150,8 +154,7 @@ scoped_ptr<cc::SoftwareOutputDevice>
GpuProcessTransportFactory::CreateSoftwareOutputDevice(
ui::Compositor* compositor) {
#if defined(MOJO_RUNNER_CLIENT)
- if (base::CommandLine::ForCurrentProcess()->HasSwitch(
- "mojo-platform-channel-handle")) {
+ if (IsRunningInMojoShell()) {
return scoped_ptr<cc::SoftwareOutputDevice>(
new SoftwareOutputDeviceMus(compositor));
}
@@ -204,9 +207,7 @@ static bool ShouldCreateGpuOutputSurface(ui::Compositor* compositor) {
#if defined(MOJO_RUNNER_CLIENT)
// Chrome running as a mojo app currently can only use software compositing.
// TODO(rjkroege): http://crbug.com/548451
- // TODO(rjkroege): Make IsRunningInMojoRunner callable from content.
- if (base::CommandLine::ForCurrentProcess()->HasSwitch(
- "mojo-platform-channel-handle")) {
+ if (IsRunningInMojoShell()) {
return false;
}
#endif
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698