Change setPositionAppliesWithResize to apply to all geometry.
To support seamless rotation, change setPositionAppliesWithResize
to also include the crop. As the transformation matrix is already
frozen during resize, this enables the window manager to set the
total geometry state before and after resize in a race free fashion.
Bug: 28823590
Change-Id: I3f8f0e162b7ef4e9403c1220c7e4191b3ef30526
diff --git a/libs/gui/SurfaceComposerClient.cpp b/libs/gui/SurfaceComposerClient.cpp
index 92ae41e..1620eb2 100644
--- a/libs/gui/SurfaceComposerClient.cpp
+++ b/libs/gui/SurfaceComposerClient.cpp
@@ -165,7 +165,7 @@
uint64_t frameNumber);
status_t setOverrideScalingMode(const sp<SurfaceComposerClient>& client,
const sp<IBinder>& id, int32_t overrideScalingMode);
- status_t setPositionAppliesWithResize(const sp<SurfaceComposerClient>& client,
+ status_t setGeometryAppliesWithResize(const sp<SurfaceComposerClient>& client,
const sp<IBinder>& id);
void setDisplaySurface(const sp<IBinder>& token,
@@ -445,7 +445,7 @@
return NO_ERROR;
}
-status_t Composer::setPositionAppliesWithResize(
+status_t Composer::setGeometryAppliesWithResize(
const sp<SurfaceComposerClient>& client,
const sp<IBinder>& id) {
Mutex::Autolock lock(mLock);
@@ -453,7 +453,7 @@
if (!s) {
return BAD_INDEX;
}
- s->what |= layer_state_t::ePositionAppliesWithResize;
+ s->what |= layer_state_t::eGeometryAppliesWithResize;
return NO_ERROR;
}
@@ -699,9 +699,9 @@
this, id, overrideScalingMode);
}
-status_t SurfaceComposerClient::setPositionAppliesWithResize(
+status_t SurfaceComposerClient::setGeometryAppliesWithResize(
const sp<IBinder>& id) {
- return getComposer().setPositionAppliesWithResize(this, id);
+ return getComposer().setGeometryAppliesWithResize(this, id);
}
// ----------------------------------------------------------------------------