SF: per-display LayerRequirement filtering in RefreshRateSelector
Currently, RefreshRateSelector takes all LayerRequirements into account when ranking framerates. This means that contents on another display can affect the refresh rate of all other displays (if follower displays are allowed to freely choose their refresh rates). This CL filters LayerRequirements used in RefreshRateSelector by filtering on ui::LayerFilter introduced to both of these classes. Inspiration has been taken from how compositionengine::Output::includesLayer() takes ui::LayerFilter from DisplayDevice, and applies during layer visibility calculation in composition. Per-display RefreshRateSelector takes ui::LayerFilter from DisplayDevice::setLayerFilter(), as done with Output. LayerRequirements are built from active LayerInfos in LayerHistory::summarize(). LayerInfos are updated with LayerProps using LayerSnapshot right after its update in commit. Since LayerSnapshot has the outputFilter from its inherited struct updated in commit, this CL adds LayerFilter as member of LayerInfo, which gets updated with snapshot on every commit, and used to construct LayerRequirement. Flag: com.android.graphics.surfaceflinger.flags.follower_arbitrary_refresh_rate_selection Bug: 371584290 Test: New RefreshRateSelectorTest Change-Id: I426925b59c53d2b7ae9239036ccc91e78e4cbaa1
Loading
Please register or sign in to comment