diff options
author | Philipp Zabel <p.zabel@pengutronix.de> | 2023-01-18 13:48:15 +0100 |
---|---|---|
committer | Daniel Stone <daniels@collabora.com> | 2023-01-23 20:05:21 +0000 |
commit | af5acbc9cb706b8fd42ff647a09a14ed39df2565 (patch) | |
tree | bf22ea1bae173849b13c691e85d79a4a9ce7b7b4 /libweston/output-capture.c | |
parent | eb9a740c20e0cf2d59762e524508021ebaa84478 (diff) | |
download | weston-af5acbc9cb706b8fd42ff647a09a14ed39df2565.tar.gz |
libweston: let weston_output_update_capture_info() take drm_format
Let weston_output_update_capture_info() take a uint32_t drm_format
parameter directly instead of const struct pixel_format_info *format.
No other fields apart from the format were used from this structure.
Without this, callers may have to unnecessarily look up the pixel
format info in cases where the DRM fourcc is already available.
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Diffstat (limited to 'libweston/output-capture.c')
-rw-r--r-- | libweston/output-capture.c | 9 |
1 files changed, 4 insertions, 5 deletions
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); |