Chromium Code Reviews| 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 7e2c513b98ee9302d10509f564f4869f85cc7422..364232148b12239d4e7f5e52015ff9a47b8a5edb 100644 |
| --- a/content/browser/compositor/gpu_process_transport_factory.cc |
| +++ b/content/browser/compositor/gpu_process_transport_factory.cc |
| @@ -28,6 +28,7 @@ |
| #include "content/browser/compositor/offscreen_browser_compositor_output_surface.h" |
| #include "content/browser/compositor/reflector_impl.h" |
| #include "content/browser/compositor/software_browser_compositor_output_surface.h" |
| +#include "content/browser/compositor/software_output_device_mus.h" |
| #include "content/browser/gpu/browser_gpu_channel_host_factory.h" |
| #include "content/browser/gpu/browser_gpu_memory_buffer_manager.h" |
| #include "content/browser/gpu/compositor_util.h" |
| @@ -148,6 +149,12 @@ GpuProcessTransportFactory::CreateOffscreenCommandBufferContext() { |
| scoped_ptr<cc::SoftwareOutputDevice> |
| GpuProcessTransportFactory::CreateSoftwareOutputDevice( |
| ui::Compositor* compositor) { |
| + if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
| + "mojo-platform-channel-handle")) { |
| + return scoped_ptr<cc::SoftwareOutputDevice>( |
| + new SoftwareOutputDeviceMus(compositor)); |
| + } |
|
ccameron
2015/11/13 23:15:41
Can we get a IsRunningInMojoRunner() similar to th
|
| + |
| #if defined(OS_WIN) |
| return scoped_ptr<cc::SoftwareOutputDevice>( |
| new SoftwareOutputDeviceWin(software_backing_.get(), compositor)); |
| @@ -192,6 +199,14 @@ CreateOverlayCandidateValidator(gfx::AcceleratedWidget widget) { |
| } |
| static bool ShouldCreateGpuOutputSurface(ui::Compositor* compositor) { |
| + // 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")) { |
| + return false; |
| + } |
|
ccameron
2015/11/13 23:15:41
Likewise.
|
| + |
| #if defined(OS_CHROMEOS) |
| // Software fallback does not happen on Chrome OS. |
| return true; |