mirror of
https://github.com/swaywm/sway.git
synced 2026-04-25 06:46:24 -04:00
Remember if direct scanout fails
If a view fails direct scanout, we remember if it fails so we don't bother trying again. This removes a lot of log spam of the atomic DRM test failing in this case.
This commit is contained in:
parent
47763c99f9
commit
03206ea177
2 changed files with 13 additions and 1 deletions
|
|
@ -75,6 +75,7 @@ struct sway_view {
|
|||
char *title_format;
|
||||
|
||||
bool using_csd;
|
||||
bool failed_scan_out;
|
||||
|
||||
struct timespec urgent;
|
||||
bool allow_request_urgent;
|
||||
|
|
|
|||
|
|
@ -453,6 +453,10 @@ static bool scan_out_fullscreen_view(struct sway_output *output,
|
|||
return false;
|
||||
}
|
||||
|
||||
if (view->failed_scan_out) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (view->saved_buffer) {
|
||||
return false;
|
||||
}
|
||||
|
|
@ -502,9 +506,16 @@ static bool scan_out_fullscreen_view(struct sway_output *output,
|
|||
wlr_output);
|
||||
|
||||
if (!wlr_output_attach_buffer(wlr_output, surface->buffer)) {
|
||||
view->failed_scan_out = true;
|
||||
return false;
|
||||
}
|
||||
return wlr_output_commit(wlr_output);
|
||||
|
||||
if (!wlr_output_commit(wlr_output)) {
|
||||
view->failed_scan_out = true;
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
int output_repaint_timer_handler(void *data) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue