| 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 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 219 #else | 219 #else |
| 220 return command_line.HasSwitch(switches::kEnableZeroCopy); | 220 return command_line.HasSwitch(switches::kEnableZeroCopy); |
| 221 #endif | 221 #endif |
| 222 } | 222 } |
| 223 | 223 |
| 224 bool IsPartialRasterEnabled() { | 224 bool IsPartialRasterEnabled() { |
| 225 // Zero copy currently doesn't take advantage of partial raster. | 225 // Zero copy currently doesn't take advantage of partial raster. |
| 226 if (IsZeroCopyUploadEnabled()) | 226 if (IsZeroCopyUploadEnabled()) |
| 227 return false; | 227 return false; |
| 228 const auto& command_line = *base::CommandLine::ForCurrentProcess(); | 228 const auto& command_line = *base::CommandLine::ForCurrentProcess(); |
| 229 return command_line.HasSwitch(switches::kEnablePartialRaster); | 229 return !command_line.HasSwitch(switches::kDisablePartialRaster); |
| 230 } | 230 } |
| 231 | 231 |
| 232 bool IsGpuMemoryBufferCompositorResourcesEnabled() { | 232 bool IsGpuMemoryBufferCompositorResourcesEnabled() { |
| 233 const base::CommandLine& command_line = | 233 const base::CommandLine& command_line = |
| 234 *base::CommandLine::ForCurrentProcess(); | 234 *base::CommandLine::ForCurrentProcess(); |
| 235 if (command_line.HasSwitch( | 235 if (command_line.HasSwitch( |
| 236 switches::kEnableGpuMemoryBufferCompositorResources)) { | 236 switches::kEnableGpuMemoryBufferCompositorResources)) { |
| 237 return true; | 237 return true; |
| 238 } | 238 } |
| 239 if (command_line.HasSwitch( | 239 if (command_line.HasSwitch( |
| (...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 405 } | 405 } |
| 406 } | 406 } |
| 407 return problem_list; | 407 return problem_list; |
| 408 } | 408 } |
| 409 | 409 |
| 410 std::vector<std::string> GetDriverBugWorkarounds() { | 410 std::vector<std::string> GetDriverBugWorkarounds() { |
| 411 return GpuDataManagerImpl::GetInstance()->GetDriverBugWorkarounds(); | 411 return GpuDataManagerImpl::GetInstance()->GetDriverBugWorkarounds(); |
| 412 } | 412 } |
| 413 | 413 |
| 414 } // namespace content | 414 } // namespace content |
| OLD | NEW |