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

Unified Diff: gpu/config/gpu_info.cc

Issue 568413002: Add VEA supported profiles to GPUInfo. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: try to fix gn bots Created 6 years, 3 months 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 74510482f642910a42f520401d3d71b4576256b6..c7951f9d61105750407f5a01028b65bba22949f5 100644
--- a/gpu/config/gpu_info.cc
+++ b/gpu/config/gpu_info.cc
@@ -17,6 +17,19 @@ void EnumerateGPUDevice(gpu::GPUInfo::Enumerator* enumerator,
enumerator->EndGPUDevice();
}
+void EnumerateVideoEncodeAcceleratorSupportedProfile(
+ gpu::GPUInfo::Enumerator* enumerator,
+ const media::VideoEncodeAccelerator::SupportedProfile profile) {
+ enumerator->BeginVideoEncodeAcceleratorSupportedProfile();
+ enumerator->AddInt("profile", profile.profile);
+ enumerator->AddInt("maxResolutionWidth", profile.max_resolution.width());
+ enumerator->AddInt("maxResolutionHeight", profile.max_resolution.height());
+ enumerator->AddInt("maxFramerateNumerator", profile.max_framerate_numerator);
+ enumerator->AddInt("maxFramerateDenominator",
+ profile.max_framerate_denominator);
+ enumerator->EndVideoEncodeAcceleratorSupportedProfile();
+}
+
} // namespace
namespace gpu {
@@ -88,6 +101,8 @@ void GPUInfo::EnumerateFields(Enumerator* enumerator) const {
CollectInfoResult dx_diagnostics_info_state;
DxDiagNode dx_diagnostics;
#endif
+ std::vector<media::VideoEncodeAccelerator::SupportedProfile>
+ video_encode_accelerator_supported_profiles;
};
// If this assert fails then most likely something below needs to be updated.
@@ -143,6 +158,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_encode_accelerator_supported_profiles.size();
+ ++ii) {
+ EnumerateVideoEncodeAcceleratorSupportedProfile(
+ enumerator, video_encode_accelerator_supported_profiles[ii]);
+ }
enumerator->EndAuxAttributes();
}

Powered by Google App Engine
This is Rietveld 408576698