Merge "Use sync transaction for dim layer and scale" into tm-dev
This commit is contained in:
@@ -144,7 +144,8 @@ class AsyncRotationController extends FadeAnimationController implements Consume
|
|||||||
// Legacy animation doesn't need to wait for the start transaction.
|
// Legacy animation doesn't need to wait for the start transaction.
|
||||||
if (mTransitionOp == OP_LEGACY) {
|
if (mTransitionOp == OP_LEGACY) {
|
||||||
mIsStartTransactionCommitted = true;
|
mIsStartTransactionCommitted = true;
|
||||||
} else if (displayContent.mTransitionController.useShellTransitionsRotation()) {
|
} else if (displayContent.mTransitionController.useShellTransitionsRotation()
|
||||||
|
|| displayContent.mTransitionController.isCollecting(displayContent)) {
|
||||||
keepAppearanceInPreviousRotation();
|
keepAppearanceInPreviousRotation();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -662,7 +662,7 @@ public class DisplayArea<T extends WindowContainer> extends WindowContainer<T> {
|
|||||||
mDimmer.resetDimStates();
|
mDimmer.resetDimStates();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mDimmer.updateDims(getPendingTransaction(), mTmpDimBoundsRect)) {
|
if (mDimmer.updateDims(getSyncTransaction(), mTmpDimBoundsRect)) {
|
||||||
scheduleAnimation();
|
scheduleAnimation();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3297,9 +3297,10 @@ class Task extends TaskFragment {
|
|||||||
mTmpDimBoundsRect.offsetTo(0, 0);
|
mTmpDimBoundsRect.offsetTo(0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
updateShadowsRadius(isFocused(), getSyncTransaction());
|
final SurfaceControl.Transaction t = getSyncTransaction();
|
||||||
|
updateShadowsRadius(isFocused(), t);
|
||||||
|
|
||||||
if (mDimmer.updateDims(getPendingTransaction(), mTmpDimBoundsRect)) {
|
if (mDimmer.updateDims(t, mTmpDimBoundsRect)) {
|
||||||
scheduleAnimation();
|
scheduleAnimation();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3309,7 +3310,7 @@ class Task extends TaskFragment {
|
|||||||
final boolean show = isVisible() || isAnimating(TRANSITION | PARENTS | CHILDREN);
|
final boolean show = isVisible() || isAnimating(TRANSITION | PARENTS | CHILDREN);
|
||||||
if (mSurfaceControl != null) {
|
if (mSurfaceControl != null) {
|
||||||
if (show != mLastSurfaceShowing) {
|
if (show != mLastSurfaceShowing) {
|
||||||
getSyncTransaction().setVisibility(mSurfaceControl, show);
|
t.setVisibility(mSurfaceControl, show);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
mLastSurfaceShowing = show;
|
mLastSurfaceShowing = show;
|
||||||
|
|||||||
@@ -2425,7 +2425,7 @@ class TaskFragment extends WindowContainer<WindowContainer> {
|
|||||||
// Bounds need to be relative, as the dim layer is a child.
|
// Bounds need to be relative, as the dim layer is a child.
|
||||||
final Rect dimBounds = getBounds();
|
final Rect dimBounds = getBounds();
|
||||||
dimBounds.offsetTo(0 /* newLeft */, 0 /* newTop */);
|
dimBounds.offsetTo(0 /* newLeft */, 0 /* newTop */);
|
||||||
if (mDimmer.updateDims(getPendingTransaction(), dimBounds)) {
|
if (mDimmer.updateDims(getSyncTransaction(), dimBounds)) {
|
||||||
scheduleAnimation();
|
scheduleAnimation();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5272,6 +5272,12 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP
|
|||||||
if (mControllableInsetProvider != null) {
|
if (mControllableInsetProvider != null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (mDisplayContent.inTransition()) {
|
||||||
|
// Skip because the animation is usually unnoticeable (e.g. covered by rotation
|
||||||
|
// animation) and the animation bounds could be inconsistent, such as depending
|
||||||
|
// on when the window applies its draw transaction with new rotation.
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
final DisplayInfo displayInfo = getDisplayInfo();
|
final DisplayInfo displayInfo = getDisplayInfo();
|
||||||
anim.initialize(mWindowFrames.mFrame.width(), mWindowFrames.mFrame.height(),
|
anim.initialize(mWindowFrames.mFrame.width(), mWindowFrames.mFrame.height(),
|
||||||
@@ -5516,10 +5522,8 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP
|
|||||||
}
|
}
|
||||||
float newHScale = mHScale * mGlobalScale * mWallpaperScale;
|
float newHScale = mHScale * mGlobalScale * mWallpaperScale;
|
||||||
float newVScale = mVScale * mGlobalScale * mWallpaperScale;
|
float newVScale = mVScale * mGlobalScale * mWallpaperScale;
|
||||||
if (mLastHScale != newHScale ||
|
if (mLastHScale != newHScale || mLastVScale != newVScale) {
|
||||||
mLastVScale != newVScale ) {
|
getSyncTransaction().setMatrix(mSurfaceControl, newHScale, 0, 0, newVScale);
|
||||||
getPendingTransaction().setMatrix(getSurfaceControl(),
|
|
||||||
newHScale, 0, 0, newVScale);
|
|
||||||
mLastHScale = newHScale;
|
mLastHScale = newHScale;
|
||||||
mLastVScale = newVScale;
|
mLastVScale = newVScale;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user