From c5986778d0d6c7ab3f96fafb1b84887e901ed92b Mon Sep 17 00:00:00 2001 From: Marin Shalamanov Date: Tue, 16 Mar 2021 16:09:49 +0100 Subject: 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 --- libs/gui/BLASTBufferQueue.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'libs/gui/BLASTBufferQueue.cpp') diff --git a/libs/gui/BLASTBufferQueue.cpp b/libs/gui/BLASTBufferQueue.cpp index 82c9268feb..3f545b25e5 100644 --- a/libs/gui/BLASTBufferQueue.cpp +++ b/libs/gui/BLASTBufferQueue.cpp @@ -544,11 +544,13 @@ public: }).detach(); } - status_t setFrameRate(float frameRate, int8_t compatibility, bool shouldBeSeamless) override { - if (!ValidateFrameRate(frameRate, compatibility, "BBQSurface::setFrameRate")) { + status_t setFrameRate(float frameRate, int8_t compatibility, + int8_t changeFrameRateStrategy) override { + if (!ValidateFrameRate(frameRate, compatibility, changeFrameRateStrategy, + "BBQSurface::setFrameRate")) { return BAD_VALUE; } - return mBbq->setFrameRate(frameRate, compatibility, shouldBeSeamless); + return mBbq->setFrameRate(frameRate, compatibility, changeFrameRateStrategy); } status_t setFrameTimelineInfo(const FrameTimelineInfo& frameTimelineInfo) override { -- cgit v1.2.3-59-g8ed1b