diff options
author | 2023-06-27 11:22:54 -0700 | |
---|---|---|
committer | 2023-08-22 13:52:42 -0700 | |
commit | ce6e0044cfea1e0ee38a48714364940a9de3e49a (patch) | |
tree | c956c0f654058748d68a5396a443108950407222 /libs/gui/SurfaceComposerClient.cpp | |
parent | 652493db2c61804e81342bfd77f4b5e14dc02e1f (diff) |
Add setFrameRateCategory surface API
Bug: 284911776
Test: atest CtsSurfaceControlTestsStaging
Test: atest libsurfaceflinger_unittest
Change-Id: Ia804a63198ff096d1e5ffedf6046a0350963b8ed
Diffstat (limited to 'libs/gui/SurfaceComposerClient.cpp')
-rw-r--r-- | libs/gui/SurfaceComposerClient.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/libs/gui/SurfaceComposerClient.cpp b/libs/gui/SurfaceComposerClient.cpp index 78401205ff..dc35c1c60e 100644 --- a/libs/gui/SurfaceComposerClient.cpp +++ b/libs/gui/SurfaceComposerClient.cpp @@ -2092,6 +2092,18 @@ SurfaceComposerClient::Transaction::setDefaultFrameRateCompatibility(const sp<Su return *this; } +SurfaceComposerClient::Transaction& SurfaceComposerClient::Transaction::setFrameRateCategory( + const sp<SurfaceControl>& sc, int8_t category) { + layer_state_t* s = getLayerState(sc); + if (!s) { + mStatus = BAD_INDEX; + return *this; + } + s->what |= layer_state_t::eFrameRateCategoryChanged; + s->frameRateCategory = category; + return *this; +} + SurfaceComposerClient::Transaction& SurfaceComposerClient::Transaction::setFixedTransformHint( const sp<SurfaceControl>& sc, int32_t fixedTransformHint) { layer_state_t* s = getLayerState(sc); |