diff --git a/libweston/backend-headless/headless.c b/libweston/backend-headless/headless.c index 4b1d5be0..ceedad04 100644 --- a/libweston/backend-headless/headless.c +++ b/libweston/backend-headless/headless.c @@ -321,7 +321,7 @@ headless_output_enable_pixman(struct headless_output *output) WESTON_OUTPUT_CAPTURE_SOURCE_FRAMEBUFFER, output->base.current_mode->width, output->base.current_mode->height, - pfmt); + pfmt->format); return 0; diff --git a/libweston/output-capture.c b/libweston/output-capture.c index 56b603c2..bde7327a 100644 --- a/libweston/output-capture.c +++ b/libweston/output-capture.c @@ -240,7 +240,7 @@ capture_info_get_csi(struct weston_output_capture_info *ci, * \param src The source type on the output. * \param width The new buffer width. * \param height The new buffer height. - * \param format The new pixel format. + * \param drm_format The new pixel format. * * If any one of width, height or format is zero/NULL, the source becomes * unavailable to clients. Otherwise the source becomes available. @@ -250,8 +250,7 @@ capture_info_get_csi(struct weston_output_capture_info *ci, WL_EXPORT void weston_output_update_capture_info(struct weston_output *output, enum weston_output_capture_source src, - int width, int height, - const struct pixel_format_info *format) + int width, int height, uint32_t drm_format) { struct weston_output_capture_info *ci = output->capture_info; struct weston_output_capture_source_info *csi; @@ -260,12 +259,12 @@ weston_output_update_capture_info(struct weston_output *output, if (csi->width == width && csi->height == height && - csi->drm_format == format->format) + csi->drm_format == drm_format) return; csi->width = width; csi->height = height; - csi->drm_format = format->format; + csi->drm_format = drm_format; if (source_info_is_available(csi)) { capture_info_send_source_info(ci, csi); diff --git a/libweston/output-capture.h b/libweston/output-capture.h index 0b29f615..7f49b4f6 100644 --- a/libweston/output-capture.h +++ b/libweston/output-capture.h @@ -65,8 +65,7 @@ weston_output_capture_info_repaint_done(struct weston_output_capture_info *ci); void weston_output_update_capture_info(struct weston_output *output, enum weston_output_capture_source src, - int width, int height, - const struct pixel_format_info *format); + int width, int height, uint32_t drm_format); bool weston_output_has_capture_tasks(struct weston_output *output); diff --git a/libweston/pixman-renderer.c b/libweston/pixman-renderer.c index 5b46405f..39c79272 100644 --- a/libweston/pixman-renderer.c +++ b/libweston/pixman-renderer.c @@ -943,7 +943,7 @@ pixman_renderer_resize_output(struct weston_output *output, WESTON_OUTPUT_CAPTURE_SOURCE_FRAMEBUFFER, po->fb_size.width, po->fb_size.height, - po->hw_format); + po->hw_format->format); } if (!po->shadow_format) @@ -961,7 +961,7 @@ pixman_renderer_resize_output(struct weston_output *output, WESTON_OUTPUT_CAPTURE_SOURCE_BLENDING, po->fb_size.width, po->fb_size.height, - po->shadow_format); + po->shadow_format->format); return !!po->shadow_image; } @@ -1074,7 +1074,7 @@ pixman_renderer_output_set_buffer(struct weston_output *output, WESTON_OUTPUT_CAPTURE_SOURCE_FRAMEBUFFER, po->fb_size.width, po->fb_size.height, - po->hw_format); + po->hw_format->format); } static int diff --git a/libweston/renderer-gl/gl-renderer.c b/libweston/renderer-gl/gl-renderer.c index 5eeb56df..4e9eb510 100644 --- a/libweston/renderer-gl/gl-renderer.c +++ b/libweston/renderer-gl/gl-renderer.c @@ -3416,6 +3416,7 @@ gl_renderer_resize_output(struct weston_output *output, { struct gl_output_state *go = get_output_state(output); const struct pixel_format_info *shfmt = go->shadow_format; + uint32_t drm_format = output->compositor->read_format->format; bool ret; check_compositing_area(fb_size, area); @@ -3426,12 +3427,12 @@ gl_renderer_resize_output(struct weston_output *output, weston_output_update_capture_info(output, WESTON_OUTPUT_CAPTURE_SOURCE_FRAMEBUFFER, area->width, area->height, - output->compositor->read_format); + drm_format); weston_output_update_capture_info(output, WESTON_OUTPUT_CAPTURE_SOURCE_FULL_FRAMEBUFFER, fb_size->width, fb_size->height, - output->compositor->read_format); + drm_format); if (!shfmt) return true;