Update SurfaceFlinger to handle stretching
of surfaces that are part of a scrolling container
Bug: 184297961
Test: In progress
Change-Id: I959df097ae1fc833fb755f1fb2d759d79f260963
diff --git a/libs/gui/SurfaceComposerClient.cpp b/libs/gui/SurfaceComposerClient.cpp
index 808b731..11b8eba 100644
--- a/libs/gui/SurfaceComposerClient.cpp
+++ b/libs/gui/SurfaceComposerClient.cpp
@@ -1648,8 +1648,7 @@
}
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 @@
}
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;
}