SF: fix refresh rate scoring when frameRateMultipleThreshold is used
We can't exclude layers that are below the frameRateMultipleThreshold when scoring the higher refresh rates (the ones above the threshold) as it creates gives the lower refresh rates a higher score (as there are more layers that are allowed to score them). Instead we use a different approach which first scores the refresh rates based on all the layers but the fixed source ones, and then we add the fixed source ones for the refresh rates below the thresholds and for the above ones only when other layers already scored them. Bug: 242283390 Test: newly added unit tests scenarios SF: layers above the frameRateMultipleThreshold should always be counted An additional fix on top of ae2e3c74 which also include layers that have a desired refresh rate that was calculated hueristically and matches the max refresh rate. Bug: 242283390 Test: newly added unit tests scenarios Change-Id: I85534a3e004f372349dbf923ee6013855a54e4fa Merged-In: Ibe30ddd306265507ceedff6a6a725dadadc50af2 Merged-In: I85534a3e004f372349dbf923ee6013855a54e4fa
Showing
- services/surfaceflinger/Scheduler/RefreshRateConfigs.cpp 96 additions, 46 deletionsservices/surfaceflinger/Scheduler/RefreshRateConfigs.cpp
- services/surfaceflinger/Scheduler/RefreshRateConfigs.h 0 additions, 3 deletionsservices/surfaceflinger/Scheduler/RefreshRateConfigs.h
- services/surfaceflinger/tests/unittests/RefreshRateConfigsTest.cpp 44 additions, 1 deletion...surfaceflinger/tests/unittests/RefreshRateConfigsTest.cpp
Loading