wlroots-hyprland/include/backend/drm/renderer.h

41 lines
1 KiB
C
Raw Permalink Normal View History

2017-09-30 09:52:58 +02:00
#ifndef BACKEND_DRM_RENDERER_H
#define BACKEND_DRM_RENDERER_H
2018-02-12 21:29:23 +01:00
#include <stdbool.h>
#include <stdint.h>
#include <wlr/backend.h>
#include <wlr/render/wlr_renderer.h>
2023-06-05 22:45:28 +02:00
#include <wlr/util/addon.h>
2017-10-01 08:22:47 +02:00
2017-10-01 11:44:24 +02:00
struct wlr_drm_backend;
2023-06-05 22:45:28 +02:00
struct wlr_drm_format;
2017-10-01 08:22:47 +02:00
struct wlr_drm_plane;
struct wlr_buffer;
2017-10-01 08:22:47 +02:00
2017-09-30 09:52:58 +02:00
struct wlr_drm_renderer {
2017-10-01 08:22:47 +02:00
struct wlr_renderer *wlr_rend;
struct wlr_allocator *allocator;
2017-09-30 09:52:58 +02:00
};
struct wlr_drm_surface {
struct wlr_drm_renderer *renderer;
2020-06-01 19:49:51 +02:00
struct wlr_swapchain *swapchain;
};
bool init_drm_renderer(struct wlr_drm_backend *drm,
struct wlr_drm_renderer *renderer);
void finish_drm_renderer(struct wlr_drm_renderer *renderer);
2017-09-30 09:52:58 +02:00
bool init_drm_surface(struct wlr_drm_surface *surf,
struct wlr_drm_renderer *renderer, int width, int height,
const struct wlr_drm_format *drm_format);
void finish_drm_surface(struct wlr_drm_surface *surf);
2017-09-30 09:52:58 +02:00
struct wlr_buffer *drm_surface_blit(struct wlr_drm_surface *surf,
struct wlr_buffer *buffer);
bool drm_plane_pick_render_format(struct wlr_drm_plane *plane,
struct wlr_drm_format *fmt, struct wlr_drm_renderer *renderer);
2017-09-30 09:52:58 +02:00
#endif