Logic for selection strategy "DoNotPropagate"

This logic is for the new FrameRateSelectionStrategy::DoNotPropagate.
The default behavior ("Self") is to propagate parent vote to children
that has no votes, but if a layer has "DoNotPropagate", it will not
propagate its vote to children.

Bug: 309687765
Test: atest libsurfaceflinger_unittest
Test: atest CtsSurfaceControlTestsStaging
Change-Id: I284b639f2b1902c5e9d3dcd08ceaf3f76b73451e
diff --git a/services/surfaceflinger/Layer.h b/services/surfaceflinger/Layer.h
index 28168c3..790dfb5 100644
--- a/services/surfaceflinger/Layer.h
+++ b/services/surfaceflinger/Layer.h
@@ -1178,6 +1178,11 @@
                 FrameRateSelectionStrategy::OverrideChildren;
     }
 
+    bool shouldPropagateFrameRate() const {
+        return getDrawingState().frameRateSelectionStrategy !=
+                FrameRateSelectionStrategy::DoNotPropagate;
+    }
+
     // Cached properties computed from drawing state
     // Effective transform taking into account parent transforms and any parent scaling, which is
     // a transform from the current layer coordinate space to display(screen) coordinate space.