| 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 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 212 return !command_line.HasSwitch(switches::kDisableZeroCopy); | 212 return !command_line.HasSwitch(switches::kDisableZeroCopy); |
| 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 const auto& command_line = *base::CommandLine::ForCurrentProcess(); | 222 |
| 223 return !command_line.HasSwitch(switches::kDisablePartialRaster); | 223 // TODO(dshwang): enable partial raster. crbug.com/492754 |
| 224 return false; |
| 224 } | 225 } |
| 225 | 226 |
| 226 bool IsGpuMemoryBufferCompositorResourcesEnabled() { | 227 bool IsGpuMemoryBufferCompositorResourcesEnabled() { |
| 227 const base::CommandLine& command_line = | 228 const base::CommandLine& command_line = |
| 228 *base::CommandLine::ForCurrentProcess(); | 229 *base::CommandLine::ForCurrentProcess(); |
| 229 if (command_line.HasSwitch( | 230 if (command_line.HasSwitch( |
| 230 switches::kEnableGpuMemoryBufferCompositorResources)) { | 231 switches::kEnableGpuMemoryBufferCompositorResources)) { |
| 231 return true; | 232 return true; |
| 232 } | 233 } |
| 233 if (command_line.HasSwitch( | 234 if (command_line.HasSwitch( |
| (...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 393 } | 394 } |
| 394 } | 395 } |
| 395 return problem_list; | 396 return problem_list; |
| 396 } | 397 } |
| 397 | 398 |
| 398 std::vector<std::string> GetDriverBugWorkarounds() { | 399 std::vector<std::string> GetDriverBugWorkarounds() { |
| 399 return GpuDataManagerImpl::GetInstance()->GetDriverBugWorkarounds(); | 400 return GpuDataManagerImpl::GetInstance()->GetDriverBugWorkarounds(); |
| 400 } | 401 } |
| 401 | 402 |
| 402 } // namespace content | 403 } // namespace content |
| OLD | NEW |