If the wayland compositor suports wl_shm v2 then use it. Wlroots already supports wl_shm v2.
References:
1) https://gitlab.freedesktop.org/wlroots/wlroots/-/commit/22dab77d28ee8527c240...
2) https://gitlab.freedesktop.org/wayland/wayland/-/merge_requests/335