Draft: Modifiers support with dev_t render device passed as argument
This adds support for explicit modifiers with the strategy of passing the render device as argument to various wayland_dmabuf public functions.
(In general, the conventions I follow is for public functions to start with (for example for dmabuf) wayland_dmabuf_*, and have private functions be dmabuf_*).
Changes in this version include:
- Change in wayland_gbm module the exported
wayland_gbm_get_dev_t()
towayland_gbm_get_render_dev()
, which in turn calls the internalgbm_get_dev_t()
. - Change in wayland_dmabuf the signature of the public function to get the modifiers: from
uint_64 *wayland_dmabuf_get_format_modifiers()
tosize_t wayland_dmabuf_get_format_modifiers(..., **modifiers)
. This way we get both the size of the modifiers and the pointer. - Add fail checks in
wayland_gl_drawable_update()
(goto out). - Add internal
dmabuf_has_feedback_support()
. - Add
struct wayland_dmabuf_feedback_tranche *owning_tranche
field tostruct wayland_dmabuf_format
. We can now reusedmabuf_format_get_dmabuf_format_from_optimal_tranche()
, which we call from various public functions and returns a wayland_dmabuf_format, for returning various information to the caller. - Add
struct wayland_dmabuf_feedback *owning_feedback
to each tranche. Now we don't have to (awkwardly) pass the main device todmabuf_feedback_get_tranche_priority()
. - Add
BOOL wayland_dmabuf_is_device_scanoutable()
, which internally follows the same logic aswayland_dmabuf_get_format_modifiers()
, reusing the code fromdmabuf_format_get_dmabuf_format_from_optimal_tranche()
.