From c97b8dbd9093c7a8cfeedcd7e417f6732cbe24c6 Mon Sep 17 00:00:00 2001 From: Vishnu Nair Date: Tue, 29 Oct 2019 18:19:35 -0700 Subject: [Shadows] Add shadow radius to sf layer state (2/n) Bug: 136561771 Test: atest SurfaceFlinger_Test Change-Id: Icafe852eaad195163b48b802db2a4b092aa30926 --- libs/gui/SurfaceComposerClient.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'libs/gui/SurfaceComposerClient.cpp') diff --git a/libs/gui/SurfaceComposerClient.cpp b/libs/gui/SurfaceComposerClient.cpp index e9079efd29..14f47c3509 100644 --- a/libs/gui/SurfaceComposerClient.cpp +++ b/libs/gui/SurfaceComposerClient.cpp @@ -1335,6 +1335,18 @@ SurfaceComposerClient::Transaction& SurfaceComposerClient::Transaction::setGeome return *this; } +SurfaceComposerClient::Transaction& SurfaceComposerClient::Transaction::setShadowRadius( + const sp& sc, float shadowRadius) { + layer_state_t* s = getLayerState(sc); + if (!s) { + mStatus = BAD_INDEX; + return *this; + } + s->what |= layer_state_t::eShadowRadiusChanged; + s->shadowRadius = shadowRadius; + return *this; +} + // --------------------------------------------------------------------------- DisplayState& SurfaceComposerClient::Transaction::getDisplayState(const sp& token) { -- cgit v1.2.3-59-g8ed1b