Commit c810c58e authored by rjkroege's avatar rjkroege Committed by Commit bot

Use IsRunningInMojoShell in GpuProcessTransportFactory

Mus+ash changes to GpuProcessTransportFactory for Chrome rendering under a
mojo shell checked the command line directly to enable mojo shell mode
because IsRunningInMojoShell wasn't available. Since it is now, use it.

Review URL: https://codereview.chromium.org/1464663003

Cr-Commit-Position: refs/heads/master@{#361247}
parent 8655039d
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment