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
+5 -2
View File
@@ -214,6 +214,10 @@ headless_output_enable_gl(struct headless_output *output)
static int
headless_output_enable_pixman(struct headless_output *output)
{
const struct pixman_renderer_output_options options = {
.use_shadow = true,
};
output->image_buf = malloc(output->base.current_mode->width *
output->base.current_mode->height * 4);
if (!output->image_buf)
@@ -225,8 +229,7 @@ headless_output_enable_pixman(struct headless_output *output)
output->image_buf,
output->base.current_mode->width * 4);
if (pixman_renderer_output_create(&output->base,
PIXMAN_RENDERER_OUTPUT_USE_SHADOW) < 0)
if (pixman_renderer_output_create(&output->base, &options) < 0)
goto err_renderer;
pixman_renderer_output_set_buffer(&output->base, output->image);