在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;
。。。。
}
在这里有点绕晕了,,,求解答