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/Layer.cpp b/services/surfaceflinger/Layer.cpp
index b6b754b..ab0d3df 100644
--- a/services/surfaceflinger/Layer.cpp
+++ b/services/surfaceflinger/Layer.cpp
@@ -1687,9 +1687,9 @@
crop.bottom);
if (layerState.frameRate.rate != 0 ||
layerState.frameRate.type != FrameRateCompatibility::Default) {
- StringAppendF(&result, "% 6.2ffps %15s seamless=%d", layerState.frameRate.rate,
+ StringAppendF(&result, "% 6.2ffps %15s seamless=%s", layerState.frameRate.rate,
frameRateCompatibilityString(layerState.frameRate.type).c_str(),
- layerState.frameRate.shouldBeSeamless);
+ toString(layerState.frameRate.seamlessness).c_str());
} else {
StringAppendF(&result, " ");
}
@@ -2754,7 +2754,7 @@
std::ostream& operator<<(std::ostream& stream, const Layer::FrameRate& rate) {
return stream << "{rate=" << rate.rate
<< " type=" << Layer::frameRateCompatibilityString(rate.type)
- << " shouldBeSeamless=" << rate.shouldBeSeamless << "}";
+ << " seamlessness=" << toString(rate.seamlessness) << "}";
}
}; // namespace android