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..eb27cbab901ce55765901b604e1c49fb342f9b7f 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")) { |
Fady Samuel
2015/11/13 02:18:02
nit: constant? Maybe in content_switches.h
rjkroege
2015/11/13 03:10:43
It doesn't belong there. It requires refactoring m
Ben Goodger (Google)
2015/11/13 03:29:35
I'm going to do this tonight/tomorrow. I'll stuff
|
+ return scoped_ptr<cc::SoftwareOutputDevice>( |
+ new SoftwareOutputDeviceMus(compositor)); |
+ } |
+ |
#if defined(OS_WIN) |
return scoped_ptr<cc::SoftwareOutputDevice>( |
new SoftwareOutputDeviceWin(software_backing_.get(), compositor)); |
@@ -192,6 +199,13 @@ 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 |
+ if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
+ "mojo-platform-channel-handle")) { |
+ return false; |
+ } |
+ |
#if defined(OS_CHROMEOS) |
// Software fallback does not happen on Chrome OS. |
return true; |