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

Commit 24f254fe authored by Chavi Weingarten's avatar Chavi Weingarten
Browse files

Remove flags for BLAST

BLAST is the only supported rendering layer so the flag has no purpose
anymore.

Test: boots and runs
Bug: 308662081
Change-Id: I59394188d7e9af088fc3878a462c4fb017651b6b
parent 8ff62994
Loading
Loading
Loading
Loading
+0 −9
Original line number Diff line number Diff line
@@ -12816,15 +12816,6 @@ public final class Settings {
        public static final String DEVELOPMENT_RENDER_SHADOWS_IN_COMPOSITOR =
                "render_shadows_in_compositor";
        /**
         * If true, submit buffers using blast in ViewRootImpl.
         * (0 = false, 1 = true)
         * @hide
         */
        @Readable
        public static final String DEVELOPMENT_USE_BLAST_ADAPTER_VR =
                "use_blast_adapter_vr";
        /**
         * Path to the WindowManager display settings file. If unset, the default file path will
         * be used.
+2 −2
Original line number Diff line number Diff line
@@ -273,8 +273,8 @@ public abstract class WallpaperService extends Service {
        int mCurHeight;
        float mZoom = 0f;
        int mWindowFlags = WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE;
        int mWindowPrivateFlags = WindowManager.LayoutParams.PRIVATE_FLAG_WANTS_OFFSET_NOTIFICATIONS
                | WindowManager.LayoutParams.PRIVATE_FLAG_USE_BLAST;
        int mWindowPrivateFlags =
                WindowManager.LayoutParams.PRIVATE_FLAG_WANTS_OFFSET_NOTIFICATIONS;
        int mCurWindowFlags = mWindowFlags;
        int mCurWindowPrivateFlags = mWindowPrivateFlags;
        Rect mPreviewSurfacePosition;
+0 −2
Original line number Diff line number Diff line
@@ -114,8 +114,6 @@ interface IWindowManager

    IWindowSession openSession(in IWindowSessionCallback callback);

    boolean useBLAST();

    @UnsupportedAppUsage
    void getInitialDisplaySize(int displayId, out Point size);
    @UnsupportedAppUsage
+3 −28
Original line number Diff line number Diff line
@@ -441,9 +441,6 @@ public final class ViewRootImpl implements ViewParent,
     */
    private boolean mForceNextConfigUpdate;

    private boolean mUseBLASTAdapter;
    private boolean mForceDisableBLAST;

    /** lazily-initialized in getAudioManager() */
    private boolean mFastScrollSoundEffectsEnabled = false;

@@ -1286,8 +1283,6 @@ public final class ViewRootImpl implements ViewParent,
                if (mWindowAttributes.packageName == null) {
                    mWindowAttributes.packageName = mBasePackageName;
                }
                mWindowAttributes.privateFlags |=
                        WindowManager.LayoutParams.PRIVATE_FLAG_USE_BLAST;

                attrs = mWindowAttributes;
                setTag();
@@ -1498,9 +1493,6 @@ public final class ViewRootImpl implements ViewParent,
                    Slog.i(mTag, "(" + mBasePackageName + ") Initial DisplayState: "
                            + mAttachInfo.mDisplayState, new Throwable());
                }
                if ((res & WindowManagerGlobal.ADD_FLAG_USE_BLAST) != 0) {
                    mUseBLASTAdapter = true;
                }

                if (view instanceof RootViewSurfaceTaker) {
                    mInputQueueCallback =
@@ -1897,8 +1889,7 @@ public final class ViewRootImpl implements ViewParent,
            mWindowAttributes.insetsFlags.appearance = appearance;
            mWindowAttributes.insetsFlags.behavior = behavior;
            mWindowAttributes.privateFlags |= compatibleWindowFlag
                    | appearanceAndBehaviorPrivateFlags
                    | WindowManager.LayoutParams.PRIVATE_FLAG_USE_BLAST;
                    | appearanceAndBehaviorPrivateFlags;

            if (mWindowAttributes.preservePreviousSurfaceInsets) {
                // Restore old surface insets.
@@ -8682,11 +8673,7 @@ public final class ViewRootImpl implements ViewParent,
        }

        if (mSurfaceControl.isValid()) {
            if (!useBLAST()) {
                mSurface.copyFrom(mSurfaceControl);
            } else {
            updateBlastSurfaceIfNeeded();
            }
            if (mAttachInfo.mThreadedRenderer != null) {
                mAttachInfo.mThreadedRenderer.setSurfaceControl(mSurfaceControl, mBlastBufferQueue);
            }
@@ -11523,7 +11510,7 @@ public final class ViewRootImpl implements ViewParent,
        SurfaceControl.Transaction transaction = new SurfaceControl.Transaction();
        transaction.setBlurRegions(surfaceControl, regionCopy);

        if (useBLAST() && mBlastBufferQueue != null) {
        if (mBlastBufferQueue != null) {
            mBlastBufferQueue.mergeWithNextTransaction(transaction, frameNumber);
        }
    }
@@ -11540,18 +11527,6 @@ public final class ViewRootImpl implements ViewParent,
        mUnbufferedInputSource = mView.mUnbufferedInputSource;
    }

    /**
     * Force disabling use of the BLAST adapter regardless of the system
     * flag. Needs to be called before addView.
     */
    void forceDisableBLAST() {
        mForceDisableBLAST = true;
    }

    boolean useBLAST() {
        return mUseBLASTAdapter && !mForceDisableBLAST;
    }

    int getSurfaceSequenceId() {
        return mSurfaceSequenceId;
    }
+0 −12
Original line number Diff line number Diff line
@@ -3249,13 +3249,6 @@ public interface WindowManager extends ViewManager {
         */
        public static final int PRIVATE_FLAG_COLOR_SPACE_AGNOSTIC = 1 << 24;

        /**
         * Flag to request creation of a BLAST (Buffer as LayerState) Layer.
         * If not specified the client will receive a BufferQueue layer.
         * @hide
         */
        public static final int PRIVATE_FLAG_USE_BLAST = 1 << 25;

        /**
         * Flag to indicate that the window is controlling the appearance of system bars. So we
         * don't need to adjust it by reading its system UI flags for compatibility.
@@ -3341,7 +3334,6 @@ public interface WindowManager extends ViewManager {
                PRIVATE_FLAG_EXCLUDE_FROM_SCREEN_MAGNIFICATION,
                PRIVATE_FLAG_NOT_MAGNIFIABLE,
                PRIVATE_FLAG_COLOR_SPACE_AGNOSTIC,
                PRIVATE_FLAG_USE_BLAST,
                PRIVATE_FLAG_APPEARANCE_CONTROLLED,
                PRIVATE_FLAG_BEHAVIOR_CONTROLLED,
                PRIVATE_FLAG_FIT_INSETS_CONTROLLED,
@@ -3438,10 +3430,6 @@ public interface WindowManager extends ViewManager {
                        mask = PRIVATE_FLAG_COLOR_SPACE_AGNOSTIC,
                        equals = PRIVATE_FLAG_COLOR_SPACE_AGNOSTIC,
                        name = "COLOR_SPACE_AGNOSTIC"),
                @ViewDebug.FlagToString(
                        mask = PRIVATE_FLAG_USE_BLAST,
                        equals = PRIVATE_FLAG_USE_BLAST,
                        name = "USE_BLAST"),
                @ViewDebug.FlagToString(
                        mask = PRIVATE_FLAG_APPEARANCE_CONTROLLED,
                        equals = PRIVATE_FLAG_APPEARANCE_CONTROLLED,
Loading