Make shouldBeSeamless an enum
We change theboolean shouldBeSemaless to an enum with
three values. This introduces a third value "Default" which
indicates that the layer doesn't have a preference for
seamlessness. This is the default value for Surfaces which
haven't called setFrameRate, or have called setFrameRate(0).
Bug: 161776961
Test: presubmit
Change-Id: I157e332e82e95badc928d6a8135e657cd6984db4
diff --git a/services/surfaceflinger/Scheduler/LayerHistory.cpp b/services/surfaceflinger/Scheduler/LayerHistory.cpp
index 28af930..359ee26 100644
--- a/services/surfaceflinger/Scheduler/LayerHistory.cpp
+++ b/services/surfaceflinger/Scheduler/LayerHistory.cpp
@@ -129,8 +129,7 @@
RefreshRateConfigs::LayerRequirement{.name = layer->getName(),
.vote = voteType,
.desiredRefreshRate = frameRate.rate,
- .shouldBeSeamless =
- frameRate.shouldBeSeamless,
+ .seamlessness = frameRate.seamlessness,
.weight = 1.0f,
.focused = layerFocused});
} else if (recent) {
@@ -139,7 +138,8 @@
.vote = LayerVoteType::Heuristic,
.desiredRefreshRate =
info->getRefreshRate(now),
- .shouldBeSeamless = true,
+ .seamlessness =
+ Seamlessness::OnlySeamless,
.weight = 1.0f,
.focused = layerFocused});
}