Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3ec5fef3 authored by Su Hong Koo's avatar Su Hong Koo
Browse files

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
parent 13c1869a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment