Revert "libweston: let weston_output_update_capture_info() take drm_format"

This reverts commit af5acbc9cb.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
This commit is contained in:
Philipp Zabel 2023-01-26 12:07:15 +01:00 committed by Daniel Stone
parent c67773bc5c
commit efffd0d8a4
4 changed files with 13 additions and 12 deletions

View File

@ -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);

View File

@ -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);

View File

@ -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;
}

View File

@ -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;