OSDN Git Service

drm_hwcomposer: stop using pixel_stride
authorRoman Stratiienko <r.stratiienko@gmail.com>
Fri, 23 Oct 2020 19:28:38 +0000 (22:28 +0300)
committerRoman Stratiienko <r.stratiienko@gmail.com>
Sat, 31 Oct 2020 17:08:19 +0000 (19:08 +0200)
commitadd24cb745a35c4c80d1c49e8a6da5475136b051
treedd8c23e2442e1f914788f494cc36d22c6ffe76e6
parent33365c2b89e2ea1fd5f319c027b7edd133509830
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>
12 files changed:
Android.bp
bufferinfo/BufferInfoGetter.cpp
bufferinfo/BufferInfoGetter.h
bufferinfo/legacy/BufferInfoImagination.cpp
bufferinfo/legacy/BufferInfoLibdrm.cpp
bufferinfo/legacy/BufferInfoMaliHisi.cpp
bufferinfo/legacy/BufferInfoMaliMediatek.cpp
bufferinfo/legacy/BufferInfoMaliMeson.cpp
bufferinfo/legacy/BufferInfoMinigbm.cpp
include/drmhwcgralloc.h
include/drmhwcomposer.h
utils/hwcutils.cpp