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

Commit e22b827b authored by Chavi Weingarten's avatar Chavi Weingarten Committed by Android (Google) Code Review
Browse files

Merge "Remove preserve surfaces" into sc-dev

parents ae11a1ab 32f2817b
Loading
Loading
Loading
Loading
+0 −11
Original line number Diff line number Diff line
@@ -188,8 +188,6 @@ public final class SurfaceControl implements Parcelable {
            IBinder displayToken, int mode);
    private static native void nativeDeferTransactionUntil(long transactionObj, long nativeObject,
            long barrierObject, long frame);
    private static native void nativeReparentChildren(long transactionObj, long nativeObject,
            long newParentObject);
    private static native void nativeReparent(long transactionObj, long nativeObject,
            long newParentNativeObject);

@@ -2969,15 +2967,6 @@ public final class SurfaceControl implements Parcelable {
            return this;
        }

        /**
         * @hide
         */
        public Transaction reparentChildren(SurfaceControl sc, SurfaceControl newParent) {
            checkPreconditions(sc);
            nativeReparentChildren(mNativeObject, sc.mNativeObject, newParent.mNativeObject);
            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 −8
Original line number Diff line number Diff line
@@ -116,14 +116,6 @@ public final class WindowManagerGlobal {
     */
    public static final int RELAYOUT_INSETS_PENDING = 0x1;

    /**
     * Flag for relayout: the client may be currently using the current surface,
     * so if it is to be destroyed as a part of the relayout the destroy must
     * be deferred until later.  The client will call performDeferredDestroy()
     * when it is okay.
     */
    public static final int RELAYOUT_DEFER_SURFACE_DESTROY = 0x2;

    public static final int ADD_FLAG_IN_TOUCH_MODE = 0x1;
    public static final int ADD_FLAG_APP_VISIBLE = 0x2;
    public static final int ADD_FLAG_USE_TRIPLE_BUFFERING = 0x4;
+0 −12
Original line number Diff line number Diff line
@@ -1409,16 +1409,6 @@ static void nativeDeferTransactionUntil(JNIEnv* env, jclass clazz, jlong transac
    transaction->deferTransactionUntil_legacy(ctrl, barrier, frameNumber);
}

static void nativeReparentChildren(JNIEnv* env, jclass clazz, jlong transactionObj,
        jlong nativeObject,
        jlong newParentObject) {

    auto ctrl = reinterpret_cast<SurfaceControl *>(nativeObject);
    auto newParent = reinterpret_cast<SurfaceControl *>(newParentObject);
    auto transaction = reinterpret_cast<SurfaceComposerClient::Transaction*>(transactionObj);
    transaction->reparentChildren(ctrl, newParent);
}

static void nativeReparent(JNIEnv* env, jclass clazz, jlong transactionObj,
        jlong nativeObject,
        jlong newParentObject) {
@@ -1838,8 +1828,6 @@ static const JNINativeMethod sSurfaceControlMethods[] = {
            (void*)nativeGetProtectedContentSupport },
    {"nativeDeferTransactionUntil", "(JJJJ)V",
            (void*)nativeDeferTransactionUntil },
    {"nativeReparentChildren", "(JJJ)V",
            (void*)nativeReparentChildren } ,
    {"nativeReparent", "(JJJ)V",
            (void*)nativeReparent },
    {"nativeCaptureDisplay",
+0 −1
Original line number Diff line number Diff line
@@ -1362,7 +1362,6 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
            return;
        }
        final boolean surfaceReady = w.isDrawn()  // Regular case
                || w.mWinAnimator.mSurfaceDestroyDeferred  // The preserved surface is still ready.
                || w.isDragResizeChanged();  // Waiting for relayoutWindow to call preserveSurface.
        final boolean needsLetterbox = surfaceReady && isLetterboxed(w);
        updateRoundedCorners(w);
+0 −1
Original line number Diff line number Diff line
@@ -933,7 +933,6 @@ class RootWindowContainer extends WindowContainer<DisplayContent>
                    displayContent.pendingLayoutChanges |= FINISH_LAYOUT_REDO_WALLPAPER;
                }
                win.destroySurfaceUnchecked();
                win.mWinAnimator.destroyPreservedSurfaceLocked(win.getSyncTransaction());
            } while (i > 0);
            mWmService.mDestroySurface.clear();
        }
Loading