Loading core/java/android/view/InsetsController.java +8 −1 Original line number Diff line number Diff line Loading @@ -700,7 +700,14 @@ public class InsetsController implements WindowInsetsController, InsetsAnimation } mApplier = new SyncRtSurfaceTransactionApplier(mViewRoot.mView); } if (mViewRoot.mView.isHardwareAccelerated()) { mApplier.scheduleApply(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); } } void notifyControlRevoked(InsetsSourceConsumer consumer) { Loading core/java/android/view/SyncRtSurfaceTransactionApplier.java +21 −8 Original line number Diff line number Diff line Loading @@ -65,18 +65,31 @@ public class SyncRtSurfaceTransactionApplier { return; } Transaction t = new Transaction(); applyParams(t, frame, params); }); // Make sure a frame gets scheduled. mTargetViewRootImpl.getView().invalidate(); } /** * 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 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) { for (int i = params.length - 1; i >= 0; i--) { SurfaceParams surfaceParams = params[i]; SurfaceControl surface = surfaceParams.surface; if (frame > 0) { t.deferTransactionUntil(surface, mTargetSc, frame); } applyParams(t, surfaceParams, mTmpFloat9); } t.setEarlyWakeup(); t.apply(); }); // Make sure a frame gets scheduled. mTargetViewRootImpl.getView().invalidate(); } public static void applyParams(Transaction t, SurfaceParams params, float[] tmpFloat9) { Loading Loading
core/java/android/view/InsetsController.java +8 −1 Original line number Diff line number Diff line Loading @@ -700,7 +700,14 @@ public class InsetsController implements WindowInsetsController, InsetsAnimation } mApplier = new SyncRtSurfaceTransactionApplier(mViewRoot.mView); } if (mViewRoot.mView.isHardwareAccelerated()) { mApplier.scheduleApply(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); } } void notifyControlRevoked(InsetsSourceConsumer consumer) { Loading
core/java/android/view/SyncRtSurfaceTransactionApplier.java +21 −8 Original line number Diff line number Diff line Loading @@ -65,18 +65,31 @@ public class SyncRtSurfaceTransactionApplier { return; } Transaction t = new Transaction(); applyParams(t, frame, params); }); // Make sure a frame gets scheduled. mTargetViewRootImpl.getView().invalidate(); } /** * 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 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) { for (int i = params.length - 1; i >= 0; i--) { SurfaceParams surfaceParams = params[i]; SurfaceControl surface = surfaceParams.surface; if (frame > 0) { t.deferTransactionUntil(surface, mTargetSc, frame); } applyParams(t, surfaceParams, mTmpFloat9); } t.setEarlyWakeup(); t.apply(); }); // Make sure a frame gets scheduled. mTargetViewRootImpl.getView().invalidate(); } public static void applyParams(Transaction t, SurfaceParams params, float[] tmpFloat9) { Loading