diff options
| author | 2024-04-26 15:22:30 -0700 | |
|---|---|---|
| committer | 2024-04-30 11:15:45 -0700 | |
| commit | f466b19d6815d6dcc41d78fafbcb62e83768fb00 (patch) | |
| tree | 24cb6c772a86f87bbb74862669b93218295b764b | |
| parent | 695512386539085c855f83bc8a7d24f4c8dec67e (diff) | |
Fix infrequent comment in LayerHistoryTest
Fix some occurrences of outdated/incorrect comments saying layers turned
inactive, when actually they only turned infrequent. In the current
logic, layers can still be active when infrequent for other reasons.
Bug: none
Test: presubmit
Test: atest libsurfaceflinger_unittest
Change-Id: If65918a4732fda0d9c54412c7d7237f6e3812aa2
| -rw-r--r-- | services/surfaceflinger/tests/unittests/LayerHistoryTest.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/services/surfaceflinger/tests/unittests/LayerHistoryTest.cpp b/services/surfaceflinger/tests/unittests/LayerHistoryTest.cpp index e0a3101e43..088d0d233c 100644 --- a/services/surfaceflinger/tests/unittests/LayerHistoryTest.cpp +++ b/services/surfaceflinger/tests/unittests/LayerHistoryTest.cpp @@ -506,7 +506,7 @@ TEST_F(LayerHistoryTest, oneLayerExplicitVote) { EXPECT_EQ(1, activeLayerCount()); EXPECT_EQ(1, frequentLayerCount(time)); - // layer became inactive, but the vote stays + // layer became infrequent, but the vote stays setDefaultLayerVote(layer.get(), LayerHistory::LayerVoteType::Heuristic); time += MAX_ACTIVE_LAYER_PERIOD_NS.count(); ASSERT_EQ(1, summarizeLayerHistory(time).size()); @@ -540,7 +540,7 @@ TEST_F(LayerHistoryTest, oneLayerExplicitExactVote) { EXPECT_EQ(1, activeLayerCount()); EXPECT_EQ(1, frequentLayerCount(time)); - // layer became inactive, but the vote stays + // layer became infrequent, but the vote stays setDefaultLayerVote(layer.get(), LayerHistory::LayerVoteType::Heuristic); time += MAX_ACTIVE_LAYER_PERIOD_NS.count(); ASSERT_EQ(1, summarizeLayerHistory(time).size()); @@ -692,7 +692,7 @@ TEST_F(LayerHistoryTest, oneLayerExplicitCategory) { EXPECT_EQ(0_Hz, summarizeLayerHistory(time)[0].desiredRefreshRate); EXPECT_EQ(FrameRateCategory::High, summarizeLayerHistory(time)[0].frameRateCategory); - // layer became inactive, but the vote stays + // layer became infrequent, but the vote stays setDefaultLayerVote(layer.get(), LayerHistory::LayerVoteType::Heuristic); time += MAX_ACTIVE_LAYER_PERIOD_NS.count(); ASSERT_EQ(1, summarizeLayerHistory(time).size()); @@ -729,7 +729,7 @@ TEST_F(LayerHistoryTest, oneLayerCategoryNoPreference) { EXPECT_EQ(1, activeLayerCount()); EXPECT_EQ(1, frequentLayerCount(time)); - // layer became inactive + // layer became infrequent time += MAX_ACTIVE_LAYER_PERIOD_NS.count(); EXPECT_EQ(1, summarizeLayerHistory(time).size()); EXPECT_EQ(1, activeLayerCount()); @@ -770,7 +770,7 @@ TEST_F(LayerHistoryTest, oneLayerExplicitVoteWithCategory) { EXPECT_EQ(73.4_Hz, summarizeLayerHistory(time)[1].desiredRefreshRate); EXPECT_EQ(FrameRateCategory::Default, summarizeLayerHistory(time)[1].frameRateCategory); - // layer became inactive, but the vote stays + // layer became infrequent, but the vote stays setDefaultLayerVote(layer.get(), LayerHistory::LayerVoteType::Heuristic); time += MAX_ACTIVE_LAYER_PERIOD_NS.count(); ASSERT_EQ(2, summarizeLayerHistory(time).size()); @@ -1175,7 +1175,7 @@ TEST_F(LayerHistoryTest, frontBufferedLayerVotesMax) { EXPECT_EQ(0, frequentLayerCount(time)); EXPECT_EQ(0, animatingLayerCount(time)); - // layer became inactive + // Layer still active due to front buffering, but it's infrequent. time += MAX_ACTIVE_LAYER_PERIOD_NS.count(); ASSERT_EQ(1, summarizeLayerHistory(time).size()); EXPECT_EQ(LayerHistory::LayerVoteType::Max, summarizeLayerHistory(time)[0].vote); |