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

Side by Side 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/gpu/compositor_util.h" 5 #include "content/browser/gpu/compositor_util.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/metrics/field_trial.h" 9 #include "base/metrics/field_trial.h"
10 #include "base/strings/string_number_conversions.h" 10 #include "base/strings/string_number_conversions.h"
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
250 250
251 #if defined(OS_ANDROID) 251 #if defined(OS_ANDROID)
252 return false; 252 return false;
253 #endif 253 #endif
254 return true; 254 return true;
255 } 255 }
256 256
257 bool IsZeroCopyUploadEnabled() { 257 bool IsZeroCopyUploadEnabled() {
258 const base::CommandLine& command_line = 258 const base::CommandLine& command_line =
259 *base::CommandLine::ForCurrentProcess(); 259 *base::CommandLine::ForCurrentProcess();
260 // Single-threaded mode in the renderer process (for layout tests) is
261 // synchronous, which depends on tiles being ready to draw when raster is
262 // complete. Therefore, it must use one of zero copy, software raster, or
263 // GPU raster. So we force zero-copy on for the case where software/GPU raster
264 // is not used.
265 // TODO(reveman): One-copy can work with sync compositing: crbug.com/490295.
266 if (command_line.HasSwitch(switches::kDisableThreadedCompositing))
267 return true;
260 return command_line.HasSwitch(switches::kEnableZeroCopy); 268 return command_line.HasSwitch(switches::kEnableZeroCopy);
261 } 269 }
262 270
263 bool IsGpuRasterizationEnabled() { 271 bool IsGpuRasterizationEnabled() {
264 const base::CommandLine& command_line = 272 const base::CommandLine& command_line =
265 *base::CommandLine::ForCurrentProcess(); 273 *base::CommandLine::ForCurrentProcess();
266 274
267 if (!IsImplSidePaintingEnabled()) 275 if (!IsImplSidePaintingEnabled())
268 return false; 276 return false;
269 277
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
434 } 442 }
435 } 443 }
436 return problem_list; 444 return problem_list;
437 } 445 }
438 446
439 std::vector<std::string> GetDriverBugWorkarounds() { 447 std::vector<std::string> GetDriverBugWorkarounds() {
440 return GpuDataManagerImpl::GetInstance()->GetDriverBugWorkarounds(); 448 return GpuDataManagerImpl::GetInstance()->GetDriverBugWorkarounds();
441 } 449 }
442 450
443 } // namespace content 451 } // namespace content
OLDNEW
« 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