Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 82516899 authored by Vishnu Nair's avatar Vishnu Nair Committed by Android (Google) Code Review
Browse files

Merge "Call mergeWithNextTransaction in registerCallbacksForSync" into main

parents 304fa942 b81abc6a
Loading
Loading
Loading
Loading
+11 −1
Original line number Diff line number Diff line
@@ -11612,7 +11612,14 @@ public final class ViewRootImpl implements ViewParent,
            Log.d(mTag, "registerCallbacksForSync syncBuffer=" + syncBuffer);
        }

        surfaceSyncGroup.addTransaction(mPendingTransaction);
        final Transaction t;
        if (mHasPendingTransactions) {
            t = new Transaction();
            t.merge(mPendingTransaction);
        } else {
            t = null;
        }

        mAttachInfo.mThreadedRenderer.registerRtFrameCallback(new FrameDrawingCallback() {
            @Override
            public void onFrameDraw(long frame) {
@@ -11625,6 +11632,9 @@ public final class ViewRootImpl implements ViewParent,
                            "Received frameDrawingCallback syncResult=" + syncResult + " frameNum="
                                    + frame + ".");
                }
                if (t != null) {
                    mergeWithNextTransaction(t, frame);
                }

                // If the syncResults are SYNC_LOST_SURFACE_REWARD_IF_FOUND or
                // SYNC_CONTEXT_IS_STOPPED it means nothing will draw. There's no need to set up