mirror of
https://gitlab.freedesktop.org/wayland/wayland.git
synced 2025-11-02 09:01:39 -05:00
Always repaint out of vsync callback.
This commit is contained in:
parent
45b7a3a645
commit
b0a167cdc9
1 changed files with 14 additions and 5 deletions
|
|
@ -691,12 +691,21 @@ repaint(void *data)
|
||||||
static void
|
static void
|
||||||
wlsc_compositor_schedule_repaint(struct wlsc_compositor *compositor)
|
wlsc_compositor_schedule_repaint(struct wlsc_compositor *compositor)
|
||||||
{
|
{
|
||||||
struct wl_event_loop *loop;
|
struct wlsc_output *output;
|
||||||
|
int fd;
|
||||||
|
|
||||||
compositor->repaint_needed = 1;
|
compositor->repaint_needed = 1;
|
||||||
if (!compositor->repaint_on_timeout) {
|
if (compositor->repaint_on_timeout)
|
||||||
loop = wl_display_get_event_loop(compositor->wl_display);
|
return;
|
||||||
wl_event_loop_add_idle(loop, repaint, compositor);
|
|
||||||
|
fd = eglGetDisplayFD(compositor->display);
|
||||||
|
output = container_of(compositor->output_list.next,
|
||||||
|
struct wlsc_output, link);
|
||||||
|
while (&output->link != &compositor->output_list) {
|
||||||
|
drmModePageFlip(fd, output->crtc_id,
|
||||||
|
output->fb_id[output->current ^ 1], output);
|
||||||
|
output = container_of(output->link.next,
|
||||||
|
struct wlsc_output, link);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue