aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2022-09-28 11:09:53 +0200
committerSimon Zeni <simon@bl4ckb0ne.ca>2022-09-30 10:58:17 +0000
commita0345f28540a577c83bb23243639078caf94d75c (patch)
treef74288db18e41d84fcac48c7825edbaaf8bd0089 /include
parentbaf3fa27dc867e5c0e4515ec5f0ef6c0e4da0a4a (diff)
output: add wlr_output_state.allow_artifacts
When starting up, the compositor might call wlr_output_set_mode() with a mode which is already the current one. wlroots will detect this and make the wlr_output_set_mode() call a no-op. During the next wlr_output_commit() call, wlroots will perform an atomic commit without the ALLOW_MODESET flag. This is an issue, because some drivers need ALLOW_MODESET even if the mode is the same. For instance, if the FB stride or modifier changed, some drivers require a modeset. Add a new flag "allow_artifacts" which is set when the compositor calls mode-setting functions. Use this flag to figure out whether we want to perform atomic commits with ALLOW_MODESET. (The name "allow_artifacts" is picked because ALLOW_MODESET is a misnomer, see [1].) [1]: https://patchwork.freedesktop.org/patch/505107/ Closes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3499
Diffstat (limited to 'include')
-rw-r--r--include/wlr/types/wlr_output.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/wlr/types/wlr_output.h b/include/wlr/types/wlr_output.h
index c69a4a2b..309c2731 100644
--- a/include/wlr/types/wlr_output.h
+++ b/include/wlr/types/wlr_output.h
@@ -79,6 +79,9 @@ enum wlr_output_state_mode_type {
*/
struct wlr_output_state {
uint32_t committed; // enum wlr_output_state_field
+ // Set to true to allow temporary visual artifacts (e.g. black screen) while
+ // the update is being applied
+ bool allow_artifacts;
pixman_region32_t damage; // output-buffer-local coordinates
bool enabled;
float scale;