Propagate frame rate correctly to child layers
If a child layer has a valid frame rate, and its parent does not
have a valid frame rate, we need to override the parent's frame
rate to no vote.
If the parent has a valid vote, including no vote, children would
inherit this vote if it has no valid vote.
When we were updating the hierarchy, we incorrectly propagated
novote due to a child having a novote to all its siblings in the tree.
Fix this by tracking inherited frame rate separately.
Bug: 304208511
Test: presubmit
Change-Id: I873e75d678fba8c8217a1887f48726d1e4828049
diff --git a/services/surfaceflinger/FrontEnd/LayerSnapshot.h b/services/surfaceflinger/FrontEnd/LayerSnapshot.h
index 80a51ea..59ccf96 100644
--- a/services/surfaceflinger/FrontEnd/LayerSnapshot.h
+++ b/services/surfaceflinger/FrontEnd/LayerSnapshot.h
@@ -84,6 +84,7 @@
bool isTrustedOverlay;
gui::GameMode gameMode;
scheduler::LayerInfo::FrameRate frameRate;
+ scheduler::LayerInfo::FrameRate inheritedFrameRate;
scheduler::LayerInfo::FrameRateSelectionStrategy frameRateSelectionStrategy;
scheduler::FrameRateCompatibility defaultFrameRateCompatibility =
scheduler::FrameRateCompatibility::Default;