Surface: cancel the dequeued buffer when requestBuffer fails
Partial fix for bug: 17477219 Change-Id: Ibf5a9e26e02c4be8854925a77a70f5c9c7dcf6f2
This commit is contained in:
parent
5ee2c9d20c
commit
9f5a1b6abd
@ -237,6 +237,7 @@ int Surface::dequeueBuffer(android_native_buffer_t** buffer, int* fenceFd) {
|
|||||||
result = mGraphicBufferProducer->requestBuffer(buf, &gbuf);
|
result = mGraphicBufferProducer->requestBuffer(buf, &gbuf);
|
||||||
if (result != NO_ERROR) {
|
if (result != NO_ERROR) {
|
||||||
ALOGE("dequeueBuffer: IGraphicBufferProducer::requestBuffer failed: %d", result);
|
ALOGE("dequeueBuffer: IGraphicBufferProducer::requestBuffer failed: %d", result);
|
||||||
|
mGraphicBufferProducer->cancelBuffer(buf, fence);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user