diff --git a/libweston/output-capture.c b/libweston/output-capture.c index bde7327a..56b603c2 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 drm_format The new pixel format. + * \param 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,7 +250,8 @@ 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, uint32_t drm_format) + int width, int height, + const struct pixel_format_info *format) { struct weston_output_capture_info *ci = output->capture_info; struct weston_output_capture_source_info *csi; @@ -259,12 +260,12 @@ weston_output_update_capture_info(struct weston_output *output, if (csi->width == width && csi->height == height && - csi->drm_format == drm_format) + csi->drm_format == format->format) return; csi->width = width; csi->height = height; - csi->drm_format = drm_format; + csi->drm_format = format->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 7f49b4f6..0b29f615 100644 --- a/libweston/output-capture.h +++ b/libweston/output-capture.h @@ -65,7 +65,8 @@ 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, uint32_t drm_format); + int width, int height, + const struct pixel_format_info *format); bool weston_output_has_capture_tasks(struct weston_output *output); diff --git a/libweston/pixman-renderer.c b/libweston/pixman-renderer.c index b3bbfdce..8b71eff1 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->format); + po->hw_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->format); + po->shadow_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->format); + po->hw_format); } static int @@ -1109,7 +1109,7 @@ pixman_renderer_output_create(struct weston_output *output, weston_output_update_capture_info(output, WESTON_OUTPUT_CAPTURE_SOURCE_FRAMEBUFFER, area.width, area.height, - options->format->format); + options->format); return 0; } diff --git a/libweston/renderer-gl/gl-renderer.c b/libweston/renderer-gl/gl-renderer.c index 0e0c969d..b77746fd 100644 --- a/libweston/renderer-gl/gl-renderer.c +++ b/libweston/renderer-gl/gl-renderer.c @@ -3413,7 +3413,6 @@ 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); @@ -3424,12 +3423,12 @@ gl_renderer_resize_output(struct weston_output *output, weston_output_update_capture_info(output, WESTON_OUTPUT_CAPTURE_SOURCE_FRAMEBUFFER, area->width, area->height, - drm_format); + output->compositor->read_format); weston_output_update_capture_info(output, WESTON_OUTPUT_CAPTURE_SOURCE_FULL_FRAMEBUFFER, fb_size->width, fb_size->height, - drm_format); + output->compositor->read_format); if (!shfmt) return true;