| 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 #ifndef GPU_CONFIG_GPU_INFO_COLLECTOR_H_ | 5 #ifndef GPU_CONFIG_GPU_INFO_COLLECTOR_H_ |
| 6 #define GPU_CONFIG_GPU_INFO_COLLECTOR_H_ | 6 #define GPU_CONFIG_GPU_INFO_COLLECTOR_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "build/build_config.h" | 9 #include "build/build_config.h" |
| 10 #include "gpu/config/gpu_info.h" | 10 #include "gpu/config/gpu_info.h" |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 // The subset each platform collects may be different. | 39 // The subset each platform collects may be different. |
| 40 GPU_EXPORT CollectInfoResult CollectBasicGraphicsInfo(GPUInfo* gpu_info); | 40 GPU_EXPORT CollectInfoResult CollectBasicGraphicsInfo(GPUInfo* gpu_info); |
| 41 | 41 |
| 42 // Create a GL/DirectX context and collect related info. | 42 // Create a GL/DirectX context and collect related info. |
| 43 // This is called at GPU process startup time. | 43 // This is called at GPU process startup time. |
| 44 GPU_EXPORT CollectInfoResult CollectContextGraphicsInfo(GPUInfo* gpu_info); | 44 GPU_EXPORT CollectInfoResult CollectContextGraphicsInfo(GPUInfo* gpu_info); |
| 45 | 45 |
| 46 #if defined(OS_WIN) | 46 #if defined(OS_WIN) |
| 47 // Collect the DirectX Disagnostics information about the attached displays. | 47 // Collect the DirectX Disagnostics information about the attached displays. |
| 48 GPU_EXPORT bool GetDxDiagnostics(DxDiagNode* output); | 48 GPU_EXPORT bool GetDxDiagnostics(DxDiagNode* output); |
| 49 |
| 50 GPU_EXPORT bool ShouldFallbackToWarp(); |
| 51 |
| 52 GPU_EXPORT void SetShouldFallbackToWarp(bool enable); |
| 49 #endif // OS_WIN | 53 #endif // OS_WIN |
| 50 | 54 |
| 51 // Create a GL context and collect GL strings and versions. | 55 // Create a GL context and collect GL strings and versions. |
| 52 GPU_EXPORT CollectInfoResult CollectGraphicsInfoGL(GPUInfo* gpu_info); | 56 GPU_EXPORT CollectInfoResult CollectGraphicsInfoGL(GPUInfo* gpu_info); |
| 53 | 57 |
| 54 // Each platform stores the driver version on the GL_VERSION string differently | 58 // Each platform stores the driver version on the GL_VERSION string differently |
| 55 GPU_EXPORT CollectInfoResult CollectDriverInfoGL(GPUInfo* gpu_info); | 59 GPU_EXPORT CollectInfoResult CollectDriverInfoGL(GPUInfo* gpu_info); |
| 56 | 60 |
| 57 // Merge GPUInfo from CollectContextGraphicsInfo into basic GPUInfo. | 61 // Merge GPUInfo from CollectContextGraphicsInfo into basic GPUInfo. |
| 58 // This is platform specific, depending on which info are collected at which | 62 // This is platform specific, depending on which info are collected at which |
| 59 // stage. | 63 // stage. |
| 60 GPU_EXPORT void MergeGPUInfo(GPUInfo* basic_gpu_info, | 64 GPU_EXPORT void MergeGPUInfo(GPUInfo* basic_gpu_info, |
| 61 const GPUInfo& context_gpu_info); | 65 const GPUInfo& context_gpu_info); |
| 62 | 66 |
| 63 // MergeGPUInfo() when GL driver is used. | 67 // MergeGPUInfo() when GL driver is used. |
| 64 GPU_EXPORT void MergeGPUInfoGL(GPUInfo* basic_gpu_info, | 68 GPU_EXPORT void MergeGPUInfoGL(GPUInfo* basic_gpu_info, |
| 65 const GPUInfo& context_gpu_info); | 69 const GPUInfo& context_gpu_info); |
| 66 | 70 |
| 67 } // namespace gpu | 71 } // namespace gpu |
| 68 | 72 |
| 69 #endif // GPU_CONFIG_GPU_INFO_COLLECTOR_H_ | 73 #endif // GPU_CONFIG_GPU_INFO_COLLECTOR_H_ |
| OLD | NEW |