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

Unified Diff: content/renderer/render_widget.cc

Issue 14888002: Android WebView Merged-Thread Hardware Draw (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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
Index: content/renderer/render_widget.cc
diff --git a/content/renderer/render_widget.cc b/content/renderer/render_widget.cc
index b681e5def33c972ab0d4dc026ad28ad3bf359857..9ab93fe338a1a43dc41b0a01d041ce288f1c11b7 100644
--- a/content/renderer/render_widget.cc
+++ b/content/renderer/render_widget.cc
@@ -560,6 +560,14 @@ bool RenderWidget::ForceCompositingModeEnabled() {
scoped_ptr<cc::OutputSurface> RenderWidget::CreateOutputSurface() {
const CommandLine& command_line = *CommandLine::ForCurrentProcess();
+
+#if defined(OS_ANDROID)
+ if (command_line.HasSwitch(switches::kEnableSynchronousRendererCompositor)) {
+ return scoped_ptr<cc::OutputSurface>(
+ new SynchronousCompositorOutputSurface(routing_id()));
+ }
+#endif
+
if (command_line.HasSwitch(switches::kEnableSoftwareCompositingGLAdapter)) {
return scoped_ptr<cc::OutputSurface>(
new CompositorOutputSurface(routing_id(), NULL,
@@ -585,16 +593,6 @@ scoped_ptr<cc::OutputSurface> RenderWidget::CreateOutputSurface() {
if (!context)
return scoped_ptr<cc::OutputSurface>();
-#if defined(OS_ANDROID)
- if (command_line.HasSwitch(switches::kEnableSynchronousRendererCompositor)) {
- // TODO(joth): Move above the |context| creation step above when the
- // SynchronousCompositor no longer depends on externally created context.
- return scoped_ptr<cc::OutputSurface>(
- new SynchronousCompositorOutputSurface(routing_id(),
- context));
- }
-#endif
-
bool composite_to_mailbox =
command_line.HasSwitch(cc::switches::kCompositeToMailbox);
DCHECK(!composite_to_mailbox || command_line.HasSwitch(

Powered by Google App Engine
This is Rietveld 408576698