Merge "Merge "Reduce jittering while dragging divider bar" into tm-dev am: 19885f1c74 am: 95c7363730 am: f416c3f945" into tm-qpr-dev-plus-aosp
This commit is contained in:
committed by
Android (Google) Code Review
commit
95dda19a34
@@ -77,6 +77,7 @@ import android.os.IBinder;
|
||||
import android.os.RemoteException;
|
||||
import android.util.Log;
|
||||
import android.util.Slog;
|
||||
import android.view.Choreographer;
|
||||
import android.view.IRemoteAnimationFinishedCallback;
|
||||
import android.view.IRemoteAnimationRunner;
|
||||
import android.view.RemoteAnimationAdapter;
|
||||
@@ -1116,6 +1117,7 @@ public class StageCoordinator implements SplitLayout.SplitLayoutHandler,
|
||||
mDividerFadeInAnimator.cancel();
|
||||
return;
|
||||
}
|
||||
transaction.setFrameTimelineVsync(Choreographer.getInstance().getVsyncId());
|
||||
transaction.setAlpha(dividerLeash, (float) animation.getAnimatedValue());
|
||||
transaction.apply();
|
||||
});
|
||||
@@ -1210,17 +1212,23 @@ public class StageCoordinator implements SplitLayout.SplitLayoutHandler,
|
||||
|
||||
@Override
|
||||
public void onLayoutPositionChanging(SplitLayout layout) {
|
||||
mSyncQueue.runInSync(t -> updateSurfaceBounds(layout, t, false /* applyResizingOffset */));
|
||||
final SurfaceControl.Transaction t = mTransactionPool.acquire();
|
||||
t.setFrameTimelineVsync(Choreographer.getInstance().getVsyncId());
|
||||
updateSurfaceBounds(layout, t, false /* applyResizingOffset */);
|
||||
t.apply();
|
||||
mTransactionPool.release(t);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLayoutSizeChanging(SplitLayout layout) {
|
||||
mSyncQueue.runInSync(t -> {
|
||||
setResizingSplits(true /* resizing */);
|
||||
updateSurfaceBounds(layout, t, true /* applyResizingOffset */);
|
||||
mMainStage.onResizing(getMainStageBounds(), t);
|
||||
mSideStage.onResizing(getSideStageBounds(), t);
|
||||
});
|
||||
final SurfaceControl.Transaction t = mTransactionPool.acquire();
|
||||
t.setFrameTimelineVsync(Choreographer.getInstance().getVsyncId());
|
||||
setResizingSplits(true /* resizing */);
|
||||
updateSurfaceBounds(layout, t, true /* applyResizingOffset */);
|
||||
mMainStage.onResizing(getMainStageBounds(), t);
|
||||
mSideStage.onResizing(getSideStageBounds(), t);
|
||||
t.apply();
|
||||
mTransactionPool.release(t);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user