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

Commit 9471c697 authored by Jesse Hall's avatar Jesse Hall Committed by Android (Google) Code Review
Browse files

Merge "Handle failed requestBuffer after successful dequeueBuffer"

parents c526c35e 0b63cd10
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -302,7 +302,12 @@ status_t VirtualDisplaySurface::dequeueBuffer(Source source,
        }
    }
    if (result & BUFFER_NEEDS_REALLOCATION) {
        mSource[source]->requestBuffer(*sslot, &mProducerBuffers[pslot]);
        result = mSource[source]->requestBuffer(*sslot, &mProducerBuffers[pslot]);
        if (result < 0) {
            mProducerBuffers[pslot].clear();
            mSource[source]->cancelBuffer(*sslot, *fence);
            return result;
        }
        VDS_LOGV("dequeueBuffer(%s): buffers[%d]=%p fmt=%d usage=%#x",
                dbgSourceStr(source), pslot, mProducerBuffers[pslot].get(),
                mProducerBuffers[pslot]->getPixelFormat(),