summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Robert Carr <racarr@google.com> 2016-08-16 02:13:44 +0000
committer android-build-merger <android-build-merger@google.com> 2016-08-16 02:13:44 +0000
commit9e47cf9a1716c4a02fb6806af7263f1ee6b3e5c2 (patch)
tree42461a6873df5419fffd463bf46a14e857d56092
parent7c54349d4b7157c5ca669d308044f379ee60eaf2 (diff)
parent25596584aae628c357530117da1b7d9823eb6443 (diff)
Limit seamless rotation to TRANSFORM_INVERSE_DISPLAY children. am: aab09158e9 am: 878507072a
am: 25596584aa Change-Id: Iafee88d9e01139a31c4694e963d6e674646895b4
-rw-r--r--services/core/java/com/android/server/wm/WindowManagerService.java14
1 files changed, 14 insertions, 0 deletions
diff --git a/services/core/java/com/android/server/wm/WindowManagerService.java b/services/core/java/com/android/server/wm/WindowManagerService.java
index 22120d016af4..19ad5e4563aa 100644
--- a/services/core/java/com/android/server/wm/WindowManagerService.java
+++ b/services/core/java/com/android/server/wm/WindowManagerService.java
@@ -5776,6 +5776,20 @@ public class WindowManagerService extends IWindowManager.Stub
rotateSeamlessly = false;
break;
}
+ // In what can only be called an unfortunate workaround we require
+ // seamlessly rotated child windows to have the TRANSFORM_TO_DISPLAY_INVERSE
+ // flag. Due to limitations in the client API, there is no way for
+ // the client to set this flag in a race free fashion. If we seamlessly rotate
+ // a window which does not have this flag, but then gains it, we will get
+ // an incorrect visual result (rotated viewfinder). This means if we want to
+ // support seamlessly rotating windows which could gain this flag, we can't
+ // rotate windows without it. This limits seamless rotation in N to camera framework
+ // users, windows without children, and native code. This is unfortunate but
+ // having the camera work is our primary goal.
+ if (w.isChildWindow() & w.isVisibleNow() &&
+ !w.mWinAnimator.mSurfaceController.getTransformToDisplayInverse()) {
+ rotateSeamlessly = false;
+ }
}
}