Pinned stack animation: Correct scaling calculations.
Previously we were scaling to the clip rectangle which included the Surface insets. When we changed to scaling to the stack bounds, we didn't update this code, and reversed the insets in a situation they weren't applied. Bug: 35396882 Test: Move skeleton pip app from fullscreen to pip, ensure it reaches correct final size without jump at end. Change-Id: If2dc272f40f90383e35d509f7220c21e0e0be5b1
This commit is contained in:
@@ -1328,8 +1328,8 @@ class WindowStateAnimator {
|
||||
task.mStack.getDimBounds(mTmpStackBounds);
|
||||
// We want to calculate the scaling based on the content area, not based on
|
||||
// the entire surface, so that we scale in sync with windows that don't have insets.
|
||||
mExtraHScale = (mTmpStackBounds.width() - hInsets) / (float)(surfaceWidth - hInsets);
|
||||
mExtraVScale = (mTmpStackBounds.height() - vInsets) / (float)(surfaceHeight - vInsets);
|
||||
mExtraHScale = mTmpStackBounds.width() / (float)(surfaceWidth - hInsets);
|
||||
mExtraVScale = mTmpStackBounds.height() / (float)(surfaceHeight - vInsets);
|
||||
|
||||
// In the case of ForceScaleToStack we scale entire tasks together,
|
||||
// and so we need to scale our offsets relative to the task bounds
|
||||
|
||||
Reference in New Issue
Block a user