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

Commit 97190e25 authored by Ady Abraham's avatar Ady Abraham Committed by Android (Google) Code Review
Browse files

Merge changes from topic "eEarlyWakeup_remove" into sc-dev

* changes:
  rename ExplicitEarlyWakeup -> EarlyWakeup
  Remove ISurfaceComposer::eEarlyWakeup
parents 15f8f2c5 5f1255f1
Loading
Loading
Loading
Loading
+0 −18
Original line number Diff line number Diff line
@@ -105,7 +105,6 @@ public final class SurfaceControl implements Parcelable {
    private static native void nativeMergeTransaction(long transactionObj,
            long otherTransactionObj);
    private static native void nativeSetAnimationTransaction(long transactionObj);
    private static native void nativeSetEarlyWakeup(long transactionObj);
    private static native void nativeSetEarlyWakeupStart(long transactionObj);
    private static native void nativeSetEarlyWakeupEnd(long transactionObj);

@@ -3175,23 +3174,6 @@ public final class SurfaceControl implements Parcelable {
            return this;
        }

        /**
         * @deprecated use {@link Transaction#setEarlyWakeupStart()}
         *
         * Indicate that SurfaceFlinger should wake up earlier than usual as a result of this
         * transaction. This should be used when the caller thinks that the scene is complex enough
         * that it's likely to hit GL composition, and thus, SurfaceFlinger needs to more time in
         * order not to miss frame deadlines.
         * <p>
         * Corresponds to setting ISurfaceComposer::eEarlyWakeup
         * @hide
         */
        @Deprecated
        public Transaction setEarlyWakeup() {
            nativeSetEarlyWakeup(mNativeObject);
            return this;
        }

         /**
          * Provides a hint to SurfaceFlinger to change its offset so that SurfaceFlinger wakes up
          * earlier to compose surfaces. The caller should use this as a hint to SurfaceFlinger
+2 −9
Original line number Diff line number Diff line
@@ -498,19 +498,14 @@ static void nativeSetAnimationTransaction(JNIEnv* env, jclass clazz, jlong trans
    transaction->setAnimationTransaction();
}

static void nativeSetEarlyWakeup(JNIEnv* env, jclass clazz, jlong transactionObj) {
    auto transaction = reinterpret_cast<SurfaceComposerClient::Transaction*>(transactionObj);
    transaction->setEarlyWakeup();
}

static void nativeSetEarlyWakeupStart(JNIEnv* env, jclass clazz, jlong transactionObj) {
    auto transaction = reinterpret_cast<SurfaceComposerClient::Transaction*>(transactionObj);
    transaction->setExplicitEarlyWakeupStart();
    transaction->setEarlyWakeupStart();
}

static void nativeSetEarlyWakeupEnd(JNIEnv* env, jclass clazz, jlong transactionObj) {
    auto transaction = reinterpret_cast<SurfaceComposerClient::Transaction*>(transactionObj);
    transaction->setExplicitEarlyWakeupEnd();
    transaction->setEarlyWakeupEnd();
}

static void nativeSetLayer(JNIEnv* env, jclass clazz, jlong transactionObj,
@@ -1737,8 +1732,6 @@ static const JNINativeMethod sSurfaceControlMethods[] = {
            (void*)nativeMergeTransaction },
    {"nativeSetAnimationTransaction", "(J)V",
            (void*)nativeSetAnimationTransaction },
    {"nativeSetEarlyWakeup", "(J)V",
            (void*)nativeSetEarlyWakeup },
    {"nativeSetEarlyWakeupStart", "(J)V",
            (void*)nativeSetEarlyWakeupStart },
    {"nativeSetEarlyWakeupEnd", "(J)V",
+0 −9
Original line number Diff line number Diff line
@@ -99,11 +99,6 @@ public class TransactionCompat {
        return this;
    }

    @Deprecated
    public TransactionCompat setEarlyWakeup() {
        return this;
    }

    public TransactionCompat setColor(SurfaceControlCompat surfaceControl, float[] color) {
        mTransaction.setColor(surfaceControl.mSurfaceControl, color);
        return this;
@@ -118,8 +113,4 @@ public class TransactionCompat {
            SurfaceControl relativeTo, int z) {
        t.setRelativeLayer(surfaceControl, relativeTo, z);
    }

    @Deprecated
    public static void setEarlyWakeup(Transaction t) {
    }
}
+1 −1
Original line number Diff line number Diff line
@@ -126,7 +126,7 @@ class LocalAnimationAdapter implements AnimationAdapter {
        /**
         * @return {@code true} if we need to wake-up SurfaceFlinger earlier during this animation.
         *
         * @see Transaction#setEarlyWakeup
         * @see Transaction#setEarlyWakeupStart and Transaction#setEarlyWakeupEnd
         */
        default boolean needsEarlyWakeup() { return false; }

+0 −5
Original line number Diff line number Diff line
@@ -197,11 +197,6 @@ public class StubTransaction extends SurfaceControl.Transaction {
        return this;
    }

    @Override
    public SurfaceControl.Transaction setEarlyWakeup() {
        return this;
    }

    @Override
    public SurfaceControl.Transaction setMetadata(SurfaceControl sc, int key, int data) {
        return this;