OSDN Git Service

drm_hwcomposer: libdrm gralloc_handle: modifiers and YUV support
authorRoman Stratiienko <r.stratiienko@gmail.com>
Mon, 24 Aug 2020 08:27:48 +0000 (11:27 +0300)
committerRoman Stratiienko <r.stratiienko@gmail.com>
Tue, 1 Sep 2020 20:12:47 +0000 (23:12 +0300)
commitfbf5c0ca45b3c4dd1d9621eb5198c3d43f1afbf6
tree9f49d413835cc26dac0a63edd6018e5d7f551ffa
parentcfc2b2e60267fb4140e99c0049598752c7d8749a
drm_hwcomposer: libdrm gralloc_handle: modifiers and YUV support

1. Import DRM modifier field from libdrm's gralloc_habdle.
2. Recently lock_ycrcb() was added to gbm_gralloc() [1], mesa3d uses
   this function to obtain CrCb plane data (offsets, strides).
   Use the same alhorythm in drm_hwcomposer. This allows GPU offloading
   during video playback. (Tested using Gallery app and SkyTube).

[1] - https://github.com/robherring/gbm_gralloc/pull/15
[2] - https://gitlab.freedesktop.org/mesa/mesa/-/blob/68957a82562d13b3f0d21a04ce633ffd236e6036/src/egl/drivers/dri2/platform_android.c#L202

Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com>
Change-Id: I8ec177ac782f27174443cebcb6e773070c1505cc
platform/platformdrmgeneric.cpp
platform/platformdrmgeneric.h