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

Side by Side Diff: content/browser/gpu/compositor_util.cc

Issue 1273163004: Revert of cc: Use worker context for one-copy tile initialization. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 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 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 235
236 #if defined(OS_ANDROID) 236 #if defined(OS_ANDROID)
237 return false; 237 return false;
238 #endif 238 #endif
239 return true; 239 return true;
240 } 240 }
241 241
242 bool IsZeroCopyUploadEnabled() { 242 bool IsZeroCopyUploadEnabled() {
243 const base::CommandLine& command_line = 243 const base::CommandLine& command_line =
244 *base::CommandLine::ForCurrentProcess(); 244 *base::CommandLine::ForCurrentProcess();
245 // Single-threaded mode in the renderer process (for layout tests) is
246 // synchronous, which depends on tiles being ready to draw when raster is
247 // complete. Therefore, it must use one of zero copy, software raster, or
248 // GPU raster. So we force zero-copy on for the case where software/GPU raster
249 // is not used.
250 // TODO(reveman): One-copy can work with sync compositing: crbug.com/490295.
251 if (command_line.HasSwitch(switches::kDisableThreadedCompositing))
252 return true;
245 return command_line.HasSwitch(switches::kEnableZeroCopy); 253 return command_line.HasSwitch(switches::kEnableZeroCopy);
246 } 254 }
247 255
248 bool IsGpuRasterizationEnabled() { 256 bool IsGpuRasterizationEnabled() {
249 const base::CommandLine& command_line = 257 const base::CommandLine& command_line =
250 *base::CommandLine::ForCurrentProcess(); 258 *base::CommandLine::ForCurrentProcess();
251 259
252 if (command_line.HasSwitch(switches::kDisableGpuRasterization)) 260 if (command_line.HasSwitch(switches::kDisableGpuRasterization))
253 return false; 261 return false;
254 else if (command_line.HasSwitch(switches::kEnableGpuRasterization)) 262 else if (command_line.HasSwitch(switches::kEnableGpuRasterization))
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
409 } 417 }
410 } 418 }
411 return problem_list; 419 return problem_list;
412 } 420 }
413 421
414 std::vector<std::string> GetDriverBugWorkarounds() { 422 std::vector<std::string> GetDriverBugWorkarounds() {
415 return GpuDataManagerImpl::GetInstance()->GetDriverBugWorkarounds(); 423 return GpuDataManagerImpl::GetInstance()->GetDriverBugWorkarounds();
416 } 424 }
417 425
418 } // namespace content 426 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/compositor/reflector_impl_unittest.cc ('k') | content/browser/renderer_host/compositor_impl_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698