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.
This commit is contained in:
Simon Ser 2021-06-18 12:40:07 +02:00
parent 26e1812ab3
commit 8c70245d5f
6 changed files with 22 additions and 8 deletions

View file

@ -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)
/**

View file

@ -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.