summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorDianne Hackborn <hackbod@google.com>2011-09-16 01:09:40 -0700
committerDianne Hackborn <hackbod@google.com>2011-09-16 01:09:40 -0700
commit73db0d802ee4e1355d400329084eee6f5cff02a3 (patch)
treeea38f673ee57fad763a73428eecc93d4958f065b /services
parent09bd49a8a74cafe7f03aee769bfe0748bf3c2b51 (diff)
downloadframeworks_base-73db0d802ee4e1355d400329084eee6f5cff02a3.zip
frameworks_base-73db0d802ee4e1355d400329084eee6f5cff02a3.tar.gz
frameworks_base-73db0d802ee4e1355d400329084eee6f5cff02a3.tar.bz2
"Fix" issue #5276520: Noise on edges of rotation animation
I have no shame. Change-Id: I9f40df670bba0f848097aad8afb978a29e42f85a
Diffstat (limited to 'services')
-rw-r--r--services/java/com/android/server/wm/WindowState.java15
1 files changed, 14 insertions, 1 deletions
diff --git a/services/java/com/android/server/wm/WindowState.java b/services/java/com/android/server/wm/WindowState.java
index 0ee3f17..197abde 100644
--- a/services/java/com/android/server/wm/WindowState.java
+++ b/services/java/com/android/server/wm/WindowState.java
@@ -1101,7 +1101,20 @@ final class WindowState implements WindowManagerPolicy.WindowState {
final Matrix tmpMatrix = mTmpMatrix;
// Compute the desired transformation.
- tmpMatrix.setTranslate(0, 0);
+ if (screenAnimation) {
+ // If we are doing a screen animation, the global rotation
+ // applied to windows can result in windows that are carefully
+ // aligned with each other to slightly separate, allowing you
+ // to see what is behind them. An unsightly mess. This...
+ // thing... magically makes it call good: scale each window
+ // slightly (two pixels larger in each dimension, from the
+ // window's center).
+ final float w = frame.width();
+ final float h = frame.height();
+ tmpMatrix.setScale(1 + 2/w, 1 + 2/h, w/2, h/2);
+ } else {
+ tmpMatrix.reset();
+ }
tmpMatrix.postScale(mGlobalScale, mGlobalScale);
if (selfTransformation) {
tmpMatrix.postConcat(mTransformation.getMatrix());