蕭xxz 2019-11-14 20:06 采纳率: 0%
浏览 203
已结题

Android P开始的渲染参数计算为什么判断条件只与屏幕旋转动画有关?

在Android API28以前,在WindowManagerService的computeShownFrameLocked方法中计算窗口动画渲染参数的时候采用了:

 if (selfTransformation || attachedTransformation != null
                || appTransformation != null || screenAnimation) {
            // cache often used attributes locally
            final Rect frame = mWin.mFrame;
            final float tmpFloats[] = mService.mTmpFloats;
            final Matrix tmpMatrix = mWin.mTmpMatrix;
                        。。。
    }

的方式,判断了四个Transformation。
而在API28及以后好像不再计算这几个Transformation(也许是我没找到。。),而仅仅通过ScreenRotationAnimation就开始进行渲染参数的计算:

  final boolean screenAnimation =
                screenRotationAnimation != null && screenRotationAnimation.isAnimating();

        if (screenAnimation) {
            // cache often used attributes locally
            final Rect frame = mWin.mFrame;
            final float tmpFloats[] = mService.mTmpFloats;
            final Matrix tmpMatrix = mWin.mTmpMatrix;
                        。。。。
            }

在这里有点绕晕了,,,求解答

  • 写回答

1条回答 默认 最新

  • zqbnqsdsmd 2019-11-14 22:09
    关注
    评论

报告相同问题?