summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Macnak <natsu@google.com>2020-05-13 17:35:08 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2020-05-13 17:35:08 +0000
commit356dc218f51ec401176588e277f1d7de3fb62336 (patch)
treef42edc39485d7424fb4e826586cacbac568e0c99
parent7be236d24282bb3844c193739d22e50b68ea8403 (diff)
parentf7d3d8e8568c6ba7c33d79e18118687bc6de7fb5 (diff)
downloadcamera-356dc218f51ec401176588e277f1d7de3fb62336.tar.gz
Merge "Lock gralloc buffers with SW_READ/SW_WRITE usage" into rvc-dev am: f7d3d8e856
Change-Id: I7f2ff291388cfff4ce0fbaac4003138ba193ea07
-rw-r--r--devices/EmulatedCamera/hwl/EmulatedRequestProcessor.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/devices/EmulatedCamera/hwl/EmulatedRequestProcessor.cpp b/devices/EmulatedCamera/hwl/EmulatedRequestProcessor.cpp
index 7acae76..ae2d7db 100644
--- a/devices/EmulatedCamera/hwl/EmulatedRequestProcessor.cpp
+++ b/devices/EmulatedCamera/hwl/EmulatedRequestProcessor.cpp
@@ -198,9 +198,7 @@ status_t EmulatedRequestProcessor::LockSensorBuffer(
auto width = static_cast<int32_t>(stream.width);
auto height = static_cast<int32_t>(stream.height);
- auto usage = stream.is_input
- ? GRALLOC_USAGE_SW_READ_OFTEN | GRALLOC_USAGE_SW_WRITE_OFTEN
- : stream.producer_usage;
+ auto usage = GRALLOC_USAGE_SW_READ_OFTEN | GRALLOC_USAGE_SW_WRITE_OFTEN;
if (stream.override_format == HAL_PIXEL_FORMAT_YCBCR_420_888) {
IMapper::Rect map_rect = {0, 0, width, height};
auto yuv_layout = importer.lockYCbCr(buffer, usage, map_rect);