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

Commit 4871677f authored by Vishnu Nair's avatar Vishnu Nair
Browse files

Remove obsolete BLASTBufferQueue constructor

This constructor may apply a transaction using the default
apply token. Calling update after construction allows the caller
to specify the token. Remove the constructor since its redundant
and maybe error prone in cases where the caller needs to specify
a token.

Bug: 386289111
Test: presubmit
Flag: EXEMPT refactor
Change-Id: I67521ac5b375f769d26a10b60b0769c3c2d511b0
parent 46347820
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -1021,7 +1021,8 @@ public final class Magnifier {
                    .setCallsite("InternalPopupWindow")
                    .build();

            mBBQ = new BLASTBufferQueue("magnifier surface", mBbqSurfaceControl,
            mBBQ = new BLASTBufferQueue("magnifier surface", /*updateDestinationFrame*/ true);
            mBBQ.update(mBbqSurfaceControl,
                    surfaceWidth, surfaceHeight, PixelFormat.TRANSLUCENT);
            mSurface = mBBQ.createSurface();

+0 −6
Original line number Diff line number Diff line
@@ -66,12 +66,6 @@ public final class BLASTBufferQueue {
    }

    /** Create a new connection with the surface flinger. */
    public BLASTBufferQueue(String name, SurfaceControl sc, int width, int height,
            @PixelFormat.Format int format) {
        this(name, true /* updateDestinationFrame */);
        update(sc, width, height, format);
    }

    public BLASTBufferQueue(String name, boolean updateDestinationFrame) {
        mNativeObject = nativeCreate(name, updateDestinationFrame);
    }
+3 −2
Original line number Diff line number Diff line
@@ -643,8 +643,9 @@ final class ColorFade {
                    .setSecure(isSecure)
                    .setBLASTLayer();
            mBLASTSurfaceControl = b.build();
            mBLASTBufferQueue = new BLASTBufferQueue("ColorFade", mBLASTSurfaceControl,
                    mDisplayWidth, mDisplayHeight, PixelFormat.TRANSLUCENT);
            mBLASTBufferQueue = new BLASTBufferQueue("ColorFade", /*updateDestinationFrame*/ true);
            mBLASTBufferQueue.update(mBLASTSurfaceControl, mDisplayWidth, mDisplayHeight,
                    PixelFormat.TRANSLUCENT);
            mSurface = mBLASTBufferQueue.createSurface();
        }
        return true;
+3 −2
Original line number Diff line number Diff line
@@ -77,8 +77,9 @@ class EmulatorDisplayOverlay {
        mOverlay = context.getDrawable(
                com.android.internal.R.drawable.emulator_circular_window_overlay);

        mBlastBufferQueue = new BLASTBufferQueue(TITLE, mSurfaceControl, mScreenSize.x,
                mScreenSize.y, PixelFormat.RGBA_8888);
        mBlastBufferQueue = new BLASTBufferQueue(TITLE, /* updateDestinationFrame */ true);
        mBlastBufferQueue.update(mSurfaceControl, mScreenSize.x, mScreenSize.y,
                PixelFormat.RGBA_8888);
        mSurface = mBlastBufferQueue.createSurface();
    }

+3 −2
Original line number Diff line number Diff line
@@ -63,8 +63,9 @@ class StrictModeFlash {
        mSurfaceControl = ctrl;
        mDrawNeeded = true;

        mBlastBufferQueue = new BLASTBufferQueue(TITLE, mSurfaceControl, 1 /* width */,
                1 /* height */, PixelFormat.RGBA_8888);
        mBlastBufferQueue = new BLASTBufferQueue(TITLE, /* updateDestinationFrame */ true);
        mBlastBufferQueue.update(mSurfaceControl, 1 /* width */, 1 /* height */,
                PixelFormat.RGBA_8888);
        mSurface = mBlastBufferQueue.createSurface();
    }

Loading