am 349149b5: Merge "Fix error trap in SurfaceTexture Client"

* commit '349149b52a424c212e33d165bc146bc0337ea4c4':
  Fix error trap in SurfaceTexture Client
This commit is contained in:
Jean-Baptiste Queru 2012-08-20 09:40:11 -07:00 committed by Android Git Automerger
commit 21938749fa

View File

@ -757,12 +757,16 @@ status_t SurfaceTextureClient::lock(
ALOGW_IF(res, "failed locking buffer (handle = %p)",
backBuffer->handle);
mLockedBuffer = backBuffer;
outBuffer->width = backBuffer->width;
outBuffer->height = backBuffer->height;
outBuffer->stride = backBuffer->stride;
outBuffer->format = backBuffer->format;
outBuffer->bits = vaddr;
if (res != 0) {
err = INVALID_OPERATION;
} else {
mLockedBuffer = backBuffer;
outBuffer->width = backBuffer->width;
outBuffer->height = backBuffer->height;
outBuffer->stride = backBuffer->stride;
outBuffer->format = backBuffer->format;
outBuffer->bits = vaddr;
}
}
}
return err;