| 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 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 201 bool IsZeroCopyUploadEnabled() { | 201 bool IsZeroCopyUploadEnabled() { |
| 202 const base::CommandLine& command_line = | 202 const base::CommandLine& command_line = |
| 203 *base::CommandLine::ForCurrentProcess(); | 203 *base::CommandLine::ForCurrentProcess(); |
| 204 #if defined(OS_MACOSX) | 204 #if defined(OS_MACOSX) |
| 205 return !command_line.HasSwitch(switches::kDisableZeroCopy); | 205 return !command_line.HasSwitch(switches::kDisableZeroCopy); |
| 206 #else | 206 #else |
| 207 return command_line.HasSwitch(switches::kEnableZeroCopy); | 207 return command_line.HasSwitch(switches::kEnableZeroCopy); |
| 208 #endif | 208 #endif |
| 209 } | 209 } |
| 210 | 210 |
| 211 bool IsPersistentGpuMemoryBufferEnabled() { | 211 bool IsPartialRasterEnabled() { |
| 212 // Zero copy currently doesn't take advantage of persistent buffers. | 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::kEnablePersistentGpuMemoryBuffer); | 216 return command_line.HasSwitch(switches::kEnablePartialRaster); |
| 217 } | 217 } |
| 218 | 218 |
| 219 bool IsGpuRasterizationEnabled() { | 219 bool IsGpuRasterizationEnabled() { |
| 220 const base::CommandLine& command_line = | 220 const base::CommandLine& command_line = |
| 221 *base::CommandLine::ForCurrentProcess(); | 221 *base::CommandLine::ForCurrentProcess(); |
| 222 | 222 |
| 223 if (command_line.HasSwitch(switches::kDisableGpuRasterization)) | 223 if (command_line.HasSwitch(switches::kDisableGpuRasterization)) |
| 224 return false; | 224 return false; |
| 225 else if (command_line.HasSwitch(switches::kEnableGpuRasterization)) | 225 else if (command_line.HasSwitch(switches::kEnableGpuRasterization)) |
| 226 return true; | 226 return true; |
| (...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 381 } | 381 } |
| 382 } | 382 } |
| 383 return problem_list; | 383 return problem_list; |
| 384 } | 384 } |
| 385 | 385 |
| 386 std::vector<std::string> GetDriverBugWorkarounds() { | 386 std::vector<std::string> GetDriverBugWorkarounds() { |
| 387 return GpuDataManagerImpl::GetInstance()->GetDriverBugWorkarounds(); | 387 return GpuDataManagerImpl::GetInstance()->GetDriverBugWorkarounds(); |
| 388 } | 388 } |
| 389 | 389 |
| 390 } // namespace content | 390 } // namespace content |
| OLD | NEW |