resolved conflicts for merge of 1f9f71e1
to lmp-mr1-dev-plus-aosp
Change-Id: I627e58fe738e9a3b9831508853f26f9adc350f90
This commit is contained in:
commit
180c2ba763
@ -97,6 +97,10 @@ status_t GraphicBufferMapper::lockYCbCr(buffer_handle_t handle,
|
|||||||
ATRACE_CALL();
|
ATRACE_CALL();
|
||||||
status_t err;
|
status_t err;
|
||||||
|
|
||||||
|
if (mAllocMod->lock_ycbcr == NULL) {
|
||||||
|
return -EINVAL; // do not log failure
|
||||||
|
}
|
||||||
|
|
||||||
err = mAllocMod->lock_ycbcr(mAllocMod, handle, static_cast<int>(usage),
|
err = mAllocMod->lock_ycbcr(mAllocMod, handle, static_cast<int>(usage),
|
||||||
bounds.left, bounds.top, bounds.width(), bounds.height(),
|
bounds.left, bounds.top, bounds.width(), bounds.height(),
|
||||||
ycbcr);
|
ycbcr);
|
||||||
@ -144,16 +148,19 @@ status_t GraphicBufferMapper::lockAsyncYCbCr(buffer_handle_t handle,
|
|||||||
ATRACE_CALL();
|
ATRACE_CALL();
|
||||||
status_t err;
|
status_t err;
|
||||||
|
|
||||||
if (mAllocMod->common.module_api_version >= GRALLOC_MODULE_API_VERSION_0_3) {
|
if (mAllocMod->common.module_api_version >= GRALLOC_MODULE_API_VERSION_0_3
|
||||||
|
&& mAllocMod->lockAsync_ycbcr != NULL) {
|
||||||
err = mAllocMod->lockAsync_ycbcr(mAllocMod, handle,
|
err = mAllocMod->lockAsync_ycbcr(mAllocMod, handle,
|
||||||
static_cast<int>(usage), bounds.left, bounds.top,
|
static_cast<int>(usage), bounds.left, bounds.top,
|
||||||
bounds.width(), bounds.height(), ycbcr, fenceFd);
|
bounds.width(), bounds.height(), ycbcr, fenceFd);
|
||||||
} else {
|
} else if (mAllocMod->lock_ycbcr != NULL) {
|
||||||
sync_wait(fenceFd, -1);
|
sync_wait(fenceFd, -1);
|
||||||
close(fenceFd);
|
close(fenceFd);
|
||||||
err = mAllocMod->lock_ycbcr(mAllocMod, handle, static_cast<int>(usage),
|
err = mAllocMod->lock_ycbcr(mAllocMod, handle, static_cast<int>(usage),
|
||||||
bounds.left, bounds.top, bounds.width(), bounds.height(),
|
bounds.left, bounds.top, bounds.width(), bounds.height(),
|
||||||
ycbcr);
|
ycbcr);
|
||||||
|
} else {
|
||||||
|
return -EINVAL; // do not log failure
|
||||||
}
|
}
|
||||||
|
|
||||||
ALOGW_IF(err, "lock(...) failed %d (%s)", err, strerror(-err));
|
ALOGW_IF(err, "lock(...) failed %d (%s)", err, strerror(-err));
|
||||||
|
Loading…
Reference in New Issue
Block a user