aboutsummaryrefslogtreecommitdiff
path: root/include/wlr
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2021-06-18 12:40:07 +0200
committerSimon Ser <contact@emersion.fr>2022-08-30 17:53:50 +0000
commit8c70245d5fe044f09882653437e0a9dc7c336a0c (patch)
tree3e82af4e461fd5370a145a42e00a4aab4ebcbe4a /include/wlr
parent26e1812ab3eb75ba5c13f1a4060dd74fb4c93263 (diff)
output: fail commits if adaptive sync cannot be enabled
Previously, adaptive sync was just a hint and wouldn't make any atomic commit fail if the backend didn't support it. The main reason is wlr_output_test wasn't supported at the time. Now that we have a way for compositors to test whether a change can work, let's remove the exception for adaptive sync and convert it to a regular output state field.
Diffstat (limited to 'include/wlr')
-rw-r--r--include/wlr/interfaces/wlr_output.h1
-rw-r--r--include/wlr/types/wlr_output.h5
2 files changed, 4 insertions, 2 deletions
diff --git a/include/wlr/interfaces/wlr_output.h b/include/wlr/interfaces/wlr_output.h
index 7a1252db..7ef3de98 100644
--- a/include/wlr/interfaces/wlr_output.h
+++ b/include/wlr/interfaces/wlr_output.h
@@ -22,7 +22,6 @@
WLR_OUTPUT_STATE_SCALE | \
WLR_OUTPUT_STATE_TRANSFORM | \
WLR_OUTPUT_STATE_RENDER_FORMAT | \
- WLR_OUTPUT_STATE_ADAPTIVE_SYNC_ENABLED | \
WLR_OUTPUT_STATE_SUBPIXEL)
/**
diff --git a/include/wlr/types/wlr_output.h b/include/wlr/types/wlr_output.h
index 4f8bff0d..2a290b46 100644
--- a/include/wlr/types/wlr_output.h
+++ b/include/wlr/types/wlr_output.h
@@ -301,7 +301,10 @@ void wlr_output_set_transform(struct wlr_output *output,
enum wl_output_transform transform);
/**
* Enables or disables adaptive sync (ie. variable refresh rate) on this
- * output. This is just a hint, the backend is free to ignore this setting.
+ * output. On some backends, this is just a hint and may be ignored.
+ * Compositors can inspect `wlr_output.adaptive_sync_status` to query the
+ * effective status. Backends that don't support adaptive sync will reject
+ * the output commit.
*
* When enabled, compositors can submit frames a little bit later than the
* deadline without dropping a frame.