SF: fix a bug in isFrameActive
We should look at the value of layer_state_t::frameRateCompatibility only if layer_state_t::eFrameRateChanged changed.
Test: presubmit
Bug: 264952266
Change-Id: Ice3537cde6a91bacbe253d18faeef44433bcd982
diff --git a/services/surfaceflinger/TransactionState.h b/services/surfaceflinger/TransactionState.h
index 380301f..366b09d 100644
--- a/services/surfaceflinger/TransactionState.h
+++ b/services/surfaceflinger/TransactionState.h
@@ -91,7 +91,9 @@
if (!displays.empty()) return true;
for (const auto& state : states) {
- if (state.state.frameRateCompatibility != ANATIVEWINDOW_FRAME_RATE_NO_VOTE) {
+ const bool frameRateChanged = state.state.what & layer_state_t::eFrameRateChanged;
+ if (!frameRateChanged ||
+ state.state.frameRateCompatibility != ANATIVEWINDOW_FRAME_RATE_NO_VOTE) {
return true;
}
}