Loading core/java/android/view/InsetsController.java +3 −2 Original line number Diff line number Diff line Loading @@ -724,12 +724,13 @@ public class InsetsController implements WindowInsetsController, InsetsAnimation mApplier = new SyncRtSurfaceTransactionApplier(mViewRoot.mView); } if (mViewRoot.mView.isHardwareAccelerated()) { mApplier.scheduleApply(params); mApplier.scheduleApply(false /* earlyWakeup */, params); } else { // Window doesn't support hardware acceleration, no synchronization for now. // TODO(b/149342281): use mViewRoot.mSurface.getNextFrameNumber() to sync on every // frame instead. mApplier.applyParams(new Transaction(), -1 /* frame */, params); mApplier.applyParams(new Transaction(), -1 /* frame */, false /* earlyWakeup */, params); } } Loading core/java/android/view/SurfaceView.java +1 −1 Original line number Diff line number Diff line Loading @@ -605,7 +605,7 @@ public class SurfaceView extends View implements ViewRootImpl.SurfaceChangedCall mTmpRect.set(0, 0, mSurfaceWidth, mSurfaceHeight); } SyncRtSurfaceTransactionApplier applier = new SyncRtSurfaceTransactionApplier(this); applier.scheduleApply( applier.scheduleApply(false /* earlyWakeup */, new SyncRtSurfaceTransactionApplier.SurfaceParams.Builder(mSurfaceControl) .withWindowCrop(mTmpRect) .build()); Loading core/java/android/view/SyncRtSurfaceTransactionApplier.java +9 −4 Original line number Diff line number Diff line Loading @@ -53,10 +53,11 @@ public class SyncRtSurfaceTransactionApplier { /** * Schedules applying surface parameters on the next frame. * * @param earlyWakeup Whether to set {@link Transaction#setEarlyWakeup()} on transaction. * @param params The surface parameters to apply. DO NOT MODIFY the list after passing into * this method to avoid synchronization issues. */ public void scheduleApply(final SurfaceParams... params) { public void scheduleApply(boolean earlyWakeup, final SurfaceParams... params) { if (mTargetViewRootImpl == null) { return; } Loading @@ -66,7 +67,7 @@ public class SyncRtSurfaceTransactionApplier { return; } Transaction t = new Transaction(); applyParams(t, frame, params); applyParams(t, frame, earlyWakeup, params); }); // Make sure a frame gets scheduled. Loading @@ -77,10 +78,12 @@ public class SyncRtSurfaceTransactionApplier { * Applies surface parameters on the next frame. * @param t transaction to apply all parameters in. * @param frame frame to synchronize to. Set -1 when sync is not required. * @param earlyWakeup Whether to set {@link Transaction#setEarlyWakeup()} on transaction. * @param params The surface parameters to apply. DO NOT MODIFY the list after passing into * this method to avoid synchronization issues. */ void applyParams(Transaction t, long frame, final SurfaceParams... params) { void applyParams(Transaction t, long frame, boolean earlyWakeup, final SurfaceParams... params) { for (int i = params.length - 1; i >= 0; i--) { SurfaceParams surfaceParams = params[i]; SurfaceControl surface = surfaceParams.surface; Loading @@ -89,7 +92,9 @@ public class SyncRtSurfaceTransactionApplier { } applyParams(t, surfaceParams, mTmpFloat9); } if (earlyWakeup) { t.setEarlyWakeup(); } t.apply(); } Loading packages/SystemUI/src/com/android/systemui/statusbar/notification/ActivityLaunchAnimator.java +1 −1 Original line number Diff line number Diff line Loading @@ -282,7 +282,7 @@ public class ActivityLaunchAnimator { .withCornerRadius(mCornerRadius) .withVisibility(true) .build(); mSyncRtTransactionApplier.scheduleApply(params); mSyncRtTransactionApplier.scheduleApply(true /* earlyWakeup */, params); } @Override Loading Loading
core/java/android/view/InsetsController.java +3 −2 Original line number Diff line number Diff line Loading @@ -724,12 +724,13 @@ public class InsetsController implements WindowInsetsController, InsetsAnimation mApplier = new SyncRtSurfaceTransactionApplier(mViewRoot.mView); } if (mViewRoot.mView.isHardwareAccelerated()) { mApplier.scheduleApply(params); mApplier.scheduleApply(false /* earlyWakeup */, params); } else { // Window doesn't support hardware acceleration, no synchronization for now. // TODO(b/149342281): use mViewRoot.mSurface.getNextFrameNumber() to sync on every // frame instead. mApplier.applyParams(new Transaction(), -1 /* frame */, params); mApplier.applyParams(new Transaction(), -1 /* frame */, false /* earlyWakeup */, params); } } Loading
core/java/android/view/SurfaceView.java +1 −1 Original line number Diff line number Diff line Loading @@ -605,7 +605,7 @@ public class SurfaceView extends View implements ViewRootImpl.SurfaceChangedCall mTmpRect.set(0, 0, mSurfaceWidth, mSurfaceHeight); } SyncRtSurfaceTransactionApplier applier = new SyncRtSurfaceTransactionApplier(this); applier.scheduleApply( applier.scheduleApply(false /* earlyWakeup */, new SyncRtSurfaceTransactionApplier.SurfaceParams.Builder(mSurfaceControl) .withWindowCrop(mTmpRect) .build()); Loading
core/java/android/view/SyncRtSurfaceTransactionApplier.java +9 −4 Original line number Diff line number Diff line Loading @@ -53,10 +53,11 @@ public class SyncRtSurfaceTransactionApplier { /** * Schedules applying surface parameters on the next frame. * * @param earlyWakeup Whether to set {@link Transaction#setEarlyWakeup()} on transaction. * @param params The surface parameters to apply. DO NOT MODIFY the list after passing into * this method to avoid synchronization issues. */ public void scheduleApply(final SurfaceParams... params) { public void scheduleApply(boolean earlyWakeup, final SurfaceParams... params) { if (mTargetViewRootImpl == null) { return; } Loading @@ -66,7 +67,7 @@ public class SyncRtSurfaceTransactionApplier { return; } Transaction t = new Transaction(); applyParams(t, frame, params); applyParams(t, frame, earlyWakeup, params); }); // Make sure a frame gets scheduled. Loading @@ -77,10 +78,12 @@ public class SyncRtSurfaceTransactionApplier { * Applies surface parameters on the next frame. * @param t transaction to apply all parameters in. * @param frame frame to synchronize to. Set -1 when sync is not required. * @param earlyWakeup Whether to set {@link Transaction#setEarlyWakeup()} on transaction. * @param params The surface parameters to apply. DO NOT MODIFY the list after passing into * this method to avoid synchronization issues. */ void applyParams(Transaction t, long frame, final SurfaceParams... params) { void applyParams(Transaction t, long frame, boolean earlyWakeup, final SurfaceParams... params) { for (int i = params.length - 1; i >= 0; i--) { SurfaceParams surfaceParams = params[i]; SurfaceControl surface = surfaceParams.surface; Loading @@ -89,7 +92,9 @@ public class SyncRtSurfaceTransactionApplier { } applyParams(t, surfaceParams, mTmpFloat9); } if (earlyWakeup) { t.setEarlyWakeup(); } t.apply(); } Loading
packages/SystemUI/src/com/android/systemui/statusbar/notification/ActivityLaunchAnimator.java +1 −1 Original line number Diff line number Diff line Loading @@ -282,7 +282,7 @@ public class ActivityLaunchAnimator { .withCornerRadius(mCornerRadius) .withVisibility(true) .build(); mSyncRtTransactionApplier.scheduleApply(params); mSyncRtTransactionApplier.scheduleApply(true /* earlyWakeup */, params); } @Override Loading