| 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 <stdint.h> |
| 9 |
| 9 #include "build/build_config.h" | 10 #include "build/build_config.h" |
| 10 #include "gpu/config/gpu_info.h" | 11 #include "gpu/config/gpu_info.h" |
| 11 #include "gpu/gpu_export.h" | 12 #include "gpu/gpu_export.h" |
| 12 | 13 |
| 13 namespace gpu { | 14 namespace gpu { |
| 14 | 15 |
| 15 // Collect GPU vendor_id and device ID. | 16 // Collect GPU vendor_id and device ID. |
| 16 GPU_EXPORT CollectInfoResult CollectGpuID(uint32* vendor_id, uint32* device_id); | 17 GPU_EXPORT CollectInfoResult CollectGpuID(uint32_t* vendor_id, |
| 18 uint32_t* device_id); |
| 17 | 19 |
| 18 // Collects basic GPU info without creating a GL/DirectX context (and without | 20 // Collects basic GPU info without creating a GL/DirectX context (and without |
| 19 // the danger of crashing), including vendor_id and device_id. | 21 // the danger of crashing), including vendor_id and device_id. |
| 20 // This is called at browser process startup time. | 22 // This is called at browser process startup time. |
| 21 // The subset each platform collects may be different. | 23 // The subset each platform collects may be different. |
| 22 GPU_EXPORT CollectInfoResult CollectBasicGraphicsInfo(GPUInfo* gpu_info); | 24 GPU_EXPORT CollectInfoResult CollectBasicGraphicsInfo(GPUInfo* gpu_info); |
| 23 | 25 |
| 24 // Create a GL/DirectX context and collect related info. | 26 // Create a GL/DirectX context and collect related info. |
| 25 // This is called at GPU process startup time. | 27 // This is called at GPU process startup time. |
| 26 GPU_EXPORT CollectInfoResult CollectContextGraphicsInfo(GPUInfo* gpu_info); | 28 GPU_EXPORT CollectInfoResult CollectContextGraphicsInfo(GPUInfo* gpu_info); |
| (...skipping 19 matching lines...) Expand all Loading... |
| 46 GPU_EXPORT void MergeGPUInfoGL(GPUInfo* basic_gpu_info, | 48 GPU_EXPORT void MergeGPUInfoGL(GPUInfo* basic_gpu_info, |
| 47 const GPUInfo& context_gpu_info); | 49 const GPUInfo& context_gpu_info); |
| 48 | 50 |
| 49 // If more than one GPUs are identified, and GL strings are available, | 51 // If more than one GPUs are identified, and GL strings are available, |
| 50 // identify the active GPU based on GL strings. | 52 // identify the active GPU based on GL strings. |
| 51 GPU_EXPORT void IdentifyActiveGPU(GPUInfo* gpu_info); | 53 GPU_EXPORT void IdentifyActiveGPU(GPUInfo* gpu_info); |
| 52 | 54 |
| 53 } // namespace gpu | 55 } // namespace gpu |
| 54 | 56 |
| 55 #endif // GPU_CONFIG_GPU_INFO_COLLECTOR_H_ | 57 #endif // GPU_CONFIG_GPU_INFO_COLLECTOR_H_ |
| OLD | NEW |