mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-11-22 12:55:58 +01:00
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, ab7eabac84
("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
This commit is contained in:
parent
ec5135cb09
commit
7abda952d0
1 changed files with 9 additions and 28 deletions
|
@ -584,24 +584,6 @@ 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;
|
||||
|
@ -609,11 +591,10 @@ static bool output_basic_test(struct wlr_output *output,
|
|||
&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");
|
||||
wlr_log(WLR_DEBUG, "Primary buffer size mismatch");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (state->committed & WLR_OUTPUT_STATE_RENDER_FORMAT) {
|
||||
struct wlr_allocator *allocator = output->allocator;
|
||||
|
|
Loading…
Reference in a new issue