Fix dark flash when transition ends.

The DimSurface layer was momentarily being placed above the entering
app animtion. This lets the layering be set after the animations have
been evaluated.

Plus debug enhancements.

Change-Id: Icc034bc5264ae9bc6c57c593534683b56588b59a
This commit is contained in:
Craig Mautner
2012-04-24 16:59:36 -07:00
parent bdb1c4067c
commit 8a197a4e08
3 changed files with 15 additions and 8 deletions

View File

@@ -54,7 +54,7 @@ public class AppWindowAnimator {
public void setAnimation(Animation anim, boolean initialized) {
if (WindowManagerService.localLOGV) Slog.v(
TAG, "Setting animation in " + this + ": " + anim);
TAG, "Setting animation in " + mAppToken + ": " + anim);
animation = anim;
animating = false;
animInitialized = initialized;
@@ -81,7 +81,7 @@ public class AppWindowAnimator {
public void setDummyAnimation() {
if (animation == null) {
if (WindowManagerService.localLOGV) Slog.v(
TAG, "Setting dummy animation in " + this);
TAG, "Setting dummy animation in " + mAppToken);
animation = sDummyAnimation;
animInitialized = false;
}
@@ -165,12 +165,12 @@ public class AppWindowAnimator {
transformation.clear();
final boolean more = animation.getTransformation(currentTime, transformation);
if (WindowManagerService.DEBUG_ANIM) Slog.v(
TAG, "Stepped animation in " + this + ": more=" + more + ", xform=" + transformation);
TAG, "Stepped animation in " + mAppToken + ": more=" + more + ", xform=" + transformation);
if (!more) {
animation = null;
clearThumbnail();
if (WindowManagerService.DEBUG_ANIM) Slog.v(
TAG, "Finished animation in " + this + " @ " + currentTime);
TAG, "Finished animation in " + mAppToken + " @ " + currentTime);
}
hasTransformation = more;
return more;
@@ -195,7 +195,7 @@ public class AppWindowAnimator {
&& animation != null) {
if (!animating) {
if (WindowManagerService.DEBUG_ANIM) Slog.v(
TAG, "Starting animation in " + this +
TAG, "Starting animation in " + mAppToken +
" @ " + currentTime + ": dw=" + dw + " dh=" + dh
+ " scale=" + mService.mTransitionAnimationScale
+ " allDrawn=" + mAppToken.allDrawn + " animating=" + animating);
@@ -248,7 +248,7 @@ public class AppWindowAnimator {
}
if (WindowManagerService.DEBUG_ANIM) Slog.v(
TAG, "Animation done in " + this
TAG, "Animation done in " + mAppToken
+ ": reportedVisible=" + mAppToken.reportedVisible);
transformation.clear();

View File

@@ -33,10 +33,17 @@ class DimSurface {
DimSurface(SurfaceSession session) {
if (mDimSurface == null) {
try {
mDimSurface = new Surface(session, 0,
if (WindowManagerService.DEBUG_SURFACE_TRACE) {
mDimSurface = new WindowStateAnimator.SurfaceTrace(session, 0,
"DimSurface",
-1, 16, 16, PixelFormat.OPAQUE,
Surface.FX_SURFACE_DIM);
} else {
mDimSurface = new Surface(session, 0,
"DimSurface",
-1, 16, 16, PixelFormat.OPAQUE,
Surface.FX_SURFACE_DIM);
}
if (WindowManagerService.SHOW_TRANSACTIONS ||
WindowManagerService.SHOW_SURFACE_ALLOC) Slog.i(WindowManagerService.TAG,
" DIM " + mDimSurface + ": CREATE");

View File

@@ -451,9 +451,9 @@ public class WindowAnimator {
Surface.openTransaction();
try {
testWallpaperAndBackgroundLocked();
updateWindowsAppsAndRotationAnimationsLocked();
performAnimationsLocked();
testWallpaperAndBackgroundLocked();
// THIRD LOOP: Update the surfaces of all windows.