diff options
author | Lajos Molnar <lajos@google.com> | 2015-01-28 21:27:46 -0800 |
---|---|---|
committer | Lajos Molnar <lajos@google.com> | 2015-01-28 21:27:46 -0800 |
commit | 180c2ba763c32793c6d3c5fe2683f8f2b233ca10 (patch) | |
tree | fb8fbfc42cb74bbf6ad19952748098e34ed49fb3 /libs/ui | |
parent | 2f1e3b4d219d1ad3fe66cc9abb4ed61be9906ed1 (diff) | |
parent | 1f9f71e183946b390fff4d20900bc4a03246a882 (diff) | |
download | frameworks_native-180c2ba763c32793c6d3c5fe2683f8f2b233ca10.zip frameworks_native-180c2ba763c32793c6d3c5fe2683f8f2b233ca10.tar.gz frameworks_native-180c2ba763c32793c6d3c5fe2683f8f2b233ca10.tar.bz2 |
resolved conflicts for merge of 1f9f71e1 to lmp-mr1-dev-plus-aosp
Change-Id: I627e58fe738e9a3b9831508853f26f9adc350f90
Diffstat (limited to 'libs/ui')
-rw-r--r-- | libs/ui/GraphicBufferMapper.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/libs/ui/GraphicBufferMapper.cpp b/libs/ui/GraphicBufferMapper.cpp index 01acdc8..31bfb2d 100644 --- a/libs/ui/GraphicBufferMapper.cpp +++ b/libs/ui/GraphicBufferMapper.cpp @@ -97,6 +97,10 @@ status_t GraphicBufferMapper::lockYCbCr(buffer_handle_t handle, ATRACE_CALL(); status_t err; + if (mAllocMod->lock_ycbcr == NULL) { + return -EINVAL; // do not log failure + } + err = mAllocMod->lock_ycbcr(mAllocMod, handle, static_cast<int>(usage), bounds.left, bounds.top, bounds.width(), bounds.height(), ycbcr); @@ -144,16 +148,19 @@ status_t GraphicBufferMapper::lockAsyncYCbCr(buffer_handle_t handle, ATRACE_CALL(); 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, static_cast<int>(usage), bounds.left, bounds.top, bounds.width(), bounds.height(), ycbcr, fenceFd); - } else { + } else if (mAllocMod->lock_ycbcr != NULL) { sync_wait(fenceFd, -1); close(fenceFd); err = mAllocMod->lock_ycbcr(mAllocMod, handle, static_cast<int>(usage), bounds.left, bounds.top, bounds.width(), bounds.height(), ycbcr); + } else { + return -EINVAL; // do not log failure } ALOGW_IF(err, "lock(...) failed %d (%s)", err, strerror(-err)); |