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

Unified Diff: content/browser/gpu/compositor_util.cc

Issue 1149803002: cc: Make single-thread renderer compositor always synchronous. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: syncsinglethread: . Created 5 years, 7 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 | « cc/trees/layer_tree_host_unittest_context.cc ('k') | content/renderer/gpu/compositor_dependencies.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/gpu/compositor_util.cc
diff --git a/content/browser/gpu/compositor_util.cc b/content/browser/gpu/compositor_util.cc
index 47b2d7077512cea0a8f4028b8e18ba928ed8b8ef..a652c39dbd9c6bc62ecff1ff5dc7a4e15dfb3486 100644
--- a/content/browser/gpu/compositor_util.cc
+++ b/content/browser/gpu/compositor_util.cc
@@ -257,6 +257,14 @@ bool IsOneCopyUploadEnabled() {
bool IsZeroCopyUploadEnabled() {
const base::CommandLine& command_line =
*base::CommandLine::ForCurrentProcess();
+ // Single-threaded mode in the renderer process (for layout tests) is
+ // synchronous, which depends on tiles being ready to draw when raster is
+ // complete. Therefore, it must use one of zero copy, software raster, or
+ // GPU raster. So we force zero-copy on for the case where software/GPU raster
+ // is not used.
+ // TODO(reveman): One-copy can work with sync compositing: crbug.com/490295.
+ if (command_line.HasSwitch(switches::kDisableThreadedCompositing))
+ return true;
return command_line.HasSwitch(switches::kEnableZeroCopy);
}
« no previous file with comments | « cc/trees/layer_tree_host_unittest_context.cc ('k') | content/renderer/gpu/compositor_dependencies.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698