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(const gpu::GPUInfo::GPUDevice& device, | 9 void EnumerateGPUDevice(const gpu::GPUInfo::GPUDevice& device, |
10 gpu::GPUInfo::Enumerator* enumerator) { | 10 gpu::GPUInfo::Enumerator* enumerator) { |
(...skipping 28 matching lines...) Expand all Loading... |
39 enumerator->AddInt("maxFramerateNumerator", profile.max_framerate_numerator); | 39 enumerator->AddInt("maxFramerateNumerator", profile.max_framerate_numerator); |
40 enumerator->AddInt("maxFramerateDenominator", | 40 enumerator->AddInt("maxFramerateDenominator", |
41 profile.max_framerate_denominator); | 41 profile.max_framerate_denominator); |
42 enumerator->EndVideoEncodeAcceleratorSupportedProfile(); | 42 enumerator->EndVideoEncodeAcceleratorSupportedProfile(); |
43 } | 43 } |
44 | 44 |
45 } // namespace | 45 } // namespace |
46 | 46 |
47 namespace gpu { | 47 namespace gpu { |
48 | 48 |
| 49 VideoDecodeAcceleratorCapabilities::VideoDecodeAcceleratorCapabilities() |
| 50 : flags(0) {} |
| 51 |
| 52 VideoDecodeAcceleratorCapabilities::~VideoDecodeAcceleratorCapabilities() {} |
| 53 |
49 GPUInfo::GPUDevice::GPUDevice() | 54 GPUInfo::GPUDevice::GPUDevice() |
50 : vendor_id(0), | 55 : vendor_id(0), |
51 device_id(0), | 56 device_id(0), |
52 active(false) { | 57 active(false) { |
53 } | 58 } |
54 | 59 |
55 GPUInfo::GPUDevice::~GPUDevice() { } | 60 GPUInfo::GPUDevice::~GPUDevice() { } |
56 | 61 |
57 GPUInfo::GPUInfo() | 62 GPUInfo::GPUInfo() |
58 : optimus(false), | 63 : optimus(false), |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 bool direct_rendering; | 112 bool direct_rendering; |
108 bool sandboxed; | 113 bool sandboxed; |
109 int process_crash_count; | 114 int process_crash_count; |
110 bool in_process_gpu; | 115 bool in_process_gpu; |
111 CollectInfoResult basic_info_state; | 116 CollectInfoResult basic_info_state; |
112 CollectInfoResult context_info_state; | 117 CollectInfoResult context_info_state; |
113 #if defined(OS_WIN) | 118 #if defined(OS_WIN) |
114 CollectInfoResult dx_diagnostics_info_state; | 119 CollectInfoResult dx_diagnostics_info_state; |
115 DxDiagNode dx_diagnostics; | 120 DxDiagNode dx_diagnostics; |
116 #endif | 121 #endif |
117 VideoDecodeAcceleratorSupportedProfiles | 122 VideoDecodeAcceleratorCapabilities video_decode_accelerator_capabilities; |
118 video_decode_accelerator_supported_profiles; | |
119 VideoEncodeAcceleratorSupportedProfiles | 123 VideoEncodeAcceleratorSupportedProfiles |
120 video_encode_accelerator_supported_profiles; | 124 video_encode_accelerator_supported_profiles; |
121 bool jpeg_decode_accelerator_supported; | 125 bool jpeg_decode_accelerator_supported; |
122 }; | 126 }; |
123 | 127 |
124 // If this assert fails then most likely something below needs to be updated. | 128 // If this assert fails then most likely something below needs to be updated. |
125 // Note that this assert is only approximate. If a new field is added to | 129 // Note that this assert is only approximate. If a new field is added to |
126 // GPUInfo which fits within the current padding then it will not be caught. | 130 // GPUInfo which fits within the current padding then it will not be caught. |
127 static_assert( | 131 static_assert( |
128 sizeof(GPUInfo) == sizeof(GPUInfoKnownFields), | 132 sizeof(GPUInfo) == sizeof(GPUInfoKnownFields), |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
168 enumerator->AddBool("directRendering", direct_rendering); | 172 enumerator->AddBool("directRendering", direct_rendering); |
169 enumerator->AddBool("sandboxed", sandboxed); | 173 enumerator->AddBool("sandboxed", sandboxed); |
170 enumerator->AddInt("processCrashCount", process_crash_count); | 174 enumerator->AddInt("processCrashCount", process_crash_count); |
171 enumerator->AddBool("inProcessGpu", in_process_gpu); | 175 enumerator->AddBool("inProcessGpu", in_process_gpu); |
172 enumerator->AddInt("basicInfoState", basic_info_state); | 176 enumerator->AddInt("basicInfoState", basic_info_state); |
173 enumerator->AddInt("contextInfoState", context_info_state); | 177 enumerator->AddInt("contextInfoState", context_info_state); |
174 #if defined(OS_WIN) | 178 #if defined(OS_WIN) |
175 enumerator->AddInt("DxDiagnosticsInfoState", dx_diagnostics_info_state); | 179 enumerator->AddInt("DxDiagnosticsInfoState", dx_diagnostics_info_state); |
176 #endif | 180 #endif |
177 // TODO(kbr): add dx_diagnostics on Windows. | 181 // TODO(kbr): add dx_diagnostics on Windows. |
178 for (const auto& profile : video_decode_accelerator_supported_profiles) | 182 enumerator->AddInt("videoDecodeAcceleratorFlags", |
| 183 video_decode_accelerator_capabilities.flags); |
| 184 for (const auto& profile : |
| 185 video_decode_accelerator_capabilities.supported_profiles) |
179 EnumerateVideoDecodeAcceleratorSupportedProfile(profile, enumerator); | 186 EnumerateVideoDecodeAcceleratorSupportedProfile(profile, enumerator); |
180 for (const auto& profile : video_encode_accelerator_supported_profiles) | 187 for (const auto& profile : video_encode_accelerator_supported_profiles) |
181 EnumerateVideoEncodeAcceleratorSupportedProfile(profile, enumerator); | 188 EnumerateVideoEncodeAcceleratorSupportedProfile(profile, enumerator); |
182 enumerator->AddBool("jpegDecodeAcceleratorSupported", | 189 enumerator->AddBool("jpegDecodeAcceleratorSupported", |
183 jpeg_decode_accelerator_supported); | 190 jpeg_decode_accelerator_supported); |
184 enumerator->EndAuxAttributes(); | 191 enumerator->EndAuxAttributes(); |
185 } | 192 } |
186 | 193 |
187 } // namespace gpu | 194 } // namespace gpu |
OLD | NEW |