summaryrefslogtreecommitdiff
path: root/libs/gui/SurfaceComposerClient.cpp
diff options
context:
space:
mode:
author Nader Jawad <njawad@google.com> 2021-04-08 20:35:39 -0700
committer Nader Jawad <njawad@google.com> 2021-05-04 10:43:06 -0700
commit2dfc98b6f563ac7041fd705a8dbcda12cf32fa76 (patch)
treed321d127b41e515587411936a879c3060c9fb2d4 /libs/gui/SurfaceComposerClient.cpp
parenta0e37d286b55bab43ce2c295f98885c9bf77dc95 (diff)
Update SurfaceFlinger to handle stretching
of surfaces that are part of a scrolling container Bug: 184297961 Test: In progress Change-Id: I959df097ae1fc833fb755f1fb2d759d79f260963
Diffstat (limited to 'libs/gui/SurfaceComposerClient.cpp')
-rw-r--r--libs/gui/SurfaceComposerClient.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/libs/gui/SurfaceComposerClient.cpp b/libs/gui/SurfaceComposerClient.cpp
index 808b731d8f..11b8ebac81 100644
--- a/libs/gui/SurfaceComposerClient.cpp
+++ b/libs/gui/SurfaceComposerClient.cpp
@@ -1648,8 +1648,7 @@ SurfaceComposerClient::Transaction& SurfaceComposerClient::Transaction::setApply
}
SurfaceComposerClient::Transaction& SurfaceComposerClient::Transaction::setStretchEffect(
- const sp<SurfaceControl>& sc, float left, float top, float right, float bottom, float vecX,
- float vecY, float maxAmount) {
+ const sp<SurfaceControl>& sc, const StretchEffect& stretchEffect) {
layer_state_t* s = getLayerState(sc);
if (!s) {
mStatus = BAD_INDEX;
@@ -1657,10 +1656,7 @@ SurfaceComposerClient::Transaction& SurfaceComposerClient::Transaction::setStret
}
s->what |= layer_state_t::eStretchChanged;
- s->stretchEffect = StretchEffect{.area = {left, top, right, bottom},
- .vectorX = vecX,
- .vectorY = vecY,
- .maxAmount = maxAmount};
+ s->stretchEffect = stretchEffect;
return *this;
}