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