aboutsummaryrefslogtreecommitdiff
path: root/include/backend/drm/drm.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/backend/drm/drm.h')
-rw-r--r--include/backend/drm/drm.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/include/backend/drm/drm.h b/include/backend/drm/drm.h
index f61be026..36e72b7a 100644
--- a/include/backend/drm/drm.h
+++ b/include/backend/drm/drm.h
@@ -10,6 +10,7 @@
#include <wlr/backend/drm.h>
#include <wlr/backend/session.h>
#include <wlr/render/drm_format_set.h>
+#include <wlr/types/wlr_output_layer.h>
#include <xf86drmMode.h>
#include "backend/drm/iface.h"
#include "backend/drm/properties.h"
@@ -36,11 +37,27 @@ struct wlr_drm_plane {
struct liftoff_layer *liftoff_layer;
};
+struct wlr_drm_layer {
+ struct liftoff_layer *liftoff;
+ struct wlr_addon addon; // wlr_output_layer.addons
+ struct wl_list link; // wlr_drm_crtc.layers
+
+ /* Buffer to be submitted to the kernel on the next page-flip */
+ struct wlr_drm_fb *pending_fb;
+ /* Buffer submitted to the kernel, will be presented on next vblank */
+ struct wlr_drm_fb *queued_fb;
+ /* Buffer currently displayed on screen */
+ struct wlr_drm_fb *current_fb;
+
+ int pending_width, pending_height;
+};
+
struct wlr_drm_crtc {
uint32_t id;
struct wlr_drm_lease *lease;
struct liftoff_output *liftoff;
struct liftoff_layer *liftoff_composition_layer;
+ struct wl_list layers; // wlr_drm_layer.link
// Atomic modesetting only
uint32_t mode_id;
@@ -163,6 +180,8 @@ size_t drm_crtc_get_gamma_lut_size(struct wlr_drm_backend *drm,
void drm_lease_destroy(struct wlr_drm_lease *lease);
struct wlr_drm_fb *get_next_cursor_fb(struct wlr_drm_connector *conn);
+struct wlr_drm_layer *get_drm_layer(struct wlr_drm_backend *drm,
+ struct wlr_output_layer *layer);
#define wlr_drm_conn_log(conn, verb, fmt, ...) \
wlr_log(verb, "connector %s: " fmt, conn->name, ##__VA_ARGS__)