aboutsummaryrefslogtreecommitdiff
path: root/include/wlr
diff options
context:
space:
mode:
Diffstat (limited to 'include/wlr')
-rw-r--r--include/wlr/interfaces/wlr_output.h1
-rw-r--r--include/wlr/types/wlr_output.h8
2 files changed, 9 insertions, 0 deletions
diff --git a/include/wlr/interfaces/wlr_output.h b/include/wlr/interfaces/wlr_output.h
index 12980ee5..c99d0c93 100644
--- a/include/wlr/interfaces/wlr_output.h
+++ b/include/wlr/interfaces/wlr_output.h
@@ -21,6 +21,7 @@ struct wlr_output_impl {
bool (*move_cursor)(struct wlr_output *output, int x, int y);
void (*destroy)(struct wlr_output *output);
bool (*attach_render)(struct wlr_output *output, int *buffer_age);
+ bool (*test)(struct wlr_output *output);
bool (*commit)(struct wlr_output *output);
bool (*set_gamma)(struct wlr_output *output, size_t size,
const uint16_t *r, const uint16_t *g, const uint16_t *b);
diff --git a/include/wlr/types/wlr_output.h b/include/wlr/types/wlr_output.h
index 3b7f7ee3..0e2954b9 100644
--- a/include/wlr/types/wlr_output.h
+++ b/include/wlr/types/wlr_output.h
@@ -338,6 +338,14 @@ bool wlr_output_preferred_read_format(struct wlr_output *output,
void wlr_output_set_damage(struct wlr_output *output,
pixman_region32_t *damage);
/**
+ * Test whether the pending output state would be accepted by the backend. If
+ * this function returns true, `wlr_output_commit` can only fail due to a
+ * runtime error.
+ *
+ * This function doesn't mutate the pending state.
+ */
+bool wlr_output_test(struct wlr_output *output);
+/**
* Commit the pending output state. If `wlr_output_attach_render` has been
* called, the pending frame will be submitted for display and a `frame` event
* will be scheduled.