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

@ -12,9 +12,9 @@
#include <xf86drmMode.h>
#include <wlr/backend.h>
#include <wlr/backend/session.h>
#include <wlr/render/pixel_format.h>
#include "render/allocator/drm_dumb.h"
#include "render/pixel_format.h"
static const struct wlr_buffer_impl buffer_impl;
@ -52,7 +52,7 @@ static struct wlr_drm_dumb_buffer *create_buffer(
wl_list_insert(&alloc->buffers, &buffer->link);
const struct wlr_pixel_format_info *info =
drm_get_pixel_format_info(format->format);
wlr_pixel_format_info_from_drm(format->format);
if (info == NULL) {
wlr_log(WLR_ERROR, "DRM format 0x%"PRIX32" not supported",
format->format);

View file

@ -3,8 +3,9 @@
#include <stdlib.h>
#include <sys/mman.h>
#include <unistd.h>
#include <wlr/render/pixel_format.h>
#include <wlr/render/wlr_renderer.h>
#include <wlr/util/log.h>
#include "render/pixel_format.h"
#include "render/allocator/shm.h"
#include "util/shm.h"
@ -54,7 +55,7 @@ static struct wlr_buffer *allocator_create_buffer(
struct wlr_allocator *wlr_allocator, int width, int height,
const struct wlr_drm_format *format) {
const struct wlr_pixel_format_info *info =
drm_get_pixel_format_info(format->format);
wlr_pixel_format_info_from_drm(format->format);
if (info == NULL) {
wlr_log(WLR_ERROR, "Unsupported pixel format 0x%"PRIX32, format->format);
return NULL;