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

Commit 007340c9 authored by chaviw's avatar chaviw
Browse files

Remove setGeometryAppliesWithResize

This function is no longer used so removing the API and any logic
implemented for it.

Test: go/wm-smoke
Change-Id: I5701507005134c6ed2e94d2843ae502705f1e2f7
parent 07242285
Loading
Loading
Loading
Loading
+0 −26
Original line number Diff line number Diff line
@@ -105,8 +105,6 @@ public final class SurfaceControl implements Parcelable {
            long relativeToObject, int zorder);
    private static native void nativeSetPosition(long transactionObj, long nativeObject,
            float x, float y);
    private static native void nativeSetGeometryAppliesWithResize(long transactionObj,
            long nativeObject);
    private static native void nativeSetSize(long transactionObj, long nativeObject, int w, int h);
    private static native void nativeSetTransparentRegionHint(long transactionObj,
            long nativeObject, Region region);
@@ -1101,16 +1099,6 @@ public final class SurfaceControl implements Parcelable {
        }
    }

    /**
     * @hide
     */
    public void setGeometryAppliesWithResize() {
        checkNotReleased();
        synchronized(SurfaceControl.class) {
            sGlobalTransaction.setGeometryAppliesWithResize(this);
        }
    }

    /**
     * @hide
     */
@@ -2487,20 +2475,6 @@ public final class SurfaceControl implements Parcelable {
            return this;
        }

        /**
         * If the buffer size changes in this transaction, position and crop updates specified
         * in this transaction will not complete until a buffer of the new size
         * arrives. As transform matrix and size are already frozen in this fashion,
         * this enables totally freezing the surface until the resize has completed
         * (at which point the geometry influencing aspects of this transaction will then occur)
         * @hide
         */
        public Transaction setGeometryAppliesWithResize(SurfaceControl sc) {
            sc.checkNotReleased();
            nativeSetGeometryAppliesWithResize(mNativeObject, sc.mNativeObject);
            return this;
        }

        /**
         * Sets the security of the surface.  Setting the flag is equivalent to creating the
         * Surface with the {@link #SECURE} flag.
+0 −11
Original line number Diff line number Diff line
@@ -397,15 +397,6 @@ static void nativeSetGeometry(JNIEnv* env, jclass clazz, jlong transactionObj, j
    transaction->setGeometry(ctrl, source, dst, orientation);
}

static void nativeSetGeometryAppliesWithResize(JNIEnv* env, jclass clazz,
jlong transactionObj,
        jlong nativeObject) {
    auto transaction = reinterpret_cast<SurfaceComposerClient::Transaction*>(transactionObj);

    SurfaceControl* const ctrl = reinterpret_cast<SurfaceControl *>(nativeObject);
    transaction->setGeometryAppliesWithResize(ctrl);
}

static void nativeSetSize(JNIEnv* env, jclass clazz, jlong transactionObj,
        jlong nativeObject, jint w, jint h) {
    auto transaction = reinterpret_cast<SurfaceComposerClient::Transaction*>(transactionObj);
@@ -1295,8 +1286,6 @@ static const JNINativeMethod sSurfaceControlMethods[] = {
            (void*)nativeSetRelativeLayer },
    {"nativeSetPosition", "(JJFF)V",
            (void*)nativeSetPosition },
    {"nativeSetGeometryAppliesWithResize", "(JJ)V",
            (void*)nativeSetGeometryAppliesWithResize },
    {"nativeSetSize", "(JJII)V",
            (void*)nativeSetSize },
    {"nativeSetTransparentRegionHint", "(JJLandroid/graphics/Region;)V",
+1 −1
Original line number Diff line number Diff line
@@ -1050,7 +1050,7 @@ class WindowStateAnimator {
        // to prevent further updates until buffer latch.
        // We also need to freeze the Surface geometry until a buffer
        // comes in at the new size (normally position and crop are unfrozen).
        // setGeometryAppliesWithResizeInTransaction accomplishes this for us.
        // deferTransactionUntil accomplishes this for us.
        if (wasForceScaled && !mForceScaleUntilResize) {
            mSurfaceController.deferTransactionUntil(mSurfaceController.mSurfaceControl,
                    mWin.getFrameNumber());
+0 −4
Original line number Diff line number Diff line
@@ -245,10 +245,6 @@ class WindowSurfaceController {
        }
    }

    void setGeometryAppliesWithResizeInTransaction(boolean recoveringMemory) {
        mSurfaceControl.setGeometryAppliesWithResize();
    }

    void setMatrixInTransaction(float dsdx, float dtdx, float dtdy, float dsdy,
            boolean recoveringMemory) {
        setMatrix(null, dsdx, dtdx, dtdy, dsdy, false);
+0 −5
Original line number Diff line number Diff line
@@ -184,11 +184,6 @@ public class StubTransaction extends SurfaceControl.Transaction {
        return this;
    }

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

    @Override
    public SurfaceControl.Transaction setSecure(SurfaceControl sc, boolean isSecure) {
        return this;