summaryrefslogtreecommitdiff
path: root/libs/gui/BLASTBufferQueue.cpp
diff options
context:
space:
mode:
author Marin Shalamanov <shalamanov@google.com> 2020-10-13 12:33:42 +0200
committer Marin Shalamanov <shalamanov@google.com> 2020-11-16 18:01:55 +0100
commit4608442db90c07dccc833dbdf1cea78f57c7b96d (patch)
treebe976923f779a78bf40ee5f5165a51f76b37b897 /libs/gui/BLASTBufferQueue.cpp
parent6bb6836cbdc56efc7e3bc4a14aea6dcf43f9ff3c (diff)
Add shouldBeSeamless to setFrameRate
This CL adds a new parameter shouldBeSeamless to the existing setFrameRate APIs. This parameter indicates whether the desired refresh rate should be achieved only seamlessly or also switches with visual interruptions for the user are allowed. The default value of the new parameter is "true". Test: atest RefreshRateConfigsTest Test: atest SetFrameRateTest Test: atest libsurfaceflinger_unittest Test: atest libgui_test Bug: 161776961 Change-Id: I0df16e09f77c8c198fd3733fb581a2aaadfed685
Diffstat (limited to 'libs/gui/BLASTBufferQueue.cpp')
-rw-r--r--libs/gui/BLASTBufferQueue.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/libs/gui/BLASTBufferQueue.cpp b/libs/gui/BLASTBufferQueue.cpp
index 678613b1ff..ac1c7369b6 100644
--- a/libs/gui/BLASTBufferQueue.cpp
+++ b/libs/gui/BLASTBufferQueue.cpp
@@ -378,11 +378,11 @@ public:
}).detach();
}
- status_t setFrameRate(float frameRate, int8_t compatibility) override {
+ status_t setFrameRate(float frameRate, int8_t compatibility, bool shouldBeSeamless) override {
if (!ValidateFrameRate(frameRate, compatibility, "BBQSurface::setFrameRate")) {
return BAD_VALUE;
}
- return mBbq->setFrameRate(frameRate, compatibility);
+ return mBbq->setFrameRate(frameRate, compatibility, shouldBeSeamless);
}
status_t setFrameTimelineVsync(int64_t frameTimelineVsyncId) override {
@@ -392,12 +392,12 @@ public:
// TODO: Can we coalesce this with frame updates? Need to confirm
// no timing issues.
-status_t BLASTBufferQueue::setFrameRate(float frameRate, int8_t compatibility) {
+status_t BLASTBufferQueue::setFrameRate(float frameRate, int8_t compatibility,
+ bool shouldBeSeamless) {
std::unique_lock _lock{mMutex};
SurfaceComposerClient::Transaction t;
- return t.setFrameRate(mSurfaceControl, frameRate, compatibility)
- .apply();
+ return t.setFrameRate(mSurfaceControl, frameRate, compatibility, shouldBeSeamless).apply();
}
status_t BLASTBufferQueue::setFrameTimelineVsync(int64_t frameTimelineVsyncId) {