[iOS] Cleanup ios/chrome/ios_chrome.gyp
[chromium-blink-merge.git] / gpu / config / gpu_info_collector.h
blobad3ae95385309fd84ec9d5f93ffc979629acec11
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
3 // found in the LICENSE file.
5 #ifndef GPU_CONFIG_GPU_INFO_COLLECTOR_H_
6 #define GPU_CONFIG_GPU_INFO_COLLECTOR_H_
8 #include "base/basictypes.h"
9 #include "build/build_config.h"
10 #include "gpu/config/gpu_info.h"
11 #include "gpu/gpu_export.h"
13 namespace gpu {
15 // Collect GPU vendor_id and device ID.
16 GPU_EXPORT CollectInfoResult CollectGpuID(uint32* vendor_id, uint32* device_id);
18 // Collects basic GPU info without creating a GL/DirectX context (and without
19 // the danger of crashing), including vendor_id and device_id.
20 // This is called at browser process startup time.
21 // The subset each platform collects may be different.
22 GPU_EXPORT CollectInfoResult CollectBasicGraphicsInfo(GPUInfo* gpu_info);
24 // Create a GL/DirectX context and collect related info.
25 // This is called at GPU process startup time.
26 GPU_EXPORT CollectInfoResult CollectContextGraphicsInfo(GPUInfo* gpu_info);
28 #if defined(OS_WIN)
29 // Collect the DirectX Disagnostics information about the attached displays.
30 GPU_EXPORT bool GetDxDiagnostics(DxDiagNode* output);
31 #endif // OS_WIN
33 // Create a GL context and collect GL strings and versions.
34 GPU_EXPORT CollectInfoResult CollectGraphicsInfoGL(GPUInfo* gpu_info);
36 // Each platform stores the driver version on the GL_VERSION string differently
37 GPU_EXPORT CollectInfoResult CollectDriverInfoGL(GPUInfo* gpu_info);
39 // Merge GPUInfo from CollectContextGraphicsInfo into basic GPUInfo.
40 // This is platform specific, depending on which info are collected at which
41 // stage.
42 GPU_EXPORT void MergeGPUInfo(GPUInfo* basic_gpu_info,
43 const GPUInfo& context_gpu_info);
45 // MergeGPUInfo() when GL driver is used.
46 GPU_EXPORT void MergeGPUInfoGL(GPUInfo* basic_gpu_info,
47 const GPUInfo& context_gpu_info);
49 } // namespace gpu
51 #endif // GPU_CONFIG_GPU_INFO_COLLECTOR_H_