diff options
author | qctecmdr <qctecmdr@localhost> | 2020-08-25 23:15:45 -0700 |
---|---|---|
committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2020-08-25 23:15:44 -0700 |
commit | a838b8ecc8aec3ecc0cbfc33499daf32746d5f35 (patch) | |
tree | 3f293becb2eb4e58acfa88719192abce4aa297f5 | |
parent | ebfe0b7f0ac53a3306920afc6e4b4a0a5f8a743d (diff) | |
parent | 7540b7122a7af10ddd7b12494d1cf0e38f937174 (diff) |
Merge "Gralloc: Fix stride bytes calculation for RAW."
-rw-r--r-- | gralloc/gr_utils.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/gralloc/gr_utils.cpp b/gralloc/gr_utils.cpp index 312058ed..bfbd0402 100644 --- a/gralloc/gr_utils.cpp +++ b/gralloc/gr_utils.cpp @@ -658,6 +658,9 @@ int GetRawPlaneInfo(int32_t format, int32_t width, int32_t height, PlaneLayoutIn plane_info[0].step = step; plane_info[0].stride = width; plane_info[0].stride_bytes = static_cast<int32_t>(alignedWidth); + if (format == HAL_PIXEL_FORMAT_RAW16) { + plane_info[0].stride_bytes = static_cast<int32_t>(alignedWidth * GetBpp(format)); + } plane_info[0].scanlines = height; plane_info[0].size = size; |