summaryrefslogtreecommitdiff
path: root/src/screenshooter.c
diff options
context:
space:
mode:
authorAnder Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>2012-11-16 17:23:52 +0200
committerKristian Høgsberg <krh@bitplanet.net>2012-11-16 19:00:03 -0500
commitb8fcca915b3345e0ac106766b1a678cac3ae6094 (patch)
treec83bd2d72462618da141749b035f24b0dee7ed2c /src/screenshooter.c
parentaa628d0a7ca486cb9b28dc6bc4cb26a22382c7e2 (diff)
downloadweston-b8fcca915b3345e0ac106766b1a678cac3ae6094.tar.gz
compositor: Move buffer damage fields from weston_output to gl-renderer
Move fields current_buffer and buffer_damage out of weston_output into gl_output_state, since they are actually specific to the renderer. Also bring back the previous_damage field so that the screenshooter can get the damage for the previous frame in a renderer independent way.
Diffstat (limited to 'src/screenshooter.c')
-rw-r--r--src/screenshooter.c15
1 files changed, 3 insertions, 12 deletions
diff --git a/src/screenshooter.c b/src/screenshooter.c
index 46f65eda..422c2a9a 100644
--- a/src/screenshooter.c
+++ b/src/screenshooter.c
@@ -310,7 +310,7 @@ weston_recorder_frame_notify(struct wl_listener *listener, void *data)
struct weston_output *output = data;
uint32_t msecs = output->frame_time;
pixman_box32_t *r;
- pixman_region32_t damage, *previous_damage;
+ pixman_region32_t damage;
int i, j, k, n, width, height, run, stride;
uint32_t delta, prev, *d, *s, *p, next;
struct {
@@ -319,18 +319,9 @@ weston_recorder_frame_notify(struct wl_listener *listener, void *data)
} header;
struct iovec v[2];
- /* When recording, this will be exactly the region that was repainted
- * in this frame. Since overlays are disabled, the whole primary plane
- * damage is rendered. For the first frame, the whole output will be
- * damaged and that damage will be added to both buffers causing the
- * non-current buffer damage to be while output. Rendering will clear
- * all the damage in the current buffer so in the next frame (when
- * that is non-current) the only damage left will be the one added
- * from the primary plane. */
- previous_damage = &output->buffer_damage[output->current_buffer ^ 1];
-
pixman_region32_init(&damage);
- pixman_region32_intersect(&damage, &output->region, previous_damage);
+ pixman_region32_intersect(&damage, &output->region,
+ &output->previous_damage);
r = pixman_region32_rectangles(&damage, &n);
if (n == 0)