SurfaceFlinger: fix releaseBuffer in updateTexImage

Allow releasing a buffer acquired in the past.

Change-Id: I3f27f1caec109c1a47286fc4d2235c6e1afe9022
Signed-off-by: Lajos Molnar <lajos@google.com>
Bug: 9516405
This commit is contained in:
Lajos Molnar 2013-06-27 11:51:25 -07:00
parent 0077db94d5
commit 98d3d6ec12

View File

@ -69,7 +69,7 @@ status_t SurfaceFlingerConsumer::updateTexImage(BufferRejecter* rejecter)
// reject buffers which have the wrong size
int buf = item.mBuf;
if (rejecter && rejecter->reject(mSlots[buf].mGraphicBuffer, item)) {
releaseBufferLocked(buf, item.mGraphicBuffer, EGL_NO_SYNC_KHR);
releaseBufferLocked(buf, mSlots[buf].mGraphicBuffer, EGL_NO_SYNC_KHR);
return NO_ERROR;
}