compositor: Remove weston_read_pixels functionality

We can just do glReadPixels from the frame signal instead now.
dev
Kristian Høgsberg 13 years ago
parent ae2ba9b01b
commit 70b8358aa0
  1. 2
      src/compositor-android.c
  2. 2
      src/compositor-drm.c
  3. 2
      src/compositor-wayland.c
  4. 2
      src/compositor-x11.c
  5. 17
      src/compositor.c
  6. 11
      src/compositor.h

@ -147,7 +147,7 @@ android_output_repaint(struct weston_output *base, pixman_region32_t *damage)
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);
wl_signal_emit(&output->frame_signal, &output->frame_time);
ret = eglSwapBuffers(compositor->base.egl_display, output->egl_surface);
if (ret == EGL_FALSE && !errored) {

@ -305,7 +305,7 @@ drm_output_render(struct drm_output *output, pixman_region32_t *damage)
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);
wl_signal_emit(&output->frame_signal, &output->frame_time);
eglSwapBuffers(compositor->base.egl_display, output->egl_surface);
bo = gbm_surface_lock_front_buffer(output->surface);

@ -347,7 +347,7 @@ wayland_output_repaint(struct weston_output *output_base,
draw_border(output);
weston_output_do_read_pixels(&output->base);
wl_signal_emit(&output->frame_signal, &output->frame_time);
eglSwapBuffers(compositor->base.egl_display, output->egl_surface);
callback = wl_surface_frame(output->parent.surface);

@ -270,7 +270,7 @@ x11_output_repaint(struct weston_output *output_base,
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);
wl_signal_emit(&output->frame_signal, &output->frame_time);
eglSwapBuffers(compositor->base.egl_display, output->egl_surface);

@ -2845,7 +2845,6 @@ weston_output_init(struct weston_output *output, struct weston_compositor *c,
output->mm_width = width;
output->mm_height = height;
output->dirty = 1;
wl_list_init(&output->read_pixels_list);
weston_output_init_zoom(output);
@ -2865,22 +2864,6 @@ weston_output_init(struct weston_output *output, struct weston_compositor *c,
output, bind_output);
}
WL_EXPORT void
weston_output_do_read_pixels(struct weston_output *output)
{
struct weston_read_pixels *r, *next;
wl_signal_emit(&output->frame_signal, &output->frame_time);
glPixelStorei(GL_PACK_ALIGNMENT, 1);
wl_list_for_each_safe(r, next, &output->read_pixels_list, link) {
glReadPixels(r->x, r->y, r->width, r->height,
output->compositor->read_format,
GL_UNSIGNED_BYTE, r->data);
r->done(r, output);
}
}
static void
compositor_bind(struct wl_client *client,
void *data, uint32_t version, uint32_t id)

@ -144,14 +144,6 @@ enum dpms_enum {
WESTON_DPMS_OFF
};
struct weston_read_pixels {
void *data;
int x, y, width, height;
void (*done)(struct weston_read_pixels *read_pixels,
struct weston_output *output);
struct wl_list link;
};
struct weston_output {
uint32_t id;
@ -170,7 +162,6 @@ struct weston_output {
int repaint_scheduled;
struct weston_output_zoom zoom;
int dirty;
struct wl_list read_pixels_list;
struct wl_signal frame_signal;
uint32_t frame_time;
@ -530,8 +521,6 @@ weston_output_finish_frame(struct weston_output *output, int msecs);
void
weston_output_damage(struct weston_output *output);
void
weston_output_do_read_pixels(struct weston_output *output);
void
weston_compositor_schedule_repaint(struct weston_compositor *compositor);
void
weston_compositor_fade(struct weston_compositor *compositor, float tint);

Loading…
Cancel
Save