| 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 "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 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 209 } | 209 } |
| 210 | 210 |
| 211 bool IsPartialRasterEnabled() { | 211 bool IsPartialRasterEnabled() { |
| 212 // Zero copy currently doesn't take advantage of partial raster. | 212 // Zero copy currently doesn't take advantage of partial raster. |
| 213 if (IsZeroCopyUploadEnabled()) | 213 if (IsZeroCopyUploadEnabled()) |
| 214 return false; | 214 return false; |
| 215 const auto& command_line = *base::CommandLine::ForCurrentProcess(); | 215 const auto& command_line = *base::CommandLine::ForCurrentProcess(); |
| 216 return command_line.HasSwitch(switches::kEnablePartialRaster); | 216 return command_line.HasSwitch(switches::kEnablePartialRaster); |
| 217 } | 217 } |
| 218 | 218 |
| 219 bool IsGpuMemoryBufferCompositorResourcesEnabled() { |
| 220 const base::CommandLine& command_line = |
| 221 *base::CommandLine::ForCurrentProcess(); |
| 222 return command_line.HasSwitch( |
| 223 switches::kEnableGpuMemoryBufferCompositorResources); |
| 224 } |
| 225 |
| 219 bool IsGpuRasterizationEnabled() { | 226 bool IsGpuRasterizationEnabled() { |
| 220 const base::CommandLine& command_line = | 227 const base::CommandLine& command_line = |
| 221 *base::CommandLine::ForCurrentProcess(); | 228 *base::CommandLine::ForCurrentProcess(); |
| 222 | 229 |
| 223 if (command_line.HasSwitch(switches::kDisableGpuRasterization)) | 230 if (command_line.HasSwitch(switches::kDisableGpuRasterization)) |
| 224 return false; | 231 return false; |
| 225 else if (command_line.HasSwitch(switches::kEnableGpuRasterization)) | 232 else if (command_line.HasSwitch(switches::kEnableGpuRasterization)) |
| 226 return true; | 233 return true; |
| 227 | 234 |
| 228 if (IsGpuRasterizationBlacklisted()) { | 235 if (IsGpuRasterizationBlacklisted()) { |
| (...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 381 } | 388 } |
| 382 } | 389 } |
| 383 return problem_list; | 390 return problem_list; |
| 384 } | 391 } |
| 385 | 392 |
| 386 std::vector<std::string> GetDriverBugWorkarounds() { | 393 std::vector<std::string> GetDriverBugWorkarounds() { |
| 387 return GpuDataManagerImpl::GetInstance()->GetDriverBugWorkarounds(); | 394 return GpuDataManagerImpl::GetInstance()->GetDriverBugWorkarounds(); |
| 388 } | 395 } |
| 389 | 396 |
| 390 } // namespace content | 397 } // namespace content |
| OLD | NEW |