| OLD | NEW |
| (Empty) |
| 1 // Copyright (c) 2006-2010 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. | |
| 4 | |
| 5 #ifndef CHROME_GPU_GPU_INFO_COLLECTOR_H__ | |
| 6 #define CHROME_GPU_GPU_INFO_COLLECTOR_H__ | |
| 7 #pragma once | |
| 8 | |
| 9 #include "base/basictypes.h" | |
| 10 #include "build/build_config.h" | |
| 11 #include "content/common/gpu_info.h" | |
| 12 | |
| 13 struct IDirect3D9; | |
| 14 | |
| 15 namespace gpu_info_collector { | |
| 16 | |
| 17 // Populate variables with necessary graphics card information. | |
| 18 // Returns true on success. | |
| 19 bool CollectGraphicsInfo(GPUInfo* gpu_info); | |
| 20 | |
| 21 // Similar to CollectGraphicsInfo, only this collects a subset of variables | |
| 22 // without creating a GL/DirectX context (and without the danger of crashing). | |
| 23 // The subset each platform collects may be different. | |
| 24 bool CollectPreliminaryGraphicsInfo(GPUInfo* gpu_info); | |
| 25 | |
| 26 #if defined(OS_WIN) | |
| 27 // Windows provides two ways of doing graphics so we need two ways of | |
| 28 // collecting info based on what's on a user's machine. | |
| 29 // The selection between the two methods is done in the cc file. | |
| 30 | |
| 31 // A D3D argument is passed in for testing purposes | |
| 32 bool CollectGraphicsInfoD3D(IDirect3D9* d3d, GPUInfo* gpu_info); | |
| 33 | |
| 34 // Collects D3D driver version/date through registry lookup. | |
| 35 // Note that this does not require a D3D context. | |
| 36 // device_id here is the raw data in DISPLAY_DEVICE. | |
| 37 bool CollectDriverInfoD3D(const std::wstring& device_id, GPUInfo* gpu_info); | |
| 38 | |
| 39 // Collect the DirectX Disagnostics information about the attached displays. | |
| 40 bool GetDxDiagnostics(DxDiagNode* output); | |
| 41 #endif | |
| 42 | |
| 43 // All platforms have a GL version for collecting information | |
| 44 bool CollectGraphicsInfoGL(GPUInfo* gpu_info); | |
| 45 | |
| 46 // Collect GL and Shading language version information | |
| 47 bool CollectGLVersionInfo(GPUInfo* gpu_info); | |
| 48 | |
| 49 // Platform specific method for collecting vendor and device ids | |
| 50 bool CollectVideoCardInfo(GPUInfo* gpu_info); | |
| 51 | |
| 52 // Each platform stores the driver version on the GL_VERSION string differently | |
| 53 bool CollectDriverInfoGL(GPUInfo* gpu_info); | |
| 54 | |
| 55 } // namespace gpu_info_collector | |
| 56 | |
| 57 #endif // CHROME_GPU_GPU_INFO_COLLECTOR_H__ | |
| OLD | NEW |