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

Unified Diff: content/renderer/render_view_impl.cc

Issue 10873099: Flag and adapter class for software compositing. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Rebase Created 8 years, 3 months 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/renderer/gpu/compositor_software_output_device_gl_adapter.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_view_impl.cc
diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc
index dd51134a8e93219ed9bc859039914102f349a59c..8f040a9b5d7fa2744ac1b09c3bf2995a2b30bee3 100644
--- a/content/renderer/render_view_impl.cc
+++ b/content/renderer/render_view_impl.cc
@@ -74,6 +74,7 @@
#include "content/renderer/geolocation_dispatcher.h"
#include "content/renderer/gpu/compositor_thread.h"
#include "content/renderer/gpu/compositor_output_surface.h"
+#include "content/renderer/gpu/compositor_software_output_device_gl_adapter.h"
#include "content/renderer/idle_user_detector.h"
#include "content/renderer/input_tag_speech_dispatcher.h"
#include "content/renderer/java/java_bridge_dispatcher.h"
@@ -1888,9 +1889,6 @@ WebStorageNamespace* RenderViewImpl::createSessionStorageNamespace(
}
WebKit::WebCompositorOutputSurface* RenderViewImpl::createOutputSurface() {
- // TODO(aelias): if force-software-mode is on, create an output surface
- // without a 3D context.
-
// Explicitly disable antialiasing for the compositor. As of the time of
// this writing, the only platform that supported antialiasing for the
// compositor was Mac OS X, because the on-screen OpenGL context creation
@@ -1908,7 +1906,15 @@ WebKit::WebCompositorOutputSurface* RenderViewImpl::createOutputSurface() {
if (!context)
return NULL;
- return new CompositorOutputSurface(routing_id(), context);
+ const CommandLine& command_line = *CommandLine::ForCurrentProcess();
+ if (command_line.HasSwitch(switches::kEnableSoftwareCompositingGLAdapter)) {
+ // In the absence of a software-based delegating renderer, use this
+ // stopgap adapter class to present the software renderer output using a
+ // 3d context.
+ return new CompositorOutputSurface(routing_id(), NULL,
+ new CompositorSoftwareOutputDeviceGLAdapter(context));
+ } else
+ return new CompositorOutputSurface(routing_id(), context, NULL);
}
void RenderViewImpl::didAddMessageToConsole(
« no previous file with comments | « content/renderer/gpu/compositor_software_output_device_gl_adapter.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698