aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorRoman Stratiienko <r.stratiienko@gmail.com>2020-10-23 22:28:38 +0300
committerRoman Stratiienko <r.stratiienko@gmail.com>2020-10-31 19:08:19 +0200
commitadd24cb745a35c4c80d1c49e8a6da5475136b051 (patch)
treedd8c23e2442e1f914788f494cc36d22c6ffe76e6 /include
parent33365c2b89e2ea1fd5f319c027b7edd133509830 (diff)
downloaddrm_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 'include')
-rw-r--r--include/drmhwcgralloc.h1
-rw-r--r--include/drmhwcomposer.h3
2 files changed, 1 insertions, 3 deletions
diff --git a/include/drmhwcgralloc.h b/include/drmhwcgralloc.h
index b959714..fc0af64 100644
--- a/include/drmhwcgralloc.h
+++ b/include/drmhwcgralloc.h
@@ -26,7 +26,6 @@ typedef struct hwc_drm_bo {
uint32_t format; /* DRM_FORMAT_* from drm_fourcc.h */
uint32_t hal_format; /* HAL_PIXEL_FORMAT_* */
uint32_t usage;
- uint32_t pixel_stride;
uint32_t pitches[HWC_DRM_BO_MAX_PLANES];
uint32_t offsets[HWC_DRM_BO_MAX_PLANES];
uint32_t prime_fds[HWC_DRM_BO_MAX_PLANES];
diff --git a/include/drmhwcomposer.h b/include/drmhwcomposer.h
index 69313d9..0706ae5 100644
--- a/include/drmhwcomposer.h
+++ b/include/drmhwcomposer.h
@@ -99,8 +99,7 @@ class DrmHwcNativeHandle {
return *this;
}
- int CopyBufferHandle(buffer_handle_t handle, int width, int height,
- int layerCount, int format, int usage, int stride);
+ int CopyBufferHandle(buffer_handle_t handle);
void Clear();