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

Commit 87528b5f authored by Hongwei Wang's avatar Hongwei Wang Committed by Android (Google) Code Review
Browse files

Merge "Revert "SyncRtSurfaceTransactionApplier: Use BLASTSync"" into sc-dev

parents 5dd5b13e de64ae17
Loading
Loading
Loading
Loading
+4 −5
Original line number Diff line number Diff line
@@ -85,14 +85,13 @@ public class SyncRtSurfaceTransactionApplier {
        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);
        }
        if (mTargetViewRootImpl != null) {
            mTargetViewRootImpl.mergeWithNextTransaction(t, frame);
        } else {
        t.apply();
    }
    }

    public static void applyParams(Transaction t, SurfaceParams params, float[] tmpFloat9) {
        if ((params.flags & FLAG_TRANSACTION) != 0) {
+1 −1
Original line number Diff line number Diff line
@@ -10109,7 +10109,7 @@ public final class ViewRootImpl implements ViewParent,
     * Merges the transaction passed in with the next transaction in BLASTBufferQueue. This ensures
     * you can add transactions to the upcoming frame.
     */
    public void mergeWithNextTransaction(Transaction t, long frameNumber) {
    void mergeWithNextTransaction(Transaction t, long frameNumber) {
        if (mBlastBufferQueue != null) {
            mBlastBufferQueue.mergeWithNextTransaction(t, frameNumber);
        }
+2 −5
Original line number Diff line number Diff line
@@ -114,13 +114,10 @@ public class SyncRtSurfaceTransactionApplierCompat {
                for (int i = params.length - 1; i >= 0; i--) {
                    SyncRtSurfaceTransactionApplierCompat.SurfaceParams surfaceParams =
                            params[i];
                    t.deferTransactionUntil(surfaceParams.surface, mBarrierSurfaceControl, frame);
                    surfaceParams.applyTo(t);
                }
                if (mTargetViewRootImpl != null) {
                    mTargetViewRootImpl.mergeWithNextTransaction(t, frame);
                } else {
                t.apply();
                }
                Trace.traceEnd(Trace.TRACE_TAG_VIEW);
                Message.obtain(mApplyHandler, MSG_UPDATE_SEQUENCE_NUMBER, toApplySeqNo, 0)
                        .sendToTarget();
+0 −8
Original line number Diff line number Diff line
@@ -56,12 +56,4 @@ public class ViewRootImplCompat {
                    });
        }
    }

    public void mergeWithNextTransaction(SurfaceControl.Transaction t, long frame) {
        if (mViewRoot != null) {
            mViewRoot.mergeWithNextTransaction(t, frame);
        } else {
            t.apply();
        }
    }
}