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

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

Issue 1949023005: gpu: Add flag for enabling asynchronous worker context. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase fix Created 4 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
« no previous file with comments | « content/browser/gpu/compositor_util.h ('k') | content/browser/gpu/gpu_ipc_browsertests.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 231
232 #if defined(OS_ANDROID) || defined(OS_MACOSX) 232 #if defined(OS_ANDROID) || defined(OS_MACOSX)
233 return true; 233 return true;
234 #endif 234 #endif
235 235
236 // explicitly disable GPU rasterization on all non-android and non-mac devices 236 // explicitly disable GPU rasterization on all non-android and non-mac devices
237 // until we have full test coverage. 237 // until we have full test coverage.
238 return false; 238 return false;
239 } 239 }
240 240
241 bool IsAsyncWorkerContextEnabled() {
242 const base::CommandLine& command_line =
243 *base::CommandLine::ForCurrentProcess();
244
245 if (command_line.HasSwitch(switches::kDisableGpuAsyncWorkerContext))
246 return false;
247 else if (command_line.HasSwitch(switches::kEnableGpuAsyncWorkerContext))
248 return true;
249
250 return false;
251 }
252
241 bool IsForceGpuRasterizationEnabled() { 253 bool IsForceGpuRasterizationEnabled() {
242 const base::CommandLine& command_line = 254 const base::CommandLine& command_line =
243 *base::CommandLine::ForCurrentProcess(); 255 *base::CommandLine::ForCurrentProcess();
244 return command_line.HasSwitch(switches::kForceGpuRasterization); 256 return command_line.HasSwitch(switches::kForceGpuRasterization);
245 } 257 }
246 258
247 int GpuRasterizationMSAASampleCount() { 259 int GpuRasterizationMSAASampleCount() {
248 const base::CommandLine& command_line = 260 const base::CommandLine& command_line =
249 *base::CommandLine::ForCurrentProcess(); 261 *base::CommandLine::ForCurrentProcess();
250 262
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
363 } 375 }
364 } 376 }
365 return problem_list; 377 return problem_list;
366 } 378 }
367 379
368 std::vector<std::string> GetDriverBugWorkarounds() { 380 std::vector<std::string> GetDriverBugWorkarounds() {
369 return GpuDataManagerImpl::GetInstance()->GetDriverBugWorkarounds(); 381 return GpuDataManagerImpl::GetInstance()->GetDriverBugWorkarounds();
370 } 382 }
371 383
372 } // namespace content 384 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/gpu/compositor_util.h ('k') | content/browser/gpu/gpu_ipc_browsertests.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698