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

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: rebased, fixed release build 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 | « content/browser/compositor/DEPS ('k') | content/browser/compositor/software_output_device_mus.h » ('j') | 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 7e2c513b98ee9302d10509f564f4869f85cc7422..2b9cd69683d4ed6c4b9a8f643ec0d72b30c34b0c 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,14 @@ GpuProcessTransportFactory::CreateOffscreenCommandBufferContext() {
scoped_ptr<cc::SoftwareOutputDevice>
GpuProcessTransportFactory::CreateSoftwareOutputDevice(
ui::Compositor* compositor) {
+#if defined(MOJO_RUNNER_CLIENT)
+ if (base::CommandLine::ForCurrentProcess()->HasSwitch(
+ "mojo-platform-channel-handle")) {
+ return scoped_ptr<cc::SoftwareOutputDevice>(
+ new SoftwareOutputDeviceMus(compositor));
+ }
+#endif
+
#if defined(OS_WIN)
return scoped_ptr<cc::SoftwareOutputDevice>(
new SoftwareOutputDeviceWin(software_backing_.get(), compositor));
@@ -192,6 +201,16 @@ CreateOverlayCandidateValidator(gfx::AcceleratedWidget widget) {
}
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")) {
+ return false;
+ }
+#endif
+
#if defined(OS_CHROMEOS)
// Software fallback does not happen on Chrome OS.
return true;
« no previous file with comments | « content/browser/compositor/DEPS ('k') | content/browser/compositor/software_output_device_mus.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698