| 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 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 233 if (!BrowserGpuMemoryBufferManager::IsNativeGpuMemoryBuffersEnabled()) | 233 if (!BrowserGpuMemoryBufferManager::IsNativeGpuMemoryBuffersEnabled()) |
| 234 return false; | 234 return false; |
| 235 | 235 |
| 236 // GPU rasterization does not support GL_TEXTURE_RECTANGLE_ARB, which is | 236 // GPU rasterization does not support GL_TEXTURE_RECTANGLE_ARB, which is |
| 237 // required by GpuMemoryBuffers on Mac. | 237 // required by GpuMemoryBuffers on Mac. |
| 238 // http://crbug.com/551072 | 238 // http://crbug.com/551072 |
| 239 if (IsForceGpuRasterizationEnabled() || IsGpuRasterizationEnabled()) | 239 if (IsForceGpuRasterizationEnabled() || IsGpuRasterizationEnabled()) |
| 240 return false; | 240 return false; |
| 241 | 241 |
| 242 #if defined(OS_MACOSX) | 242 #if defined(OS_MACOSX) |
| 243 return true; | 243 // Disabled due to increased crash rates. |
| 244 // http://crbug.com/554541 |
| 245 return false; |
| 244 #else | 246 #else |
| 245 return false; | 247 return false; |
| 246 #endif | 248 #endif |
| 247 } | 249 } |
| 248 | 250 |
| 249 bool IsGpuRasterizationEnabled() { | 251 bool IsGpuRasterizationEnabled() { |
| 250 const base::CommandLine& command_line = | 252 const base::CommandLine& command_line = |
| 251 *base::CommandLine::ForCurrentProcess(); | 253 *base::CommandLine::ForCurrentProcess(); |
| 252 | 254 |
| 253 if (command_line.HasSwitch(switches::kDisableGpuRasterization)) | 255 if (command_line.HasSwitch(switches::kDisableGpuRasterization)) |
| (...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 411 } | 413 } |
| 412 } | 414 } |
| 413 return problem_list; | 415 return problem_list; |
| 414 } | 416 } |
| 415 | 417 |
| 416 std::vector<std::string> GetDriverBugWorkarounds() { | 418 std::vector<std::string> GetDriverBugWorkarounds() { |
| 417 return GpuDataManagerImpl::GetInstance()->GetDriverBugWorkarounds(); | 419 return GpuDataManagerImpl::GetInstance()->GetDriverBugWorkarounds(); |
| 418 } | 420 } |
| 419 | 421 |
| 420 } // namespace content | 422 } // namespace content |
| OLD | NEW |