From 82364e3cea0bf88fa8147766433329b3dd5148b8 Mon Sep 17 00:00:00 2001 From: Robert Carr Date: Sun, 15 May 2016 11:27:47 -0700 Subject: SurfaceFlinger: Add mode to apply position with resize. For some cases, like scaled windows with shadows, we need to be able to apply the position concurrent with window resize. This is because the scaling of the shadows causes the top left coordinate of the non shadow surface content to change before and after the resize. Bug: 28899837 Change-Id: I522eacfbbcd79707dc1e5ab71901a263b3004ba9 --- libs/gui/SurfaceControl.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'libs/gui/SurfaceControl.cpp') diff --git a/libs/gui/SurfaceControl.cpp b/libs/gui/SurfaceControl.cpp index 314d83a209..4671e505aa 100644 --- a/libs/gui/SurfaceControl.cpp +++ b/libs/gui/SurfaceControl.cpp @@ -112,6 +112,11 @@ status_t SurfaceControl::setPosition(float x, float y) { if (err < 0) return err; return mClient->setPosition(mHandle, x, y); } +status_t SurfaceControl::setPositionAppliesWithResize() { + status_t err = validate(); + if (err < 0) return err; + return mClient->setPositionAppliesWithResize(mHandle); +} status_t SurfaceControl::setSize(uint32_t w, uint32_t h) { status_t err = validate(); if (err < 0) return err; -- cgit v1.2.3-59-g8ed1b