setFrameRate: Make shouldBeSeamless an enum
Change the shouldBeSeamless parameter to an enum
in order to make the API easier to understand.
This changes
- SurfaceControl.setFrameRate
- Surface.setFrameRate
- ANativeWindow_setFrameRateWithChangeStrategy
- ASurfaceTransaction_setFrameRateWithChangeStrategy
Bug: 179116474
Test: atest SetFrameRateTest
Change-Id: I28a8863ea77101f90b878fbda5f00d98e075b7cc
diff --git a/libs/gui/include/gui/LayerState.h b/libs/gui/include/gui/LayerState.h
index f7a6698..cc8cc0d 100644
--- a/libs/gui/include/gui/LayerState.h
+++ b/libs/gui/include/gui/LayerState.h
@@ -208,7 +208,7 @@
// Layer frame rate and compatibility. See ANativeWindow_setFrameRate().
float frameRate;
int8_t frameRateCompatibility;
- bool shouldBeSeamless;
+ int8_t changeFrameRateStrategy;
// Set by window manager indicating the layer and all its children are
// in a different orientation than the display. The hint suggests that
@@ -305,10 +305,11 @@
//
// @param frameRate the frame rate in Hz
// @param compatibility a ANATIVEWINDOW_FRAME_RATE_COMPATIBILITY_*
+// @param changeFrameRateStrategy a ANATIVEWINDOW_CHANGE_FRAME_RATE_*
// @param functionName calling function or nullptr. Used for logging
// @param privileged whether caller has unscoped surfaceflinger access
-bool ValidateFrameRate(float frameRate, int8_t compatibility, const char* functionName,
- bool privileged = false);
+bool ValidateFrameRate(float frameRate, int8_t compatibility, int8_t changeFrameRateStrategy,
+ const char* functionName, bool privileged = false);
struct CaptureArgs {
const static int32_t UNSET_UID = -1;