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

@ -13,12 +13,12 @@
#include <wlr/backend/interface.h>
#include <wlr/interfaces/wlr_input_device.h>
#include <wlr/interfaces/wlr_output.h>
#include <wlr/render/pixel_format.h>
#include <wlr/util/log.h>
#include "backend/backend.h"
#include "backend/wayland.h"
#include "render/drm_format_set.h"
#include "render/pixel_format.h"
#include "render/wlr_renderer.h"
#include "util/signal.h"
@ -192,7 +192,7 @@ static const struct wl_drm_listener legacy_drm_listener = {
static void shm_handle_format(void *data, struct wl_shm *shm,
uint32_t shm_format) {
struct wlr_wl_backend *wl = data;
uint32_t drm_format = convert_wl_shm_format_to_drm(shm_format);
uint32_t drm_format = wlr_convert_wl_shm_format_to_drm(shm_format);
wlr_drm_format_set_add(&wl->shm_formats, drm_format, DRM_FORMAT_MOD_INVALID);
}

View file

@ -11,12 +11,12 @@
#include <wayland-client.h>
#include <wlr/interfaces/wlr_output.h>
#include <wlr/render/pixel_format.h>
#include <wlr/render/wlr_renderer.h>
#include <wlr/types/wlr_matrix.h>
#include <wlr/util/log.h>
#include "backend/wayland.h"
#include "render/pixel_format.h"
#include "render/swapchain.h"
#include "render/wlr_renderer.h"
#include "util/signal.h"
@ -178,7 +178,8 @@ static struct wl_buffer *import_dmabuf(struct wlr_wl_backend *wl,
static struct wl_buffer *import_shm(struct wlr_wl_backend *wl,
struct wlr_shm_attributes *shm) {
enum wl_shm_format wl_shm_format = convert_drm_format_to_wl_shm(shm->format);
enum wl_shm_format wl_shm_format =
wlr_convert_drm_format_to_wl_shm(shm->format);
uint32_t size = shm->stride * shm->height;
struct wl_shm_pool *pool = wl_shm_create_pool(wl->shm, shm->fd, size);
if (pool == NULL) {