Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(255)

Unified Diff: gpu/config/gpu_info.cc

Issue 795633005: Add VDA supported profile to GPUInfo. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: edit description Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: gpu/config/gpu_info.cc
diff --git a/gpu/config/gpu_info.cc b/gpu/config/gpu_info.cc
index f1f67cee9178fce094c4532877a53ea22888e90b..5ed0b37265bf7a1a24396bf9ccffda4634b2e65f 100644
--- a/gpu/config/gpu_info.cc
+++ b/gpu/config/gpu_info.cc
@@ -30,6 +30,18 @@ void EnumerateVideoEncodeAcceleratorSupportedProfile(
enumerator->EndVideoEncodeAcceleratorSupportedProfile();
}
+void EnumerateVideoDecodeAcceleratorSupportedProfile(
+ gpu::GPUInfo::Enumerator* enumerator,
+ const gpu::VideoDecodeAcceleratorSupportedProfile profile) {
+ enumerator->BeginVideoDecodeAcceleratorSupportedProfile();
+ enumerator->AddInt("profile", profile.profile);
+ enumerator->AddInt("minResolutionWidth", profile.min_resolution.width());
+ enumerator->AddInt("minResolutionHeight", profile.min_resolution.height());
+ enumerator->AddInt("maxResolutionWidth", profile.max_resolution.width());
+ enumerator->AddInt("maxResolutionHeight", profile.max_resolution.height());
+ enumerator->EndVideoDecodeAcceleratorSupportedProfile();
+}
+
} // namespace
namespace gpu {
@@ -101,6 +113,8 @@ void GPUInfo::EnumerateFields(Enumerator* enumerator) const {
CollectInfoResult dx_diagnostics_info_state;
DxDiagNode dx_diagnostics;
#endif
+ std::vector<VideoDecodeAcceleratorSupportedProfile>
+ video_decode_accelerator_supported_profiles;
std::vector<VideoEncodeAcceleratorSupportedProfile>
video_encode_accelerator_supported_profiles;
};
@@ -158,6 +172,11 @@ void GPUInfo::EnumerateFields(Enumerator* enumerator) const {
enumerator->AddInt("DxDiagnosticsInfoState", dx_diagnostics_info_state);
#endif
// TODO(kbr): add dx_diagnostics on Windows.
+ for (size_t ii = 0; ii < video_decode_accelerator_supported_profiles.size();
+ ++ii) {
+ EnumerateVideoDecodeAcceleratorSupportedProfile(
+ enumerator, video_decode_accelerator_supported_profiles[ii]);
+ }
for (size_t ii = 0; ii < video_encode_accelerator_supported_profiles.size();
++ii) {
EnumerateVideoEncodeAcceleratorSupportedProfile(

Powered by Google App Engine
This is Rietveld 408576698