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

Commit f6fc5088 authored by Pascal Mütschard's avatar Pascal Mütschard
Browse files

Don't use SF choreographer instance for PIP transition.

See b/222698397 for context. This makes jank data show up correctly
for the PIP transition CUJs.

Bug: b/352744636
Bug: b/b/222698397
Test: manual with Perfetto & atest PipAnimationControllerTest
Flag: EXEMPT bug fix
Change-Id: I5b3436af1c31aad0acb81e210f6b1dfbdf773c58
parent 24109ce0
Loading
Loading
Loading
Loading
+0 −10
Original line number Original line Diff line number Diff line
@@ -24,7 +24,6 @@ import static android.view.Surface.ROTATION_90;
import static com.android.wm.shell.pip.PipTransitionController.ANIM_TYPE_ALPHA;
import static com.android.wm.shell.pip.PipTransitionController.ANIM_TYPE_ALPHA;
import static com.android.wm.shell.pip.PipTransitionController.ANIM_TYPE_BOUNDS;
import static com.android.wm.shell.pip.PipTransitionController.ANIM_TYPE_BOUNDS;


import android.animation.AnimationHandler;
import android.animation.Animator;
import android.animation.Animator;
import android.animation.RectEvaluator;
import android.animation.RectEvaluator;
import android.animation.ValueAnimator;
import android.animation.ValueAnimator;
@@ -42,7 +41,6 @@ import android.view.SurfaceControl;
import android.window.TaskSnapshot;
import android.window.TaskSnapshot;


import com.android.internal.annotations.VisibleForTesting;
import com.android.internal.annotations.VisibleForTesting;
import com.android.internal.graphics.SfVsyncFrameCallbackProvider;
import com.android.internal.protolog.ProtoLog;
import com.android.internal.protolog.ProtoLog;
import com.android.launcher3.icons.IconProvider;
import com.android.launcher3.icons.IconProvider;
import com.android.wm.shell.common.pip.PipUtils;
import com.android.wm.shell.common.pip.PipUtils;
@@ -110,13 +108,6 @@ public class PipAnimationController {


    private final PipSurfaceTransactionHelper mSurfaceTransactionHelper;
    private final PipSurfaceTransactionHelper mSurfaceTransactionHelper;


    private final ThreadLocal<AnimationHandler> mSfAnimationHandlerThreadLocal =
            ThreadLocal.withInitial(() -> {
                AnimationHandler handler = new AnimationHandler();
                handler.setProvider(new SfVsyncFrameCallbackProvider());
                return handler;
            });

    private PipTransitionAnimator mCurrentAnimator;
    private PipTransitionAnimator mCurrentAnimator;
    @PipTransitionController.AnimationType
    @PipTransitionController.AnimationType
    private int mOneShotAnimationType = ANIM_TYPE_BOUNDS;
    private int mOneShotAnimationType = ANIM_TYPE_BOUNDS;
@@ -210,7 +201,6 @@ public class PipAnimationController {
        animator.setSurfaceTransactionHelper(mSurfaceTransactionHelper);
        animator.setSurfaceTransactionHelper(mSurfaceTransactionHelper);
        animator.setInterpolator(Interpolators.FAST_OUT_SLOW_IN);
        animator.setInterpolator(Interpolators.FAST_OUT_SLOW_IN);
        animator.setFloatValues(FRACTION_START, FRACTION_END);
        animator.setFloatValues(FRACTION_START, FRACTION_END);
        animator.setAnimationHandler(mSfAnimationHandlerThreadLocal.get());
        return animator;
        return animator;
    }
    }