| OLD | NEW |
| (Empty) |
| 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. | |
| 4 | |
| 5 #ifndef CONTENT_PUBLIC_COMMON_GPU_INFO_H_ | |
| 6 #define CONTENT_PUBLIC_COMMON_GPU_INFO_H_ | |
| 7 | |
| 8 // Provides access to the GPU information for the system | |
| 9 // on which chrome is currently running. | |
| 10 | |
| 11 #include <string> | |
| 12 #include <vector> | |
| 13 | |
| 14 #include "base/basictypes.h" | |
| 15 #include "base/time.h" | |
| 16 #include "base/version.h" | |
| 17 #include "build/build_config.h" | |
| 18 #include "content/common/content_export.h" | |
| 19 #include "content/public/common/dx_diag_node.h" | |
| 20 #include "content/public/common/gpu_performance_stats.h" | |
| 21 | |
| 22 namespace content { | |
| 23 | |
| 24 struct CONTENT_EXPORT GPUInfo { | |
| 25 struct CONTENT_EXPORT GPUDevice { | |
| 26 GPUDevice(); | |
| 27 ~GPUDevice(); | |
| 28 | |
| 29 // The DWORD (uint32) representing the graphics card vendor id. | |
| 30 uint32 vendor_id; | |
| 31 | |
| 32 // The DWORD (uint32) representing the graphics card device id. | |
| 33 // Device ids are unique to vendor, not to one another. | |
| 34 uint32 device_id; | |
| 35 | |
| 36 // The strings that describe the GPU. | |
| 37 // In Linux these strings are obtained through libpci. | |
| 38 // In Win/MacOSX, these two strings are not filled at the moment. | |
| 39 std::string vendor_string; | |
| 40 std::string device_string; | |
| 41 }; | |
| 42 | |
| 43 GPUInfo(); | |
| 44 ~GPUInfo(); | |
| 45 | |
| 46 // Whether more GPUInfo fields might be collected in the future. | |
| 47 bool finalized; | |
| 48 | |
| 49 // The amount of time taken to get from the process starting to the message | |
| 50 // loop being pumped. | |
| 51 base::TimeDelta initialization_time; | |
| 52 | |
| 53 // Computer has NVIDIA Optimus | |
| 54 bool optimus; | |
| 55 | |
| 56 // Computer has AMD Dynamic Switchable Graphics | |
| 57 bool amd_switchable; | |
| 58 | |
| 59 // Lenovo dCute is installed. http://crbug.com/181665. | |
| 60 bool lenovo_dcute; | |
| 61 | |
| 62 // Version of DisplayLink driver installed. Zero if not installed. | |
| 63 // http://crbug.com/177611. | |
| 64 Version display_link_version; | |
| 65 | |
| 66 // Primary GPU, for exmaple, the discrete GPU in a dual GPU machine. | |
| 67 GPUDevice gpu; | |
| 68 | |
| 69 // Secondary GPUs, for example, the integrated GPU in a dual GPU machine. | |
| 70 std::vector<GPUDevice> secondary_gpus; | |
| 71 | |
| 72 // The vendor of the graphics driver currently installed. | |
| 73 std::string driver_vendor; | |
| 74 | |
| 75 // The version of the graphics driver currently installed. | |
| 76 std::string driver_version; | |
| 77 | |
| 78 // The date of the graphics driver currently installed. | |
| 79 std::string driver_date; | |
| 80 | |
| 81 // The version of the pixel/fragment shader used by the gpu. | |
| 82 std::string pixel_shader_version; | |
| 83 | |
| 84 // The version of the vertex shader used by the gpu. | |
| 85 std::string vertex_shader_version; | |
| 86 | |
| 87 // The machine model identifier with format "name major.minor". | |
| 88 // Name should not contain any whitespaces. | |
| 89 std::string machine_model; | |
| 90 | |
| 91 // The version of OpenGL we are using. | |
| 92 // TODO(zmo): should be able to tell if it's GL or GLES. | |
| 93 std::string gl_version; | |
| 94 | |
| 95 // The GL_VERSION string. "" if we are not using OpenGL. | |
| 96 std::string gl_version_string; | |
| 97 | |
| 98 // The GL_VENDOR string. "" if we are not using OpenGL. | |
| 99 std::string gl_vendor; | |
| 100 | |
| 101 // The GL_RENDERER string. "" if we are not using OpenGL. | |
| 102 std::string gl_renderer; | |
| 103 | |
| 104 // The GL_EXTENSIONS string. "" if we are not using OpenGL. | |
| 105 std::string gl_extensions; | |
| 106 | |
| 107 // The device semantics, i.e. whether the Vista and Windows 7 specific | |
| 108 // semantics are available. | |
| 109 bool can_lose_context; | |
| 110 | |
| 111 // Whether gpu or driver is accessible. | |
| 112 bool gpu_accessible; | |
| 113 | |
| 114 // By default all values are 0. | |
| 115 GpuPerformanceStats performance_stats; | |
| 116 | |
| 117 bool software_rendering; | |
| 118 | |
| 119 // Whether the gpu process is running in a sandbox. | |
| 120 bool sandboxed; | |
| 121 | |
| 122 #if defined(OS_WIN) | |
| 123 // The information returned by the DirectX Diagnostics Tool. | |
| 124 DxDiagNode dx_diagnostics; | |
| 125 #endif | |
| 126 }; | |
| 127 | |
| 128 } // namespace content | |
| 129 | |
| 130 #endif // CONTENT_PUBLIC_COMMON_GPU_INFO_H_ | |
| OLD | NEW |