| 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 16 matching lines...) Expand all Loading... |
| 27 static bool IsGpuRasterizationBlacklisted() { | 27 static bool IsGpuRasterizationBlacklisted() { |
| 28 GpuDataManagerImpl* manager = GpuDataManagerImpl::GetInstance(); | 28 GpuDataManagerImpl* manager = GpuDataManagerImpl::GetInstance(); |
| 29 return manager->IsFeatureBlacklisted( | 29 return manager->IsFeatureBlacklisted( |
| 30 gpu::GPU_FEATURE_TYPE_GPU_RASTERIZATION); | 30 gpu::GPU_FEATURE_TYPE_GPU_RASTERIZATION); |
| 31 } | 31 } |
| 32 | 32 |
| 33 const char* kGpuCompositingFeatureName = "gpu_compositing"; | 33 const char* kGpuCompositingFeatureName = "gpu_compositing"; |
| 34 const char* kWebGLFeatureName = "webgl"; | 34 const char* kWebGLFeatureName = "webgl"; |
| 35 const char* kRasterizationFeatureName = "rasterization"; | 35 const char* kRasterizationFeatureName = "rasterization"; |
| 36 const char* kMultipleRasterThreadsFeatureName = "multiple_raster_threads"; | 36 const char* kMultipleRasterThreadsFeatureName = "multiple_raster_threads"; |
| 37 const char* kNativeGpuMemoryBuffersFeatureName = "native_gpu_memory_buffers"; |
| 37 | 38 |
| 38 const int kMinRasterThreads = 1; | 39 const int kMinRasterThreads = 1; |
| 39 const int kMaxRasterThreads = 4; | 40 const int kMaxRasterThreads = 4; |
| 40 | 41 |
| 41 const int kMinMSAASampleCount = 0; | 42 const int kMinMSAASampleCount = 0; |
| 42 | 43 |
| 43 struct GpuFeatureInfo { | 44 struct GpuFeatureInfo { |
| 44 std::string name; | 45 std::string name; |
| 45 bool blocked; | 46 bool blocked; |
| 46 bool disabled; | 47 bool disabled; |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 147 " or command line.", | 148 " or command line.", |
| 148 true | 149 true |
| 149 }, | 150 }, |
| 150 { | 151 { |
| 151 kMultipleRasterThreadsFeatureName, | 152 kMultipleRasterThreadsFeatureName, |
| 152 false, | 153 false, |
| 153 NumberOfRendererRasterThreads() == 1, | 154 NumberOfRendererRasterThreads() == 1, |
| 154 "Raster is using a single thread.", | 155 "Raster is using a single thread.", |
| 155 false | 156 false |
| 156 }, | 157 }, |
| 158 { |
| 159 kNativeGpuMemoryBuffersFeatureName, |
| 160 false, |
| 161 !BrowserGpuMemoryBufferManager::IsNativeGpuMemoryBuffersEnabled(), |
| 162 "Native GpuMemoryBuffers have been disabled, either via about:flags" |
| 163 " or command line.", |
| 164 true |
| 165 }, |
| 157 }; | 166 }; |
| 158 DCHECK(index < arraysize(kGpuFeatureInfo)); | 167 DCHECK(index < arraysize(kGpuFeatureInfo)); |
| 159 *eof = (index == arraysize(kGpuFeatureInfo) - 1); | 168 *eof = (index == arraysize(kGpuFeatureInfo) - 1); |
| 160 return kGpuFeatureInfo[index]; | 169 return kGpuFeatureInfo[index]; |
| 161 } | 170 } |
| 162 | 171 |
| 163 } // namespace | 172 } // namespace |
| 164 | 173 |
| 165 bool IsPropertyTreeVerificationEnabled() { | 174 bool IsPropertyTreeVerificationEnabled() { |
| 166 const base::CommandLine& command_line = | 175 const base::CommandLine& command_line = |
| (...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 396 } | 405 } |
| 397 } | 406 } |
| 398 return problem_list; | 407 return problem_list; |
| 399 } | 408 } |
| 400 | 409 |
| 401 std::vector<std::string> GetDriverBugWorkarounds() { | 410 std::vector<std::string> GetDriverBugWorkarounds() { |
| 402 return GpuDataManagerImpl::GetInstance()->GetDriverBugWorkarounds(); | 411 return GpuDataManagerImpl::GetInstance()->GetDriverBugWorkarounds(); |
| 403 } | 412 } |
| 404 | 413 |
| 405 } // namespace content | 414 } // namespace content |
| OLD | NEW |