aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2023-04-06 21:43:53 +0200
committerSimon Ser <contact@emersion.fr>2023-04-06 21:46:45 +0200
commit7abda952d0000b72d240fe1d41457b9288f0b6e5 (patch)
treef5c25ee245da0bea8fa6a99edee4c94cc2eac664
parentec5135cb0904396fa43df6f6c9a383a7900e4224 (diff)
output: drop direct scan-out check in output_basic_test()
wlr_output is not well-suited to checking whether direct scan-out is happening or not. Compositors may want to use their own external swapchains, for instance. Additionally, ab7eabac8433 ("output: leverage wlr_output_configure_primary_swapchain()") makes it so output_basic_test() is called before the output swapchain is initialized, resulting in false positives. References: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3620
-rw-r--r--types/output/output.c37
1 files changed, 9 insertions, 28 deletions
diff --git a/types/output/output.c b/types/output/output.c
index 7de1ed66..674e6d8c 100644
--- a/types/output/output.c
+++ b/types/output/output.c
@@ -584,34 +584,15 @@ static bool output_basic_test(struct wlr_output *output,
return false;
}
- if (output_is_direct_scanout(output, state->buffer)) {
- if (output->attach_render_locks > 0) {
- wlr_log(WLR_DEBUG, "Direct scan-out disabled by lock");
- return false;
- }
-
- // If the output has at least one software cursor, refuse to attach the
- // buffer
- struct wlr_output_cursor *cursor;
- wl_list_for_each(cursor, &output->cursors, link) {
- if (cursor->enabled && cursor->visible &&
- cursor != output->hardware_cursor) {
- wlr_log(WLR_DEBUG,
- "Direct scan-out disabled by software cursor");
- return false;
- }
- }
-
- // If the size doesn't match, reject buffer (scaling is not
- // supported)
- int pending_width, pending_height;
- output_pending_resolution(output, state,
- &pending_width, &pending_height);
- if (state->buffer->width != pending_width ||
- state->buffer->height != pending_height) {
- wlr_log(WLR_DEBUG, "Direct scan-out buffer size mismatch");
- return false;
- }
+ // If the size doesn't match, reject buffer (scaling is not
+ // supported)
+ int pending_width, pending_height;
+ output_pending_resolution(output, state,
+ &pending_width, &pending_height);
+ if (state->buffer->width != pending_width ||
+ state->buffer->height != pending_height) {
+ wlr_log(WLR_DEBUG, "Primary buffer size mismatch");
+ return false;
}
}