| 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 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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; |
| 227 | 227 |
| 228 if (IsGpuRasterizationBlacklisted()) { | 228 if (IsGpuRasterizationBlacklisted()) { |
| 229 return false; | 229 return false; |
| 230 } | 230 } |
| 231 | 231 |
| 232 #if defined(OS_ANDROID) || defined(OS_MACOSX) | 232 #if defined(OS_ANDROID) |
| 233 return true; | 233 return true; |
| 234 #endif | 234 #endif |
| 235 | 235 |
| 236 // explicitly disable GPU rasterization on all non-android and non-mac devices | 236 // explicitly disable GPU rasterization on all non-android devices until we |
| 237 // until we have full test coverage. | 237 // have full test coverage. |
| 238 return false; | 238 return false; |
| 239 } | 239 } |
| 240 | 240 |
| 241 bool IsForceGpuRasterizationEnabled() { | 241 bool IsForceGpuRasterizationEnabled() { |
| 242 const base::CommandLine& command_line = | 242 const base::CommandLine& command_line = |
| 243 *base::CommandLine::ForCurrentProcess(); | 243 *base::CommandLine::ForCurrentProcess(); |
| 244 return command_line.HasSwitch(switches::kForceGpuRasterization); | 244 return command_line.HasSwitch(switches::kForceGpuRasterization); |
| 245 } | 245 } |
| 246 | 246 |
| 247 int GpuRasterizationMSAASampleCount() { | 247 int GpuRasterizationMSAASampleCount() { |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 363 } | 363 } |
| 364 } | 364 } |
| 365 return problem_list; | 365 return problem_list; |
| 366 } | 366 } |
| 367 | 367 |
| 368 std::vector<std::string> GetDriverBugWorkarounds() { | 368 std::vector<std::string> GetDriverBugWorkarounds() { |
| 369 return GpuDataManagerImpl::GetInstance()->GetDriverBugWorkarounds(); | 369 return GpuDataManagerImpl::GetInstance()->GetDriverBugWorkarounds(); |
| 370 } | 370 } |
| 371 | 371 |
| 372 } // namespace content | 372 } // namespace content |
| OLD | NEW |