aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2023-02-06 17:54:13 +0100
committerSimon Ser <contact@emersion.fr>2023-02-20 18:38:57 +0100
commite1335a792aff0dfbe3d95389e3a576297906b700 (patch)
tree5e62c2f38d0047fa5adfca54e69fc02bc6885ea6 /include
parent4d6fbb2289ae5a6fcf2061a00ff49a9850c5198f (diff)
output-layer: add feedback event
Diffstat (limited to 'include')
-rw-r--r--include/wlr/types/wlr_output_layer.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/include/wlr/types/wlr_output_layer.h b/include/wlr/types/wlr_output_layer.h
index e9b899a9..9f787e2c 100644
--- a/include/wlr/types/wlr_output_layer.h
+++ b/include/wlr/types/wlr_output_layer.h
@@ -9,6 +9,7 @@
#ifndef WLR_TYPES_WLR_OUTPUT_LAYER_H
#define WLR_TYPES_WLR_OUTPUT_LAYER_H
+#include <wlr/render/drm_format_set.h>
#include <wlr/types/wlr_output.h>
#include <wlr/util/addon.h>
@@ -36,6 +37,10 @@ struct wlr_output_layer {
struct wl_list link; // wlr_output.layers
struct wlr_addon_set addons;
+ struct {
+ struct wl_signal feedback; // struct wlr_output_layer_feedback_event
+ } events;
+
void *data;
};
@@ -57,6 +62,18 @@ struct wlr_output_layer_state {
};
/**
+ * Feedback for an output layer.
+ *
+ * After an output commit, if the backend is not able to display a layer, it
+ * can send feedback events. These events can be used to re-allocate the
+ * layer's buffers so that they have a higher chance to get displayed.
+ */
+struct wlr_output_layer_feedback_event {
+ dev_t target_device;
+ const struct wlr_drm_format_set *formats;
+};
+
+/**
* Create a new output layer.
*/
struct wlr_output_layer *wlr_output_layer_create(struct wlr_output *output);