wl/shm: don't fetch formats if not requested.
This aligns the code with the drm format code Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> Reviewed-by: Simon Ser <contact@emersion.fr> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11945>
This commit is contained in:
@@ -418,6 +418,9 @@ static void
|
||||
shm_handle_format(void *data, struct wl_shm *shm, uint32_t format)
|
||||
{
|
||||
struct wsi_wl_display *display = data;
|
||||
if (display->swrast.formats.element_size == 0)
|
||||
return;
|
||||
|
||||
wsi_wl_display_add_wl_shm_format(display, &display->swrast.formats, format);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user