handle ephemeral pageflip failures
If a transient failure occurs in wlr_output_commit, re-render until it doesn't happen. This could possibly be removed if we decide to implement damage tracking in the future.
This commit is contained in:
parent
60c40c0989
commit
823cefd292
6
dwl.c
6
dwl.c
@ -1726,6 +1726,10 @@ rendermon(struct wl_listener *listener, void *data)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* HACK: This loop is the simplest way to handle ephemeral pageflip
|
||||||
|
* failures but probably not the best. Revisit if damage tracking is
|
||||||
|
* added. */
|
||||||
|
do {
|
||||||
/* wlr_output_attach_render makes the OpenGL context current. */
|
/* wlr_output_attach_render makes the OpenGL context current. */
|
||||||
if (!wlr_output_attach_render(m->wlr_output, NULL))
|
if (!wlr_output_attach_render(m->wlr_output, NULL))
|
||||||
return;
|
return;
|
||||||
@ -1757,7 +1761,7 @@ rendermon(struct wl_listener *listener, void *data)
|
|||||||
wlr_renderer_end(drw);
|
wlr_renderer_end(drw);
|
||||||
}
|
}
|
||||||
|
|
||||||
wlr_output_commit(m->wlr_output);
|
} while (!wlr_output_commit(m->wlr_output));
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
Loading…
Reference in New Issue
Block a user