pixman-renderer: Replace output-create flags with struct

pixman_renderer_output_create currently takes a flags enum bitmask for
its options. Switch this to using a structure, so we can introduce other
non-boolean options.

Signed-off-by: Daniel Stone <daniels@collabora.com>
This commit is contained in:
Daniel Stone
2020-03-06 12:46:30 +00:00
committed by Pekka Paalanen
parent 786490cb53
commit 61abf35ec4
8 changed files with 39 additions and 23 deletions
+4 -5
View File
@@ -1179,7 +1179,9 @@ drm_output_init_pixman(struct drm_output *output, struct drm_backend *b)
uint32_t format = output->gbm_format;
uint32_t pixman_format;
unsigned int i;
uint32_t flags = 0;
const struct pixman_renderer_output_options options = {
.use_shadow = b->use_pixman_shadow,
};
switch (format) {
case DRM_FORMAT_XRGB8888:
@@ -1207,10 +1209,7 @@ drm_output_init_pixman(struct drm_output *output, struct drm_backend *b)
goto err;
}
if (b->use_pixman_shadow)
flags |= PIXMAN_RENDERER_OUTPUT_USE_SHADOW;
if (pixman_renderer_output_create(&output->base, flags) < 0)
if (pixman_renderer_output_create(&output->base, &options) < 0)
goto err;
weston_log("DRM: output %s %s shadow framebuffer.\n", output->base.name,