render/pixel_format: make wlr_pixel_format_info part of the public API

This commit is contained in:
Simon Zeni 2021-09-10 14:23:22 -04:00
parent 4a4c8ca320
commit ae43cf93dd
16 changed files with 67 additions and 59 deletions

View file

@ -353,7 +353,7 @@ static struct wlr_pixman_texture *pixman_texture_create(
wlr_texture_init(&texture->wlr_texture, &texture_impl, width, height);
texture->renderer = renderer;
texture->format_info = drm_get_pixel_format_info(drm_format);
texture->format_info = wlr_pixel_format_info_from_drm(drm_format);
if (!texture->format_info) {
wlr_log(WLR_ERROR, "Unsupported drm format 0x%"PRIX32, drm_format);
free(texture);
@ -476,7 +476,7 @@ static bool pixman_read_pixels(struct wlr_renderer *wlr_renderer,
}
const struct wlr_pixel_format_info *drm_fmt =
drm_get_pixel_format_info(drm_format);
wlr_pixel_format_info_from_drm(drm_format);
assert(drm_fmt);
pixman_image_t *dst = pixman_image_create_bits_no_clear(fmt, width, height,