gralloc: Fix calculation of bytesPerStride in Lock().
Currently bytesPerStride returns aligned width in
QtiMapper::lock instead of no. of bytes in a stride.
CRs-fixed: 2646525
Change-Id: Ib0c14c59193006e6f7cf687c97187cd2f95a45ce
diff --git a/gralloc/QtiMapper.cpp b/gralloc/QtiMapper.cpp
index 468a865..d8dd675 100644
--- a/gralloc/QtiMapper.cpp
+++ b/gralloc/QtiMapper.cpp
@@ -185,7 +185,8 @@
auto hnd = PRIV_HANDLE_CONST(buffer);
auto *out_data = reinterpret_cast<void *>(hnd->base);
- hidl_cb(err, out_data, gralloc::GetBpp(hnd->format), hnd->width);
+ hidl_cb(err, out_data, gralloc::GetBpp(hnd->format),
+ (hnd->width) * (gralloc::GetBpp(hnd->format)));
return Void();
}