summaryrefslogtreecommitdiff
path: root/camera/common/1.0/default/HandleImporter.cpp
diff options
context:
space:
mode:
authorMarissa Wall <marissaw@google.com>2019-11-05 14:59:27 -0800
committerMarissa Wall <marissaw@google.com>2019-11-21 17:43:41 -0800
commit9c5ebfc5ba3b90231391bb77d717699f7198f2fb (patch)
tree0352fc73830e37f2595134c4867502a08253be19 /camera/common/1.0/default/HandleImporter.cpp
parent88d87faec908588db0dcf8fe9705ac72516ea82a (diff)
gralloc: update lock and lockYCbCr
IMapper 4.0 does support lockYCbCr functionality through lock and BufferMetadata getters. However, we will wait to add the support in one central gralloc library. For now just stub out the call so there aren't any compiler errors. Bug: 141631415 Test: Compiles Change-Id: I9d2f70c87412f8ac2114db85eb6dc01539876e2b
Diffstat (limited to 'camera/common/1.0/default/HandleImporter.cpp')
-rw-r--r--camera/common/1.0/default/HandleImporter.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/camera/common/1.0/default/HandleImporter.cpp b/camera/common/1.0/default/HandleImporter.cpp
index 76f97789c0..ac32c954c4 100644
--- a/camera/common/1.0/default/HandleImporter.cpp
+++ b/camera/common/1.0/default/HandleImporter.cpp
@@ -252,8 +252,7 @@ void* HandleImporter::lock(
// No need to use bytesPerPixel and bytesPerStride because we are using
// an 1-D buffer and accressRegion.
mMapperV4->lock(buffer, cpuUsage, accessRegion, acquireFenceHandle,
- [&](const auto& tmpError, const auto& tmpPtr, const auto& /*bytesPerPixel*/,
- const auto& /*bytesPerStride*/) {
+ [&](const auto& tmpError, const auto& tmpPtr) {
if (tmpError == MapperErrorV4::NONE) {
ret = tmpPtr;
} else {
@@ -301,7 +300,13 @@ YCbCrLayout HandleImporter::lockYCbCr(
}
if (mMapperV4 != nullptr) {
- return lockYCbCrInternal<IMapperV4, MapperErrorV4>(mMapperV4, buf, cpuUsage, accessRegion);
+ // No device currently supports IMapper 4.0 so it is safe to just return an error code here.
+ //
+ // This will be supported by a combination of lock and BufferMetadata getters. We are going
+ // to refactor all the IAllocator/IMapper versioning code into a shared library. We will
+ // then add the IMapper 4.0 lockYCbCr support then.
+ ALOGE("%s: MapperV4 doesn't support lockYCbCr directly!", __FUNCTION__);
+ return {};
}
if (mMapperV3 != nullptr) {