Loading core/java/android/view/ViewRootImpl.java +1 −1 Original line number Diff line number Diff line Loading @@ -1735,7 +1735,7 @@ public final class ViewRootImpl implements ViewParent, mBoundsLayer = new SurfaceControl.Builder(mSurfaceSession) .setContainerLayer() .setName("Bounds for - " + getTitle().toString()) .setParent(mSurfaceControl) .setParent(getRenderSurfaceControl()) .build(); setBoundsLayerCrop(); mTransaction.show(mBoundsLayer).apply(); Loading services/core/java/com/android/server/wm/InsetsSourceProvider.java +1 −1 Original line number Diff line number Diff line Loading @@ -274,7 +274,7 @@ class InsetsSourceProvider { // window crop of the surface controls (including the leash) until the client finishes // drawing the new frame of the new orientation. Although we cannot defer the reparent // operation, it is fine, because reparent won't cause any visual effect. final SurfaceControl barrier = mWin.getDeferTransactionBarrier(); final SurfaceControl barrier = mWin.getClientViewRootSurface(); t.deferTransactionUntil(mWin.getSurfaceControl(), barrier, frameNumber); t.deferTransactionUntil(leash, barrier, frameNumber); } Loading services/core/java/com/android/server/wm/SeamlessRotator.java +2 −2 Original line number Diff line number Diff line Loading @@ -118,9 +118,9 @@ public class SeamlessRotator { finish(t, win); if (win.mWinAnimator.mSurfaceController != null && !timeout) { t.deferTransactionUntil(win.mSurfaceControl, win.getDeferTransactionBarrier(), win.getFrameNumber()); win.getClientViewRootSurface(), win.getFrameNumber()); t.deferTransactionUntil(win.mWinAnimator.mSurfaceController.mSurfaceControl, win.getDeferTransactionBarrier(), win.getFrameNumber()); win.getClientViewRootSurface(), win.getFrameNumber()); } } Loading services/core/java/com/android/server/wm/WindowState.java +2 −2 Original line number Diff line number Diff line Loading @@ -5660,8 +5660,8 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP return mSession.mPid == pid && isNonToastOrStarting() && isVisibleNow(); } SurfaceControl getDeferTransactionBarrier() { return mWinAnimator.getDeferTransactionBarrier(); SurfaceControl getClientViewRootSurface() { return mWinAnimator.getClientViewRootSurface(); } @Override Loading services/core/java/com/android/server/wm/WindowStateAnimator.java +14 −12 Original line number Diff line number Diff line Loading @@ -383,7 +383,8 @@ class WindowStateAnimator { // Make sure to reparent any children of the new surface back to the preserved // surface before destroying it. if (mSurfaceController != null && mPendingDestroySurface != null) { mPostDrawTransaction.reparentChildren(mSurfaceController.mSurfaceControl, mPostDrawTransaction.reparentChildren( mSurfaceController.getClientViewRootSurface(), mPendingDestroySurface.mSurfaceControl).apply(); } destroySurfaceLocked(); Loading Loading @@ -413,9 +414,9 @@ class WindowStateAnimator { // child layers need to be reparented to the new surface to make this // transparent to the app. if (mWin.mActivityRecord == null || mWin.mActivityRecord.isRelaunching() == false) { mPostDrawTransaction.reparentChildren(mPendingDestroySurface.mSurfaceControl, mSurfaceController.mSurfaceControl) .apply(); mPostDrawTransaction.reparentChildren( mPendingDestroySurface.getClientViewRootSurface(), mSurfaceController.mSurfaceControl).apply(); } } } Loading Loading @@ -875,7 +876,7 @@ class WindowStateAnimator { if (mSurfaceResized && (mAttrType == TYPE_BASE_APPLICATION) && (task != null) && (task.getMainWindowSizeChangeTransaction() != null)) { mSurfaceController.deferTransactionUntil(mWin.getDeferTransactionBarrier(), mSurfaceController.deferTransactionUntil(mWin.getClientViewRootSurface(), mWin.getFrameNumber()); SurfaceControl.mergeToGlobalTransaction(task.getMainWindowSizeChangeTransaction()); task.setMainWindowSizeChangeTransaction(null); Loading Loading @@ -1012,7 +1013,7 @@ class WindowStateAnimator { // the WS position is reset (so the stack position is shown) at the same // time that the buffer size changes. setOffsetPositionForStackResize(false); mSurfaceController.deferTransactionUntil(mWin.getDeferTransactionBarrier(), mSurfaceController.deferTransactionUntil(mWin.getClientViewRootSurface(), mWin.getFrameNumber()); } else { final ActivityStack stack = mWin.getRootTask(); Loading Loading @@ -1043,7 +1044,7 @@ class WindowStateAnimator { // comes in at the new size (normally position and crop are unfrozen). // deferTransactionUntil accomplishes this for us. if (wasForceScaled && !mForceScaleUntilResize) { mSurfaceController.deferTransactionUntil(mWin.getDeferTransactionBarrier(), mSurfaceController.deferTransactionUntil(mWin.getClientViewRootSurface(), mWin.getFrameNumber()); mSurfaceController.forceScaleableInTransaction(false); } Loading Loading @@ -1288,7 +1289,8 @@ class WindowStateAnimator { if (mPendingDestroySurface != null && mDestroyPreservedSurfaceUponRedraw) { final SurfaceControl pendingSurfaceControl = mPendingDestroySurface.mSurfaceControl; mPostDrawTransaction.reparent(pendingSurfaceControl, null); mPostDrawTransaction.reparentChildren(pendingSurfaceControl, mPostDrawTransaction.reparentChildren( mPendingDestroySurface.getClientViewRootSurface(), mSurfaceController.mSurfaceControl); } Loading Loading @@ -1521,10 +1523,10 @@ class WindowStateAnimator { mOffsetPositionForStackResize = offsetPositionForStackResize; } SurfaceControl getDeferTransactionBarrier() { SurfaceControl getClientViewRootSurface() { if (!hasSurface()) { return null; } return mSurfaceController.getDeferTransactionBarrier(); return mSurfaceController.getClientViewRootSurface(); } } Loading
core/java/android/view/ViewRootImpl.java +1 −1 Original line number Diff line number Diff line Loading @@ -1735,7 +1735,7 @@ public final class ViewRootImpl implements ViewParent, mBoundsLayer = new SurfaceControl.Builder(mSurfaceSession) .setContainerLayer() .setName("Bounds for - " + getTitle().toString()) .setParent(mSurfaceControl) .setParent(getRenderSurfaceControl()) .build(); setBoundsLayerCrop(); mTransaction.show(mBoundsLayer).apply(); Loading
services/core/java/com/android/server/wm/InsetsSourceProvider.java +1 −1 Original line number Diff line number Diff line Loading @@ -274,7 +274,7 @@ class InsetsSourceProvider { // window crop of the surface controls (including the leash) until the client finishes // drawing the new frame of the new orientation. Although we cannot defer the reparent // operation, it is fine, because reparent won't cause any visual effect. final SurfaceControl barrier = mWin.getDeferTransactionBarrier(); final SurfaceControl barrier = mWin.getClientViewRootSurface(); t.deferTransactionUntil(mWin.getSurfaceControl(), barrier, frameNumber); t.deferTransactionUntil(leash, barrier, frameNumber); } Loading
services/core/java/com/android/server/wm/SeamlessRotator.java +2 −2 Original line number Diff line number Diff line Loading @@ -118,9 +118,9 @@ public class SeamlessRotator { finish(t, win); if (win.mWinAnimator.mSurfaceController != null && !timeout) { t.deferTransactionUntil(win.mSurfaceControl, win.getDeferTransactionBarrier(), win.getFrameNumber()); win.getClientViewRootSurface(), win.getFrameNumber()); t.deferTransactionUntil(win.mWinAnimator.mSurfaceController.mSurfaceControl, win.getDeferTransactionBarrier(), win.getFrameNumber()); win.getClientViewRootSurface(), win.getFrameNumber()); } } Loading
services/core/java/com/android/server/wm/WindowState.java +2 −2 Original line number Diff line number Diff line Loading @@ -5660,8 +5660,8 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP return mSession.mPid == pid && isNonToastOrStarting() && isVisibleNow(); } SurfaceControl getDeferTransactionBarrier() { return mWinAnimator.getDeferTransactionBarrier(); SurfaceControl getClientViewRootSurface() { return mWinAnimator.getClientViewRootSurface(); } @Override Loading
services/core/java/com/android/server/wm/WindowStateAnimator.java +14 −12 Original line number Diff line number Diff line Loading @@ -383,7 +383,8 @@ class WindowStateAnimator { // Make sure to reparent any children of the new surface back to the preserved // surface before destroying it. if (mSurfaceController != null && mPendingDestroySurface != null) { mPostDrawTransaction.reparentChildren(mSurfaceController.mSurfaceControl, mPostDrawTransaction.reparentChildren( mSurfaceController.getClientViewRootSurface(), mPendingDestroySurface.mSurfaceControl).apply(); } destroySurfaceLocked(); Loading Loading @@ -413,9 +414,9 @@ class WindowStateAnimator { // child layers need to be reparented to the new surface to make this // transparent to the app. if (mWin.mActivityRecord == null || mWin.mActivityRecord.isRelaunching() == false) { mPostDrawTransaction.reparentChildren(mPendingDestroySurface.mSurfaceControl, mSurfaceController.mSurfaceControl) .apply(); mPostDrawTransaction.reparentChildren( mPendingDestroySurface.getClientViewRootSurface(), mSurfaceController.mSurfaceControl).apply(); } } } Loading Loading @@ -875,7 +876,7 @@ class WindowStateAnimator { if (mSurfaceResized && (mAttrType == TYPE_BASE_APPLICATION) && (task != null) && (task.getMainWindowSizeChangeTransaction() != null)) { mSurfaceController.deferTransactionUntil(mWin.getDeferTransactionBarrier(), mSurfaceController.deferTransactionUntil(mWin.getClientViewRootSurface(), mWin.getFrameNumber()); SurfaceControl.mergeToGlobalTransaction(task.getMainWindowSizeChangeTransaction()); task.setMainWindowSizeChangeTransaction(null); Loading Loading @@ -1012,7 +1013,7 @@ class WindowStateAnimator { // the WS position is reset (so the stack position is shown) at the same // time that the buffer size changes. setOffsetPositionForStackResize(false); mSurfaceController.deferTransactionUntil(mWin.getDeferTransactionBarrier(), mSurfaceController.deferTransactionUntil(mWin.getClientViewRootSurface(), mWin.getFrameNumber()); } else { final ActivityStack stack = mWin.getRootTask(); Loading Loading @@ -1043,7 +1044,7 @@ class WindowStateAnimator { // comes in at the new size (normally position and crop are unfrozen). // deferTransactionUntil accomplishes this for us. if (wasForceScaled && !mForceScaleUntilResize) { mSurfaceController.deferTransactionUntil(mWin.getDeferTransactionBarrier(), mSurfaceController.deferTransactionUntil(mWin.getClientViewRootSurface(), mWin.getFrameNumber()); mSurfaceController.forceScaleableInTransaction(false); } Loading Loading @@ -1288,7 +1289,8 @@ class WindowStateAnimator { if (mPendingDestroySurface != null && mDestroyPreservedSurfaceUponRedraw) { final SurfaceControl pendingSurfaceControl = mPendingDestroySurface.mSurfaceControl; mPostDrawTransaction.reparent(pendingSurfaceControl, null); mPostDrawTransaction.reparentChildren(pendingSurfaceControl, mPostDrawTransaction.reparentChildren( mPendingDestroySurface.getClientViewRootSurface(), mSurfaceController.mSurfaceControl); } Loading Loading @@ -1521,10 +1523,10 @@ class WindowStateAnimator { mOffsetPositionForStackResize = offsetPositionForStackResize; } SurfaceControl getDeferTransactionBarrier() { SurfaceControl getClientViewRootSurface() { if (!hasSurface()) { return null; } return mSurfaceController.getDeferTransactionBarrier(); return mSurfaceController.getClientViewRootSurface(); } }