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

Commit 211bf19c authored by Rob Carr's avatar Rob Carr Committed by Android (Google) Code Review
Browse files

Merge "Remove deferTransactionUntil" into sc-dev

parents f8f0b730 c07e9b21
Loading
Loading
Loading
Loading
+0 −17
Original line number Diff line number Diff line
@@ -185,8 +185,6 @@ public final class SurfaceControl implements Parcelable {
    private static native void nativeSetGameContentType(IBinder displayToken, boolean on);
    private static native void nativeSetDisplayPowerMode(
            IBinder displayToken, int mode);
    private static native void nativeDeferTransactionUntil(long transactionObj, long nativeObject,
            long barrierObject, long frame);
    private static native void nativeReparent(long transactionObj, long nativeObject,
            long newParentNativeObject);

@@ -3027,21 +3025,6 @@ public final class SurfaceControl implements Parcelable {
            return this;
        }

        /**
         * @hide
         */
        @UnsupportedAppUsage
        public Transaction deferTransactionUntil(SurfaceControl sc, SurfaceControl barrier,
                long frameNumber) {
            if (frameNumber < 0) {
                return this;
            }
            checkPreconditions(sc);
            nativeDeferTransactionUntil(mNativeObject, sc.mNativeObject, barrier.mNativeObject,
                    frameNumber);
            return this;
        }

        /**
         * Re-parents a given layer to a new parent. Children inherit transform (position, scaling)
         * crop, visibility, and Z-ordering from their parents, as if the children were pixels within the
+0 −10
Original line number Diff line number Diff line
@@ -1443,14 +1443,6 @@ static jboolean nativeGetAnimationFrameStats(JNIEnv* env, jclass clazz, jobject
    return JNI_TRUE;
}

static void nativeDeferTransactionUntil(JNIEnv* env, jclass clazz, jlong transactionObj,
        jlong nativeObject, jlong barrierObject, jlong frameNumber) {
    sp<SurfaceControl> ctrl = reinterpret_cast<SurfaceControl*>(nativeObject);
    sp<SurfaceControl> barrier = reinterpret_cast<SurfaceControl*>(barrierObject);
    auto transaction = reinterpret_cast<SurfaceComposerClient::Transaction*>(transactionObj);
    transaction->deferTransactionUntil_legacy(ctrl, barrier, frameNumber);
}

static void nativeReparent(JNIEnv* env, jclass clazz, jlong transactionObj,
        jlong nativeObject,
        jlong newParentObject) {
@@ -1856,8 +1848,6 @@ static const JNINativeMethod sSurfaceControlMethods[] = {
            (void*)nativeSetDisplayPowerMode },
    {"nativeGetProtectedContentSupport", "()Z",
            (void*)nativeGetProtectedContentSupport },
    {"nativeDeferTransactionUntil", "(JJJJ)V",
            (void*)nativeDeferTransactionUntil },
    {"nativeReparent", "(JJJ)V",
            (void*)nativeReparent },
    {"nativeCaptureDisplay",
+0 −12
Original line number Diff line number Diff line
@@ -92,23 +92,11 @@ public class TransactionCompat {
        return this;
    }

    public TransactionCompat deferTransactionUntil(SurfaceControlCompat surfaceControl,
            SurfaceControl barrier, long frameNumber) {
        mTransaction.deferTransactionUntil(surfaceControl.mSurfaceControl, barrier,
                frameNumber);
        return this;
    }

    public TransactionCompat setColor(SurfaceControlCompat surfaceControl, float[] color) {
        mTransaction.setColor(surfaceControl.mSurfaceControl, color);
        return this;
    }

    public static void deferTransactionUntil(Transaction t, SurfaceControl surfaceControl,
            SurfaceControl barrier, long frameNumber) {
        t.deferTransactionUntil(surfaceControl, barrier, frameNumber);
    }

    public static void setRelativeLayer(Transaction t, SurfaceControl surfaceControl,
            SurfaceControl relativeTo, int z) {
        t.setRelativeLayer(surfaceControl, relativeTo, z);
+0 −6
Original line number Diff line number Diff line
@@ -145,12 +145,6 @@ public class StubTransaction extends SurfaceControl.Transaction {
        return this;
    }

    @Override
    public SurfaceControl.Transaction deferTransactionUntil(SurfaceControl sc,
            SurfaceControl barrier, long frameNumber) {
        return this;
    }

    @Override
    public SurfaceControl.Transaction reparent(SurfaceControl sc, SurfaceControl newParent) {
        return this;