diff options
author | 2023-01-25 13:47:12 -0500 | |
---|---|---|
committer | 2023-01-25 17:19:47 -0500 | |
commit | 6879659d589a17d362f91bba4bec5737504a75e7 (patch) | |
tree | 5b7dc6d0fa14fe1fbd925854c760b75841f9231b /libs/gui/SurfaceComposerClient.cpp | |
parent | 6caf98c5d0033ad009ae822fb22ddb5802aa5e03 (diff) |
Add extended brightness range impl
Bug: 241001465
Test: manual currently, flagged off
Change-Id: I707281b9acaf6ea218f1d9ce888fc7cdbf1cf7c9
Diffstat (limited to 'libs/gui/SurfaceComposerClient.cpp')
-rw-r--r-- | libs/gui/SurfaceComposerClient.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/libs/gui/SurfaceComposerClient.cpp b/libs/gui/SurfaceComposerClient.cpp index 5bdeae8a1f..cf9828b2f8 100644 --- a/libs/gui/SurfaceComposerClient.cpp +++ b/libs/gui/SurfaceComposerClient.cpp @@ -1673,6 +1673,21 @@ SurfaceComposerClient::Transaction& SurfaceComposerClient::Transaction::setDatas return *this; } +SurfaceComposerClient::Transaction& SurfaceComposerClient::Transaction::setExtendedRangeBrightness( + const sp<SurfaceControl>& sc, float currentBufferRatio, float desiredRatio) { + layer_state_t* s = getLayerState(sc); + if (!s) { + mStatus = BAD_INDEX; + return *this; + } + s->what |= layer_state_t::eExtendedRangeBrightnessChanged; + s->currentSdrHdrRatio = currentBufferRatio; + s->desiredSdrHdrRatio = desiredRatio; + + registerSurfaceControlForCallback(sc); + return *this; +} + SurfaceComposerClient::Transaction& SurfaceComposerClient::Transaction::setHdrMetadata( const sp<SurfaceControl>& sc, const HdrMetadata& hdrMetadata) { layer_state_t* s = getLayerState(sc); |