| 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 <memory> | 9 #include <memory> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 235 return false; | 235 return false; |
| 236 | 236 |
| 237 #if defined(OS_MACOSX) | 237 #if defined(OS_MACOSX) |
| 238 return true; | 238 return true; |
| 239 #else | 239 #else |
| 240 return false; | 240 return false; |
| 241 #endif | 241 #endif |
| 242 } | 242 } |
| 243 | 243 |
| 244 bool IsGpuRasterizationEnabled() { | 244 bool IsGpuRasterizationEnabled() { |
| 245 const base::CommandLine& command_line = | 245 GpuDataManagerImpl* manager = GpuDataManagerImpl::GetInstance(); |
| 246 *base::CommandLine::ForCurrentProcess(); | 246 return manager->IsFeatureEnabled(gpu::GPU_FEATURE_TYPE_GPU_RASTERIZATION); |
| 247 | |
| 248 if (command_line.HasSwitch(switches::kDisableGpuRasterization)) | |
| 249 return false; | |
| 250 else if (command_line.HasSwitch(switches::kEnableGpuRasterization)) | |
| 251 return true; | |
| 252 | |
| 253 if (IsGpuRasterizationBlacklisted()) { | |
| 254 return false; | |
| 255 } | |
| 256 | |
| 257 // Gpu Rasterization on platforms that are not fully enabled is controlled by | |
| 258 // a finch experiment. | |
| 259 return base::FeatureList::IsEnabled(features::kDefaultEnableGpuRasterization); | |
| 260 } | 247 } |
| 261 | 248 |
| 262 bool IsAsyncWorkerContextEnabled() { | 249 bool IsAsyncWorkerContextEnabled() { |
| 263 const base::CommandLine& command_line = | 250 const base::CommandLine& command_line = |
| 264 *base::CommandLine::ForCurrentProcess(); | 251 *base::CommandLine::ForCurrentProcess(); |
| 265 | 252 |
| 266 if (command_line.HasSwitch(switches::kDisableGpuAsyncWorkerContext)) | 253 if (command_line.HasSwitch(switches::kDisableGpuAsyncWorkerContext)) |
| 267 return false; | 254 return false; |
| 268 else if (command_line.HasSwitch(switches::kEnableGpuAsyncWorkerContext)) | 255 else if (command_line.HasSwitch(switches::kEnableGpuAsyncWorkerContext)) |
| 269 return true; | 256 return true; |
| (...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 413 } | 400 } |
| 414 } | 401 } |
| 415 return problem_list; | 402 return problem_list; |
| 416 } | 403 } |
| 417 | 404 |
| 418 std::vector<std::string> GetDriverBugWorkarounds() { | 405 std::vector<std::string> GetDriverBugWorkarounds() { |
| 419 return GpuDataManagerImpl::GetInstance()->GetDriverBugWorkarounds(); | 406 return GpuDataManagerImpl::GetInstance()->GetDriverBugWorkarounds(); |
| 420 } | 407 } |
| 421 | 408 |
| 422 } // namespace content | 409 } // namespace content |
| OLD | NEW |