wl_list_for_each_reverse(surface, &compositor->base.surface_list, link)
weston_surface_draw(surface, &output->base, damage);
+ weston_output_do_read_pixels(&output->base);
+
eglSwapBuffers(compositor->base.display, output->egl_surface);
wl_event_source_timer_update(output->finish_frame_timer, 10);
pixman_image_unref(image);
}
-static void
-x11_output_read_pixels(struct weston_output *output_base, void *data)
-{
- struct x11_output *output = (struct x11_output *) output_base;
- struct x11_compositor *compositor =
- (struct x11_compositor *) output->base.compositor;
-
- eglMakeCurrent(compositor->base.display, output->egl_surface,
- output->egl_surface, compositor->base.context);
-
- glReadPixels(0, 0, output_base->current->width,
- output_base->current->height,
- compositor->base.read_format, GL_UNSIGNED_BYTE, data);
-}
-
static int
x11_compositor_create_output(struct x11_compositor *c, int x, int y,
int width, int height, int fullscreen)
output->base.repaint = x11_output_repaint;
output->base.destroy = x11_output_destroy;
output->base.assign_planes = NULL;
- output->base.read_pixels = x11_output_read_pixels;
output->base.set_backlight = NULL;
output->base.set_dpms = NULL;
output->base.switch_mode = NULL;