Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 764983d1 authored by Craig Mautner's avatar Craig Mautner
Browse files

Separate animation into separate class.

Introduction of the class WindowAnimator which takes care of all
animations stepping and Surface operations.

Change-Id: I78f1c269fa57df0616c08adbe156e3059709ae48
parent 9a69fea8
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -56,7 +56,8 @@ class AppWindowToken extends WindowToken {
    // These are used for determining when all windows associated with
    // an activity have been drawn, so they can be made visible together
    // at the same time.
    int lastTransactionSequence;
    // initialize so that it doesn't match mTransactionSequence which is an int.
    long lastTransactionSequence = Long.MIN_VALUE;
    int numInterestingWindows;
    int numDrawnWindows;
    boolean inPendingTransaction;
@@ -113,7 +114,6 @@ class AppWindowToken extends WindowToken {
        appWindowToken = this;
        appToken = _token;
        mInputApplicationHandle = new InputApplicationHandle(this);
        lastTransactionSequence = service.mTransactionSequence-1;
    }

    public void setAnimation(Animation anim) {
+575 −0

File added.

Preview size limit exceeded, changes collapsed.

+94 −643

File changed.

Preview size limit exceeded, changes collapsed.

+4 −4
Original line number Diff line number Diff line
@@ -1227,8 +1227,8 @@ final class WindowState implements WindowManagerPolicy.WindowState {
            }
        }

        final boolean screenAnimation = mService.mScreenRotationAnimation != null
                && mService.mScreenRotationAnimation.isAnimating();
        final boolean screenAnimation = mService.mAnimator.mScreenRotationAnimation != null
                && mService.mAnimator.mScreenRotationAnimation.isAnimating();
        if (selfTransformation || attachedTransformation != null
                || appTransformation != null || screenAnimation) {
            // cache often used attributes locally
@@ -1268,7 +1268,7 @@ final class WindowState implements WindowManagerPolicy.WindowState {
            }
            if (screenAnimation) {
                tmpMatrix.postConcat(
                        mService.mScreenRotationAnimation.getEnterTransformation().getMatrix());
                        mService.mAnimator.mScreenRotationAnimation.getEnterTransformation().getMatrix());
            }

            // "convert" it into SurfaceFlinger's format
@@ -1311,7 +1311,7 @@ final class WindowState implements WindowManagerPolicy.WindowState {
                }
                if (screenAnimation) {
                    mShownAlpha *=
                        mService.mScreenRotationAnimation.getEnterTransformation().getAlpha();
                        mService.mAnimator.mScreenRotationAnimation.getEnterTransformation().getAlpha();
                }
            } else {
                //Slog.i(TAG, "Not applying alpha transform");