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 #include "gpu/config/gpu_info.h" | 5 #include "gpu/config/gpu_info.h" |
6 | 6 |
7 namespace { | 7 namespace { |
8 | 8 |
9 void EnumerateGPUDevice(gpu::GPUInfo::Enumerator* enumerator, | 9 void EnumerateGPUDevice(gpu::GPUInfo::Enumerator* enumerator, |
10 const gpu::GPUInfo::GPUDevice& device) { | 10 const gpu::GPUInfo::GPUDevice& device) { |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 bool lenovo_dcute; | 53 bool lenovo_dcute; |
54 Version display_link_version; | 54 Version display_link_version; |
55 GPUDevice gpu; | 55 GPUDevice gpu; |
56 std::vector<GPUDevice> secondary_gpus; | 56 std::vector<GPUDevice> secondary_gpus; |
57 uint64 adapter_luid; | 57 uint64 adapter_luid; |
58 std::string driver_vendor; | 58 std::string driver_vendor; |
59 std::string driver_version; | 59 std::string driver_version; |
60 std::string driver_date; | 60 std::string driver_date; |
61 std::string pixel_shader_version; | 61 std::string pixel_shader_version; |
62 std::string vertex_shader_version; | 62 std::string vertex_shader_version; |
63 std::string machine_model; | 63 std::string machine_model_name; |
| 64 std::string machine_model_version; |
64 std::string gl_version; | 65 std::string gl_version; |
65 std::string gl_version_string; | 66 std::string gl_version_string; |
66 std::string gl_vendor; | 67 std::string gl_vendor; |
67 std::string gl_renderer; | 68 std::string gl_renderer; |
68 std::string gl_extensions; | 69 std::string gl_extensions; |
69 std::string gl_ws_vendor; | 70 std::string gl_ws_vendor; |
70 std::string gl_ws_version; | 71 std::string gl_ws_version; |
71 std::string gl_ws_extensions; | 72 std::string gl_ws_extensions; |
72 uint32 gl_reset_notification_strategy; | 73 uint32 gl_reset_notification_strategy; |
73 bool can_lose_context; | 74 bool can_lose_context; |
74 GpuPerformanceStats performance_stats; | 75 GpuPerformanceStats performance_stats; |
75 bool software_rendering; | 76 bool software_rendering; |
76 bool direct_rendering; | 77 bool direct_rendering; |
77 bool sandboxed; | 78 bool sandboxed; |
78 #if defined(OS_WIN) | 79 #if defined(OS_WIN) |
79 DxDiagNode dx_diagnostics; | 80 DxDiagNode dx_diagnostics; |
80 #endif | 81 #endif |
81 }; | 82 }; |
82 | 83 |
83 // If this assert fails then most likely something below needs to be updated. | 84 // If this assert fails then most likely something below needs to be updated. |
84 // Note that this assert is only approximate. If a new field is added to | 85 // Note that this assert is only approximate. If a new field is added to |
85 // GPUInfo which fits within the current padding then it will not be caught. | 86 // GPUInfo which fits within the current padding then it will not be caught. |
86 COMPILE_ASSERT( | 87 COMPILE_ASSERT( |
87 sizeof(GPUInfo) == sizeof(GPUInfoKnownFields), | 88 sizeof(GPUInfo) == sizeof(GPUInfoKnownFields), |
88 Fields_Have_Changed_In_GPUInfo_So_Update_Below); | 89 Fields_Have_Changed_In_GPUInfo_So_Update_Below); |
89 | 90 |
90 // Required fields (according to DevTools protocol) first. | 91 // Required fields (according to DevTools protocol) first. |
91 enumerator->AddString("machineModel", machine_model); | 92 enumerator->AddString("machineModelName", machine_model_name); |
| 93 enumerator->AddString("machineModelVersion", machine_model_version); |
92 EnumerateGPUDevice(enumerator, gpu); | 94 EnumerateGPUDevice(enumerator, gpu); |
93 for (size_t ii = 0; ii < secondary_gpus.size(); ++ii) { | 95 for (size_t ii = 0; ii < secondary_gpus.size(); ++ii) { |
94 EnumerateGPUDevice(enumerator, secondary_gpus[ii]); | 96 EnumerateGPUDevice(enumerator, secondary_gpus[ii]); |
95 } | 97 } |
96 | 98 |
97 enumerator->BeginAuxAttributes(); | 99 enumerator->BeginAuxAttributes(); |
98 enumerator->AddBool("finalized", finalized); | 100 enumerator->AddBool("finalized", finalized); |
99 enumerator->AddTimeDeltaInSecondsF("initializationTime", | 101 enumerator->AddTimeDeltaInSecondsF("initializationTime", |
100 initialization_time); | 102 initialization_time); |
101 enumerator->AddBool("optimus", optimus); | 103 enumerator->AddBool("optimus", optimus); |
(...skipping 23 matching lines...) Expand all Loading... |
125 enumerator->AddBool("can_lose_context", can_lose_context); | 127 enumerator->AddBool("can_lose_context", can_lose_context); |
126 // TODO(kbr): add performance_stats. | 128 // TODO(kbr): add performance_stats. |
127 enumerator->AddBool("softwareRendering", software_rendering); | 129 enumerator->AddBool("softwareRendering", software_rendering); |
128 enumerator->AddBool("directRendering", direct_rendering); | 130 enumerator->AddBool("directRendering", direct_rendering); |
129 enumerator->AddBool("sandboxed", sandboxed); | 131 enumerator->AddBool("sandboxed", sandboxed); |
130 // TODO(kbr): add dx_diagnostics on Windows. | 132 // TODO(kbr): add dx_diagnostics on Windows. |
131 enumerator->EndAuxAttributes(); | 133 enumerator->EndAuxAttributes(); |
132 } | 134 } |
133 | 135 |
134 } // namespace gpu | 136 } // namespace gpu |
OLD | NEW |