Merge "Fix error trap in SurfaceTexture Client"
This commit is contained in:
commit
349149b52a
@ -757,6 +757,9 @@ status_t SurfaceTextureClient::lock(
|
|||||||
ALOGW_IF(res, "failed locking buffer (handle = %p)",
|
ALOGW_IF(res, "failed locking buffer (handle = %p)",
|
||||||
backBuffer->handle);
|
backBuffer->handle);
|
||||||
|
|
||||||
|
if (res != 0) {
|
||||||
|
err = INVALID_OPERATION;
|
||||||
|
} else {
|
||||||
mLockedBuffer = backBuffer;
|
mLockedBuffer = backBuffer;
|
||||||
outBuffer->width = backBuffer->width;
|
outBuffer->width = backBuffer->width;
|
||||||
outBuffer->height = backBuffer->height;
|
outBuffer->height = backBuffer->height;
|
||||||
@ -765,6 +768,7 @@ status_t SurfaceTextureClient::lock(
|
|||||||
outBuffer->bits = vaddr;
|
outBuffer->bits = vaddr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user