Merge "Add a few TODOs for removing getSfInstance" into tm-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
4827ea25a2
@@ -873,6 +873,7 @@ public final class ViewRootImpl implements ViewParent,
|
|||||||
mDensity = context.getResources().getDisplayMetrics().densityDpi;
|
mDensity = context.getResources().getDisplayMetrics().densityDpi;
|
||||||
mNoncompatDensity = context.getResources().getDisplayMetrics().noncompatDensityDpi;
|
mNoncompatDensity = context.getResources().getDisplayMetrics().noncompatDensityDpi;
|
||||||
mFallbackEventHandler = new PhoneFallbackEventHandler(context);
|
mFallbackEventHandler = new PhoneFallbackEventHandler(context);
|
||||||
|
// TODO(b/222696368): remove getSfInstance usage and use vsyncId for transactions
|
||||||
mChoreographer = useSfChoreographer
|
mChoreographer = useSfChoreographer
|
||||||
? Choreographer.getSfInstance() : Choreographer.getInstance();
|
? Choreographer.getSfInstance() : Choreographer.getInstance();
|
||||||
mDisplayManager = (DisplayManager)context.getSystemService(Context.DISPLAY_SERVICE);
|
mDisplayManager = (DisplayManager)context.getSystemService(Context.DISPLAY_SERVICE);
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ import android.view.Choreographer;
|
|||||||
*
|
*
|
||||||
* @hide
|
* @hide
|
||||||
*/
|
*/
|
||||||
|
// TODO(b/222698397): remove getSfInstance/this class usage and use vsyncId for transactions
|
||||||
public final class SfVsyncFrameCallbackProvider implements AnimationFrameCallbackProvider {
|
public final class SfVsyncFrameCallbackProvider implements AnimationFrameCallbackProvider {
|
||||||
|
|
||||||
private final Choreographer mChoreographer;
|
private final Choreographer mChoreographer;
|
||||||
|
|||||||
@@ -148,6 +148,7 @@ public class PipInputConsumer {
|
|||||||
mMainExecutor.execute(() -> {
|
mMainExecutor.execute(() -> {
|
||||||
// Choreographer.getSfInstance() must be called on the thread that the input event
|
// Choreographer.getSfInstance() must be called on the thread that the input event
|
||||||
// receiver should be receiving events
|
// receiver should be receiving events
|
||||||
|
// TODO(b/222697646): remove getSfInstance usage and use vsyncId for transactions
|
||||||
mInputEventReceiver = new InputEventReceiver(inputChannel,
|
mInputEventReceiver = new InputEventReceiver(inputChannel,
|
||||||
Looper.myLooper(), Choreographer.getSfInstance());
|
Looper.myLooper(), Choreographer.getSfInstance());
|
||||||
if (mRegistrationListener != null) {
|
if (mRegistrationListener != null) {
|
||||||
|
|||||||
@@ -95,6 +95,8 @@ public class PipMotionHelper implements PipAppOpsListener.Callback,
|
|||||||
final FrameCallbackScheduler scheduler = new FrameCallbackScheduler() {
|
final FrameCallbackScheduler scheduler = new FrameCallbackScheduler() {
|
||||||
@Override
|
@Override
|
||||||
public void postFrameCallback(@androidx.annotation.NonNull Runnable runnable) {
|
public void postFrameCallback(@androidx.annotation.NonNull Runnable runnable) {
|
||||||
|
// TODO(b/222697646): remove getSfInstance usage and use vsyncId for
|
||||||
|
// transactions
|
||||||
Choreographer.getSfInstance().postFrameCallback(t -> runnable.run());
|
Choreographer.getSfInstance().postFrameCallback(t -> runnable.run());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -625,6 +625,7 @@ public class PipResizeGestureHandler {
|
|||||||
|
|
||||||
class PipResizeInputEventReceiver extends BatchedInputEventReceiver {
|
class PipResizeInputEventReceiver extends BatchedInputEventReceiver {
|
||||||
PipResizeInputEventReceiver(InputChannel channel, Looper looper) {
|
PipResizeInputEventReceiver(InputChannel channel, Looper looper) {
|
||||||
|
// TODO(b/222697646): remove getSfInstance usage and use vsyncId for transactions
|
||||||
super(channel, looper, Choreographer.getSfInstance());
|
super(channel, looper, Choreographer.getSfInstance());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user