Merge "Handle failed requestBuffer after successful dequeueBuffer"
This commit is contained in:
commit
9471c69773
@ -302,7 +302,12 @@ status_t VirtualDisplaySurface::dequeueBuffer(Source source,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (result & BUFFER_NEEDS_REALLOCATION) {
|
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",
|
VDS_LOGV("dequeueBuffer(%s): buffers[%d]=%p fmt=%d usage=%#x",
|
||||||
dbgSourceStr(source), pslot, mProducerBuffers[pslot].get(),
|
dbgSourceStr(source), pslot, mProducerBuffers[pslot].get(),
|
||||||
mProducerBuffers[pslot]->getPixelFormat(),
|
mProducerBuffers[pslot]->getPixelFormat(),
|
||||||
|
Loading…
Reference in New Issue
Block a user