summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Rachel Lee <rnlee@google.com> 2023-09-15 17:36:56 -0700
committer Rachel Lee <rnlee@google.com> 2023-09-15 17:36:56 -0700
commit47adfcfdfc5d154fc00bac233f0bd4041f0896ee (patch)
treee434cf6a04ad9c5fbf34ec3c77370c89923bef93
parent95350b26a61ad56966f179ffb4c4eda374435bfa (diff)
Fix NoPreference category in FrameRateOverride fn
Previously changed NoPreference to vote Min instead of NoVote; this also needs to be reflected in the frame rate overrides code. This will stop a crash when it tried to calculateLayerScoreLocked on NoPreference category (bad). Bug: 300695819 Test: test CtsSurfaceControlTestsStaging Change-Id: I51a5806b8d77e8bd9a1db8cd5619e4936cee684b
-rw-r--r--services/surfaceflinger/Scheduler/RefreshRateSelector.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/services/surfaceflinger/Scheduler/RefreshRateSelector.cpp b/services/surfaceflinger/Scheduler/RefreshRateSelector.cpp
index 5a00972dd8..e378946f1b 100644
--- a/services/surfaceflinger/Scheduler/RefreshRateSelector.cpp
+++ b/services/surfaceflinger/Scheduler/RefreshRateSelector.cpp
@@ -905,7 +905,8 @@ auto RefreshRateSelector::getFrameRateOverrides(const std::vector<LayerRequireme
}
for (const auto& layer : layersWithSameUid) {
- if (layer->vote == LayerVoteType::NoVote || layer->vote == LayerVoteType::Min) {
+ if (layer->isNoVote() || layer->frameRateCategory == FrameRateCategory::NoPreference ||
+ layer->vote == LayerVoteType::Min) {
continue;
}