am f05ef4e5: Merge "Surface: cancel the dequeued buffer when requestBuffer fails" into lmp-dev

* commit 'f05ef4e542c3041379025e16497ff23710de5dbf':
  Surface: cancel the dequeued buffer when requestBuffer fails
This commit is contained in:
Jesse Hall 2014-10-02 23:26:58 +00:00 committed by Android Git Automerger
commit 74efd6e6be

View File

@ -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;
} }
} }