Without NV12 HW GMB support, GMBVideoFramePool will fall back to
NV12_DUAL_GMB on ChromeOS [1]. NV12 HW GMBs are supported on ChromeOS
everywhere but on Flex. We cannot use NV12_SINGLE_GMB in this case as
in other parts of the codebase, there is a hardcoded assumption that
on ChromeOS NV12 GMBs can be hardware GMBs. We are trying to eliminate
usage of NV12_DUAL_GMB altogether as part of eliminating VideoFrames
ever needing to hold multiple SharedImages.
Fortunately, GMBVideoFramePool does not *need* to support NV12_DUAL_GMB
on ChromeOS because this path doesn't have any performance improvements
when compared to the fallback texture upload via VideoResourceUpdater.
This CL adds a codepath that disables support for NV12_DUAL_GMB on
ChromeOS if NV12 HW GMB support is not present, causing fallback to
VideoResourceUpdater in this case. The codepath is guarded by a
base::Feature that is currently disabled and will serve as a killswitch
once we turn it on. We also add a flag to enable the feature.
[1] https://source.chromium.org/chromium/chromium/src/+/main:content/renderer/media/gpu/gpu_video_accelerator_factories_impl.cc;l=386-393;drc=05bb4ce2df79db9c7f4fd9ef1856f0c41bca440f;bpv=1;bpt=1
Bug: 40283225
Change-Id: I1d18fef19a4b9170fbe5ec761087bd54a9331f6a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5401934
Reviewed-by: Vasiliy Telezhnikov <vasilyt@chromium.org>
Commit-Queue: Saifuddin Hitawala <hitawala@chromium.org>
Reviewed-by: Andres Calderon Jaramillo <andrescj@chromium.org>
Reviewed-by: Dave Tapuska <dtapuska@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1285313}