OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |