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

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

Issue 1173893003: Re-land: content: Enable one-copy tile updates on Android. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase 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 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 return cc::MathUtil::ClampToRange(num_raster_threads, kMinRasterThreads, 221 return cc::MathUtil::ClampToRange(num_raster_threads, kMinRasterThreads,
222 kMaxRasterThreads); 222 kMaxRasterThreads);
223 } 223 }
224 224
225 bool IsOneCopyUploadEnabled() { 225 bool IsOneCopyUploadEnabled() {
226 if (IsZeroCopyUploadEnabled()) 226 if (IsZeroCopyUploadEnabled())
227 return false; 227 return false;
228 228
229 const base::CommandLine& command_line = 229 const base::CommandLine& command_line =
230 *base::CommandLine::ForCurrentProcess(); 230 *base::CommandLine::ForCurrentProcess();
231 if (command_line.HasSwitch(switches::kEnableOneCopy)) 231 return !command_line.HasSwitch(switches::kDisableOneCopy);
232 return true;
233 if (command_line.HasSwitch(switches::kDisableOneCopy))
234 return false;
235
236 #if defined(OS_ANDROID)
237 return false;
238 #endif
239 return true;
240 } 232 }
241 233
242 bool IsZeroCopyUploadEnabled() { 234 bool IsZeroCopyUploadEnabled() {
243 const base::CommandLine& command_line = 235 const base::CommandLine& command_line =
244 *base::CommandLine::ForCurrentProcess(); 236 *base::CommandLine::ForCurrentProcess();
245 return command_line.HasSwitch(switches::kEnableZeroCopy); 237 return command_line.HasSwitch(switches::kEnableZeroCopy);
246 } 238 }
247 239
248 bool IsPersistentGpuMemoryBufferEnabled() { 240 bool IsPersistentGpuMemoryBufferEnabled() {
249 // Zero copy currently doesn't take advantage of persistent buffers. 241 // Zero copy currently doesn't take advantage of persistent buffers.
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
418 } 410 }
419 } 411 }
420 return problem_list; 412 return problem_list;
421 } 413 }
422 414
423 std::vector<std::string> GetDriverBugWorkarounds() { 415 std::vector<std::string> GetDriverBugWorkarounds() {
424 return GpuDataManagerImpl::GetInstance()->GetDriverBugWorkarounds(); 416 return GpuDataManagerImpl::GetInstance()->GetDriverBugWorkarounds();
425 } 417 }
426 418
427 } // namespace content 419 } // namespace content
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/chrome_restart_request.cc ('k') | content/public/common/content_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698