From 95f669a30a74fa519dc9dc760a099d977ebee567 Mon Sep 17 00:00:00 2001 From: Sally Qi Date: Tue, 27 Aug 2024 11:31:42 -0700 Subject: [Lut HAL backend] implementation - Add Lut in HWComposer::DeviceRequestedChanges - parse lutProperties into overlayProperties - Add a mapper to store lut fd to avoid dup() ops if passing the fds into callees. - SurfaceComposerClient::Transaction::setLuts interface Bug: 329472100 Test: builds Flag: NONE HAL backend interface change Change-Id: Ib2993ce1eab66ab456388c0d15b032201eac7e91 --- libs/gui/SurfaceComposerClient.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'libs/gui/SurfaceComposerClient.cpp') diff --git a/libs/gui/SurfaceComposerClient.cpp b/libs/gui/SurfaceComposerClient.cpp index df58df43be..10746e07f8 100644 --- a/libs/gui/SurfaceComposerClient.cpp +++ b/libs/gui/SurfaceComposerClient.cpp @@ -1941,6 +1941,20 @@ SurfaceComposerClient::Transaction& SurfaceComposerClient::Transaction::setDesir return *this; } +SurfaceComposerClient::Transaction& SurfaceComposerClient::Transaction::setLuts( + const sp& sc, const base::unique_fd& /*lutFd*/, + const std::vector& /*offsets*/, const std::vector& /*dimensions*/, + const std::vector& /*sizes*/, const std::vector& /*samplingKeys*/) { + layer_state_t* s = getLayerState(sc); + if (!s) { + mStatus = BAD_INDEX; + return *this; + } + // TODO (b/329472856): update layer_state_t for lut(s) + registerSurfaceControlForCallback(sc); + return *this; +} + SurfaceComposerClient::Transaction& SurfaceComposerClient::Transaction::setCachingHint( const sp& sc, gui::CachingHint cachingHint) { layer_state_t* s = getLayerState(sc); -- cgit v1.2.3-59-g8ed1b