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 <stdint.h> | 5 #include <stdint.h> |
6 | 6 |
7 #include "gpu/config/gpu_info.h" | 7 #include "gpu/config/gpu_info.h" |
8 | 8 |
9 namespace { | 9 namespace { |
10 | 10 |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 } | 64 } |
65 | 65 |
66 GPUInfo::GPUDevice::~GPUDevice() { } | 66 GPUInfo::GPUDevice::~GPUDevice() { } |
67 | 67 |
68 GPUInfo::GPUInfo() | 68 GPUInfo::GPUInfo() |
69 : optimus(false), | 69 : optimus(false), |
70 amd_switchable(false), | 70 amd_switchable(false), |
71 lenovo_dcute(false), | 71 lenovo_dcute(false), |
72 adapter_luid(0), | 72 adapter_luid(0), |
73 gl_reset_notification_strategy(0), | 73 gl_reset_notification_strategy(0), |
74 can_lose_context(false), | |
75 software_rendering(false), | 74 software_rendering(false), |
76 direct_rendering(true), | 75 direct_rendering(true), |
77 sandboxed(false), | 76 sandboxed(false), |
78 process_crash_count(0), | 77 process_crash_count(0), |
79 in_process_gpu(true), | 78 in_process_gpu(true), |
80 basic_info_state(kCollectInfoNone), | 79 basic_info_state(kCollectInfoNone), |
81 context_info_state(kCollectInfoNone), | 80 context_info_state(kCollectInfoNone), |
82 #if defined(OS_WIN) | 81 #if defined(OS_WIN) |
83 dx_diagnostics_info_state(kCollectInfoNone), | 82 dx_diagnostics_info_state(kCollectInfoNone), |
84 #endif | 83 #endif |
(...skipping 23 matching lines...) Expand all Loading... |
108 std::string machine_model_name; | 107 std::string machine_model_name; |
109 std::string machine_model_version; | 108 std::string machine_model_version; |
110 std::string gl_version_string; | 109 std::string gl_version_string; |
111 std::string gl_vendor; | 110 std::string gl_vendor; |
112 std::string gl_renderer; | 111 std::string gl_renderer; |
113 std::string gl_extensions; | 112 std::string gl_extensions; |
114 std::string gl_ws_vendor; | 113 std::string gl_ws_vendor; |
115 std::string gl_ws_version; | 114 std::string gl_ws_version; |
116 std::string gl_ws_extensions; | 115 std::string gl_ws_extensions; |
117 uint32_t gl_reset_notification_strategy; | 116 uint32_t gl_reset_notification_strategy; |
118 bool can_lose_context; | |
119 bool software_rendering; | 117 bool software_rendering; |
120 bool direct_rendering; | 118 bool direct_rendering; |
121 bool sandboxed; | 119 bool sandboxed; |
122 int process_crash_count; | 120 int process_crash_count; |
123 bool in_process_gpu; | 121 bool in_process_gpu; |
124 CollectInfoResult basic_info_state; | 122 CollectInfoResult basic_info_state; |
125 CollectInfoResult context_info_state; | 123 CollectInfoResult context_info_state; |
126 #if defined(OS_WIN) | 124 #if defined(OS_WIN) |
127 CollectInfoResult dx_diagnostics_info_state; | 125 CollectInfoResult dx_diagnostics_info_state; |
128 DxDiagNode dx_diagnostics; | 126 DxDiagNode dx_diagnostics; |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
167 enumerator->AddString("glVersion", gl_version); | 165 enumerator->AddString("glVersion", gl_version); |
168 enumerator->AddString("glVendor", gl_vendor); | 166 enumerator->AddString("glVendor", gl_vendor); |
169 enumerator->AddString("glRenderer", gl_renderer); | 167 enumerator->AddString("glRenderer", gl_renderer); |
170 enumerator->AddString("glExtensions", gl_extensions); | 168 enumerator->AddString("glExtensions", gl_extensions); |
171 enumerator->AddString("glWsVendor", gl_ws_vendor); | 169 enumerator->AddString("glWsVendor", gl_ws_vendor); |
172 enumerator->AddString("glWsVersion", gl_ws_version); | 170 enumerator->AddString("glWsVersion", gl_ws_version); |
173 enumerator->AddString("glWsExtensions", gl_ws_extensions); | 171 enumerator->AddString("glWsExtensions", gl_ws_extensions); |
174 enumerator->AddInt( | 172 enumerator->AddInt( |
175 "glResetNotificationStrategy", | 173 "glResetNotificationStrategy", |
176 static_cast<int>(gl_reset_notification_strategy)); | 174 static_cast<int>(gl_reset_notification_strategy)); |
177 enumerator->AddBool("can_lose_context", can_lose_context); | |
178 // TODO(kbr): add performance_stats. | 175 // TODO(kbr): add performance_stats. |
179 enumerator->AddBool("softwareRendering", software_rendering); | 176 enumerator->AddBool("softwareRendering", software_rendering); |
180 enumerator->AddBool("directRendering", direct_rendering); | 177 enumerator->AddBool("directRendering", direct_rendering); |
181 enumerator->AddBool("sandboxed", sandboxed); | 178 enumerator->AddBool("sandboxed", sandboxed); |
182 enumerator->AddInt("processCrashCount", process_crash_count); | 179 enumerator->AddInt("processCrashCount", process_crash_count); |
183 enumerator->AddBool("inProcessGpu", in_process_gpu); | 180 enumerator->AddBool("inProcessGpu", in_process_gpu); |
184 enumerator->AddInt("basicInfoState", basic_info_state); | 181 enumerator->AddInt("basicInfoState", basic_info_state); |
185 enumerator->AddInt("contextInfoState", context_info_state); | 182 enumerator->AddInt("contextInfoState", context_info_state); |
186 #if defined(OS_WIN) | 183 #if defined(OS_WIN) |
187 enumerator->AddInt("DxDiagnosticsInfoState", dx_diagnostics_info_state); | 184 enumerator->AddInt("DxDiagnosticsInfoState", dx_diagnostics_info_state); |
188 #endif | 185 #endif |
189 // TODO(kbr): add dx_diagnostics on Windows. | 186 // TODO(kbr): add dx_diagnostics on Windows. |
190 enumerator->AddInt("videoDecodeAcceleratorFlags", | 187 enumerator->AddInt("videoDecodeAcceleratorFlags", |
191 video_decode_accelerator_capabilities.flags); | 188 video_decode_accelerator_capabilities.flags); |
192 for (const auto& profile : | 189 for (const auto& profile : |
193 video_decode_accelerator_capabilities.supported_profiles) | 190 video_decode_accelerator_capabilities.supported_profiles) |
194 EnumerateVideoDecodeAcceleratorSupportedProfile(profile, enumerator); | 191 EnumerateVideoDecodeAcceleratorSupportedProfile(profile, enumerator); |
195 for (const auto& profile : video_encode_accelerator_supported_profiles) | 192 for (const auto& profile : video_encode_accelerator_supported_profiles) |
196 EnumerateVideoEncodeAcceleratorSupportedProfile(profile, enumerator); | 193 EnumerateVideoEncodeAcceleratorSupportedProfile(profile, enumerator); |
197 enumerator->AddBool("jpegDecodeAcceleratorSupported", | 194 enumerator->AddBool("jpegDecodeAcceleratorSupported", |
198 jpeg_decode_accelerator_supported); | 195 jpeg_decode_accelerator_supported); |
199 enumerator->EndAuxAttributes(); | 196 enumerator->EndAuxAttributes(); |
200 } | 197 } |
201 | 198 |
202 } // namespace gpu | 199 } // namespace gpu |
OLD | NEW |