summaryrefslogtreecommitdiff
path: root/libs/ui/Gralloc2.cpp
diff options
context:
space:
mode:
author Valerie Hau <vhau@google.com> 2019-01-22 09:17:19 -0800
committer Valerie Hau <vhau@google.com> 2019-01-22 14:08:45 -0800
commit0c9fc361b466e3ac66d362b23d71ab7ba9b9ca96 (patch)
tree584d59e706af764f5eb3e1d8d993f6c556a3a909 /libs/ui/Gralloc2.cpp
parent502fe80d7af0fe4d5abfb600db6c41f7a854bef6 (diff)
Modifying Gralloc to handle bytesPerPixel and bytesPerStride
Bug: 120493579 Test: build, boot Change-Id: I1fe5acc17389db6d57529d2e120ab6e1f3715705
Diffstat (limited to 'libs/ui/Gralloc2.cpp')
-rw-r--r--libs/ui/Gralloc2.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/libs/ui/Gralloc2.cpp b/libs/ui/Gralloc2.cpp
index ea7321e24c..2c4b5f32b1 100644
--- a/libs/ui/Gralloc2.cpp
+++ b/libs/ui/Gralloc2.cpp
@@ -227,7 +227,14 @@ void Gralloc2Mapper::getTransportSize(buffer_handle_t bufferHandle, uint32_t* ou
}
status_t Gralloc2Mapper::lock(buffer_handle_t bufferHandle, uint64_t usage, const Rect& bounds,
- int acquireFence, void** outData) const {
+ int acquireFence, void** outData, int32_t* outBytesPerPixel,
+ int32_t* outBytesPerStride) const {
+ if (outBytesPerPixel) {
+ *outBytesPerPixel = -1;
+ }
+ if (outBytesPerStride) {
+ *outBytesPerStride = -1;
+ }
auto buffer = const_cast<native_handle_t*>(bufferHandle);
IMapper::Rect accessRegion = sGralloc2Rect(bounds);