Add frame rate category change to AFFECTS_CHILDREN
Also update the test to check this.
Bug: 284911776
Test: atest LayerSnapshotTest
Change-Id: Ic6f2eb392e4ffbf6ea2faf0647ffcca0507a91a2
diff --git a/services/surfaceflinger/tests/unittests/LayerSnapshotTest.cpp b/services/surfaceflinger/tests/unittests/LayerSnapshotTest.cpp
index 72ed4c8..2353480 100644
--- a/services/surfaceflinger/tests/unittests/LayerSnapshotTest.cpp
+++ b/services/surfaceflinger/tests/unittests/LayerSnapshotTest.cpp
@@ -667,6 +667,8 @@
scheduler::LayerInfo::FrameRateCompatibility::Default);
EXPECT_EQ(getSnapshot({.id = 122})->frameRate.category, FrameRateCategory::Normal);
EXPECT_TRUE(getSnapshot({.id = 122})->changes.test(RequestedLayerState::Changes::FrameRate));
+ EXPECT_TRUE(
+ getSnapshot({.id = 122})->changes.test(RequestedLayerState::Changes::AffectsChildren));
EXPECT_FALSE(getSnapshot({.id = 1221})->frameRate.vote.rate.isValid());
EXPECT_TRUE(getSnapshot({.id = 1221})->frameRate.isValid());
@@ -674,6 +676,8 @@
scheduler::LayerInfo::FrameRateCompatibility::Default);
EXPECT_EQ(getSnapshot({.id = 1221})->frameRate.category, FrameRateCategory::Normal);
EXPECT_TRUE(getSnapshot({.id = 1221})->changes.test(RequestedLayerState::Changes::FrameRate));
+ EXPECT_TRUE(
+ getSnapshot({.id = 1221})->changes.test(RequestedLayerState::Changes::AffectsChildren));
// reparent and verify the child does NOT get the new parent's framerate because it already has
// the frame rate category specified.