Skip to content

Commit 73db0d8

Browse files
author
Dianne Hackborn
committed
"Fix" issue #5276520: Noise on edges of rotation animation
I have no shame. Change-Id: I9f40df670bba0f848097aad8afb978a29e42f85a
1 parent 09bd49a commit 73db0d8

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

services/java/com/android/server/wm/WindowState.java

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1101,7 +1101,20 @@ void computeShownFrameLocked() {
11011101
final Matrix tmpMatrix = mTmpMatrix;
11021102

11031103
// Compute the desired transformation.
1104-
tmpMatrix.setTranslate(0, 0);
1104+
if (screenAnimation) {
1105+
// If we are doing a screen animation, the global rotation
1106+
// applied to windows can result in windows that are carefully
1107+
// aligned with each other to slightly separate, allowing you
1108+
// to see what is behind them. An unsightly mess. This...
1109+
// thing... magically makes it call good: scale each window
1110+
// slightly (two pixels larger in each dimension, from the
1111+
// window's center).
1112+
final float w = frame.width();
1113+
final float h = frame.height();
1114+
tmpMatrix.setScale(1 + 2/w, 1 + 2/h, w/2, h/2);
1115+
} else {
1116+
tmpMatrix.reset();
1117+
}
11051118
tmpMatrix.postScale(mGlobalScale, mGlobalScale);
11061119
if (selfTransformation) {
11071120
tmpMatrix.postConcat(mTransformation.getMatrix());

0 commit comments

Comments
 (0)