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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 CollectInfoResult dx_diagnostics_info_state; | 101 CollectInfoResult dx_diagnostics_info_state; |
102 DxDiagNode dx_diagnostics; | 102 DxDiagNode dx_diagnostics; |
103 #endif | 103 #endif |
104 std::vector<VideoEncodeAcceleratorSupportedProfile> | 104 std::vector<VideoEncodeAcceleratorSupportedProfile> |
105 video_encode_accelerator_supported_profiles; | 105 video_encode_accelerator_supported_profiles; |
106 }; | 106 }; |
107 | 107 |
108 // If this assert fails then most likely something below needs to be updated. | 108 // If this assert fails then most likely something below needs to be updated. |
109 // Note that this assert is only approximate. If a new field is added to | 109 // Note that this assert is only approximate. If a new field is added to |
110 // GPUInfo which fits within the current padding then it will not be caught. | 110 // GPUInfo which fits within the current padding then it will not be caught. |
111 COMPILE_ASSERT( | 111 static_assert( |
112 sizeof(GPUInfo) == sizeof(GPUInfoKnownFields), | 112 sizeof(GPUInfo) == sizeof(GPUInfoKnownFields), |
113 Fields_Have_Changed_In_GPUInfo_So_Update_Below); | 113 "fields have changed in GPUInfo, GPUInfoKnownFields must be updated"); |
114 | 114 |
115 // Required fields (according to DevTools protocol) first. | 115 // Required fields (according to DevTools protocol) first. |
116 enumerator->AddString("machineModelName", machine_model_name); | 116 enumerator->AddString("machineModelName", machine_model_name); |
117 enumerator->AddString("machineModelVersion", machine_model_version); | 117 enumerator->AddString("machineModelVersion", machine_model_version); |
118 EnumerateGPUDevice(enumerator, gpu); | 118 EnumerateGPUDevice(enumerator, gpu); |
119 for (size_t ii = 0; ii < secondary_gpus.size(); ++ii) { | 119 for (size_t ii = 0; ii < secondary_gpus.size(); ++ii) { |
120 EnumerateGPUDevice(enumerator, secondary_gpus[ii]); | 120 EnumerateGPUDevice(enumerator, secondary_gpus[ii]); |
121 } | 121 } |
122 | 122 |
123 enumerator->BeginAuxAttributes(); | 123 enumerator->BeginAuxAttributes(); |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
160 // TODO(kbr): add dx_diagnostics on Windows. | 160 // TODO(kbr): add dx_diagnostics on Windows. |
161 for (size_t ii = 0; ii < video_encode_accelerator_supported_profiles.size(); | 161 for (size_t ii = 0; ii < video_encode_accelerator_supported_profiles.size(); |
162 ++ii) { | 162 ++ii) { |
163 EnumerateVideoEncodeAcceleratorSupportedProfile( | 163 EnumerateVideoEncodeAcceleratorSupportedProfile( |
164 enumerator, video_encode_accelerator_supported_profiles[ii]); | 164 enumerator, video_encode_accelerator_supported_profiles[ii]); |
165 } | 165 } |
166 enumerator->EndAuxAttributes(); | 166 enumerator->EndAuxAttributes(); |
167 } | 167 } |
168 | 168 |
169 } // namespace gpu | 169 } // namespace gpu |
OLD | NEW |