summaryrefslogtreecommitdiff
path: root/libs/gui/SurfaceComposerClient.cpp
diff options
context:
space:
mode:
author Vishnu Nair <vishnun@google.com> 2019-10-29 18:19:35 -0700
committer Vishnu Nair <vishnun@google.com> 2019-10-30 01:20:41 +0000
commitc97b8dbd9093c7a8cfeedcd7e417f6732cbe24c6 (patch)
tree1851287287ac16f9c978542ca0ef08793a6a2a50 /libs/gui/SurfaceComposerClient.cpp
parent7b3a312f385e1fc8c3694ffeafc18794e96a95f1 (diff)
[Shadows] Add shadow radius to sf layer state (2/n)
Bug: 136561771 Test: atest SurfaceFlinger_Test Change-Id: Icafe852eaad195163b48b802db2a4b092aa30926
Diffstat (limited to 'libs/gui/SurfaceComposerClient.cpp')
-rw-r--r--libs/gui/SurfaceComposerClient.cpp12
1 files changed, 12 insertions, 0 deletions
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<SurfaceControl>& 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<IBinder>& token) {