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

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

Issue 1438903002: p1 mus+ash chrome renders ui and content (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review comments 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
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));
+ }
+
#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;
+ }
+
#if defined(OS_CHROMEOS)
// Software fallback does not happen on Chrome OS.
return true;

Powered by Google App Engine
This is Rietveld 408576698