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

Commit e20e8bf2 authored by android-build-team Robot's avatar android-build-team Robot
Browse files

Snap for 6360479 from fc416512 to rvc-release

Change-Id: Ib473a6296383d72bda026ddc32157eee28529555
parents c3da1b01 fc416512
Loading
Loading
Loading
Loading
+9 −4
Original line number Diff line number Diff line
@@ -110,7 +110,7 @@ BLASTBufferQueue::BLASTBufferQueue(const sp<SurfaceControl>& surface, int width,
        mProducer->setMaxDequeuedBufferCount(2);
    }
    mBufferItemConsumer =
            new BLASTBufferItemConsumer(mConsumer, AHARDWAREBUFFER_USAGE_GPU_FRAMEBUFFER, 1, true);
        new BLASTBufferItemConsumer(mConsumer, GraphicBuffer::USAGE_HW_COMPOSER, 1, true);
    static int32_t id = 0;
    auto name = std::string("BLAST Consumer") + std::to_string(id);
    id++;
@@ -119,7 +119,9 @@ BLASTBufferQueue::BLASTBufferQueue(const sp<SurfaceControl>& surface, int width,
    mBufferItemConsumer->setBufferFreedListener(this);
    mBufferItemConsumer->setDefaultBufferSize(mWidth, mHeight);
    mBufferItemConsumer->setDefaultBufferFormat(PIXEL_FORMAT_RGBA_8888);

    mTransformHint = mSurfaceControl->getTransformHint();
    mBufferItemConsumer->setTransformHint(mTransformHint);

    mNumAcquired = 0;
    mNumFrameAvailable = 0;
@@ -130,10 +132,13 @@ BLASTBufferQueue::BLASTBufferQueue(const sp<SurfaceControl>& surface, int width,
void BLASTBufferQueue::update(const sp<SurfaceControl>& surface, int width, int height) {
    std::unique_lock _lock{mMutex};
    mSurfaceControl = surface;

    if (mWidth != width || mHeight != height) {
        mWidth = width;
        mHeight = height;
        mBufferItemConsumer->setDefaultBufferSize(mWidth, mHeight);
    }
}

static void transactionCallbackThunk(void* context, nsecs_t latchTime,
                                     const sp<Fence>& presentFence,