| 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 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 213 #else | 213 #else |
| 214 return command_line.HasSwitch(switches::kEnableZeroCopy); | 214 return command_line.HasSwitch(switches::kEnableZeroCopy); |
| 215 #endif | 215 #endif |
| 216 } | 216 } |
| 217 | 217 |
| 218 bool IsPartialRasterEnabled() { | 218 bool IsPartialRasterEnabled() { |
| 219 // Zero copy currently doesn't take advantage of partial raster. | 219 // Zero copy currently doesn't take advantage of partial raster. |
| 220 if (IsZeroCopyUploadEnabled()) | 220 if (IsZeroCopyUploadEnabled()) |
| 221 return false; | 221 return false; |
| 222 | 222 |
| 223 // TODO(dshwang): enable partial raster. crbug.com/492754 | 223 const auto& command_line = *base::CommandLine::ForCurrentProcess(); |
| 224 return false; | 224 return command_line.HasSwitch(switches::kEnablePartialRaster) && |
| 225 !command_line.HasSwitch(switches::kDisablePartialRaster); |
| 225 } | 226 } |
| 226 | 227 |
| 227 bool IsGpuMemoryBufferCompositorResourcesEnabled() { | 228 bool IsGpuMemoryBufferCompositorResourcesEnabled() { |
| 228 const base::CommandLine& command_line = | 229 const base::CommandLine& command_line = |
| 229 *base::CommandLine::ForCurrentProcess(); | 230 *base::CommandLine::ForCurrentProcess(); |
| 230 if (command_line.HasSwitch( | 231 if (command_line.HasSwitch( |
| 231 switches::kEnableGpuMemoryBufferCompositorResources)) { | 232 switches::kEnableGpuMemoryBufferCompositorResources)) { |
| 232 return true; | 233 return true; |
| 233 } | 234 } |
| 234 if (command_line.HasSwitch( | 235 if (command_line.HasSwitch( |
| (...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 394 } | 395 } |
| 395 } | 396 } |
| 396 return problem_list; | 397 return problem_list; |
| 397 } | 398 } |
| 398 | 399 |
| 399 std::vector<std::string> GetDriverBugWorkarounds() { | 400 std::vector<std::string> GetDriverBugWorkarounds() { |
| 400 return GpuDataManagerImpl::GetInstance()->GetDriverBugWorkarounds(); | 401 return GpuDataManagerImpl::GetInstance()->GetDriverBugWorkarounds(); |
| 401 } | 402 } |
| 402 | 403 |
| 403 } // namespace content | 404 } // namespace content |
| OLD | NEW |