commit 2e467a3
Michael Forney
·
2014-01-16 04:22:38 +0000 UTC
parent 8d41327
wayland: Report damage to server on swap
1 files changed,
+15,
-0
+15,
-0
1@@ -256,6 +256,21 @@ bool buffer_socket_attach(struct wld_buffer_socket * base,
2 wl_buffer_add_listener(wl, &socket->listener, buffer);
3
4 wl_surface_attach(socket->wl, wl, 0, 0);
5+
6+ if (pixman_region32_not_empty(&buffer->damage))
7+ {
8+ pixman_box32_t * box;
9+ int num_boxes;
10+
11+ box = pixman_region32_rectangles(&buffer->damage, &num_boxes);
12+
13+ while (num_boxes--)
14+ {
15+ wl_surface_damage(socket->wl, box->x1, box->y1,
16+ box->x2 - box->x1, box->y2 - box->y1);
17+ }
18+ }
19+
20 wl_surface_commit(socket->wl);
21
22 return true;