Use new page flip API

dev
Kristian Høgsberg 15 years ago
parent d2311cfba7
commit e4bf8844f6
  1. 7
      wayland-system-compositor.c

@ -651,7 +651,9 @@ repaint_output(struct wlsc_output *output)
fd = eglGetDisplayFD(ec->display); fd = eglGetDisplayFD(ec->display);
output->current ^= 1; output->current ^= 1;
eglBindColorBuffer(ec->display, output->surface, output->current); eglBindColorBuffer(ec->display, output->surface, output->current);
drmModePageFlip(fd, output->crtc_id, output->fb_id[output->current ^ 1], output); drmModePageFlip(fd, output->crtc_id,
output->fb_id[output->current ^ 1],
DRM_MODE_PAGE_FLIP_EVENT, output);
} }
static void static void
@ -690,7 +692,8 @@ wlsc_compositor_schedule_repaint(struct wlsc_compositor *compositor)
struct wlsc_output, link); struct wlsc_output, link);
while (&output->link != &compositor->output_list) { while (&output->link != &compositor->output_list) {
drmModePageFlip(fd, output->crtc_id, drmModePageFlip(fd, output->crtc_id,
output->fb_id[output->current ^ 1], output); output->fb_id[output->current ^ 1],
DRM_MODE_PAGE_FLIP_EVENT, output);
output = container_of(output->link.next, output = container_of(output->link.next,
struct wlsc_output, link); struct wlsc_output, link);
} }

Loading…
Cancel
Save