From 58cc90d352b71bd1be16d4a89053350bbeada0af Mon Sep 17 00:00:00 2001 From: Rachel Lee Date: Tue, 5 Sep 2023 18:50:20 -0700 Subject: Plumb new frameRateSelectionStrategy value This new value will allow a parent layer to override the frame rate specifications of all its descendants. This CL only plumbs the value from Transaction to Layer. Bug: 297418260 Test: atest CtsSurfaceControlTestsStaging Test: atest libsurfaceflinger_unittest Change-Id: Ibbda6ff6c143e931240178d89306822b4cce9669 --- libs/gui/SurfaceComposerClient.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'libs/gui/SurfaceComposerClient.cpp') diff --git a/libs/gui/SurfaceComposerClient.cpp b/libs/gui/SurfaceComposerClient.cpp index 4db960e7fa..c2543d182b 100644 --- a/libs/gui/SurfaceComposerClient.cpp +++ b/libs/gui/SurfaceComposerClient.cpp @@ -2104,6 +2104,19 @@ SurfaceComposerClient::Transaction& SurfaceComposerClient::Transaction::setFrame return *this; } +SurfaceComposerClient::Transaction& +SurfaceComposerClient::Transaction::setFrameRateSelectionStrategy(const sp& sc, + int8_t strategy) { + layer_state_t* s = getLayerState(sc); + if (!s) { + mStatus = BAD_INDEX; + return *this; + } + s->what |= layer_state_t::eFrameRateSelectionStrategyChanged; + s->frameRateSelectionStrategy = strategy; + return *this; +} + SurfaceComposerClient::Transaction& SurfaceComposerClient::Transaction::setFixedTransformHint( const sp& sc, int32_t fixedTransformHint) { layer_state_t* s = getLayerState(sc); -- cgit v1.2.3-59-g8ed1b