diff options
author | Roman Stratiienko <r.stratiienko@gmail.com> | 2020-10-23 22:28:38 +0300 |
---|---|---|
committer | Roman Stratiienko <r.stratiienko@gmail.com> | 2020-10-31 19:08:19 +0200 |
commit | add24cb745a35c4c80d1c49e8a6da5475136b051 (patch) | |
tree | dd8c23e2442e1f914788f494cc36d22c6ffe76e6 /bufferinfo/legacy/BufferInfoMaliHisi.cpp | |
parent | 33365c2b89e2ea1fd5f319c027b7edd133509830 (diff) | |
download | drm_hwcomposer-add24cb745a35c4c80d1c49e8a6da5475136b051.tar.gz |
drm_hwcomposer: stop using pixel_stride
pixel_stride is used only to validate buffer when importing using
GraphicBufferMapper::importBuffer() method.
The problem is we can't always get this value from buffer_handle_t.
Libdrm and MapperMetadata getters can only calculate this value based
on byte stride and buffer format. But this calculation isn't always
possible, which causes importBuffer() to fail.
Instead we can use GrallocMapper::importBuffer() method,
which doesn't require to validate the buffer.
This commit is not compatible with Android-P.
Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com>
Diffstat (limited to 'bufferinfo/legacy/BufferInfoMaliHisi.cpp')
-rw-r--r-- | bufferinfo/legacy/BufferInfoMaliHisi.cpp | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/bufferinfo/legacy/BufferInfoMaliHisi.cpp b/bufferinfo/legacy/BufferInfoMaliHisi.cpp index 98b2786..ab5579c 100644 --- a/bufferinfo/legacy/BufferInfoMaliHisi.cpp +++ b/bufferinfo/legacy/BufferInfoMaliHisi.cpp @@ -91,7 +91,6 @@ int BufferInfoMaliHisi::ConvertBoInfo(buffer_handle_t handle, bo->hal_format = hnd->req_format; bo->format = fmt; bo->usage = hnd->usage; - bo->pixel_stride = hnd->stride; bo->pitches[0] = hnd->byte_stride; bo->prime_fds[0] = hnd->share_fd; bo->offsets[0] = 0; |