<div dir="ltr"><div>Just spent a little time crawling through things to remind myself of how it all works. Your comment seems correct. Not sure if it's really sufficient documentation for view.clip though.<br><br></div>Reviewed-by: Jason Ekstrand <<a href="mailto:jason@jlekstrand.net">jason@jlekstrand.net</a>><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Feb 17, 2015 at 4:19 AM, Pekka Paalanen <span dir="ltr"><<a href="mailto:ppaalanen@gmail.com" target="_blank">ppaalanen@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">From: Pekka Paalanen <<a href="mailto:pekka.paalanen@collabora.co.uk">pekka.paalanen@collabora.co.uk</a>><br>
<br>
Explains what weston_view::clip is.<br>
<br>
Signed-off-by: Pekka Paalanen <<a href="mailto:pekka.paalanen@collabora.co.uk">pekka.paalanen@collabora.co.uk</a>><br>
---<br>
src/compositor.c | 16 ++++++++++++++++<br>
src/compositor.h | 2 +-<br>
2 files changed, 17 insertions(+), 1 deletion(-)<br>
<br>
diff --git a/src/compositor.c b/src/compositor.c<br>
index 9e2bd80..d408ccb 100644<br>
--- a/src/compositor.c<br>
+++ b/src/compositor.c<br>
@@ -943,6 +943,22 @@ weston_view_move_to_plane(struct weston_view *view,<br>
weston_surface_damage(view->surface);<br>
}<br>
<br>
+/** Inflict damage on the plane where the view is visible.<br>
+ *<br>
+ * \param view The view that causes the damage.<br>
+ *<br>
+ * If the view is currently on a plane (including the primary plane),<br>
+ * take the view's boundingbox, subtract all the opaque views that cover it,<br>
+ * and add the remaining region as damage to the plane. This corresponds<br>
+ * to the damage inflicted to the plane if this view disappeared.<br>
+ *<br>
+ * A repaint is scheduled for this view.<br>
+ *<br>
+ * The region of all opaque views covering this view is stored in<br>
+ * weston_view::clip and updated by view_accumulate_damage() during<br>
+ * weston_output_repaint(). Specifically, that region matches the<br>
+ * scenegraph as it was last painted.<br>
+ */<br>
WL_EXPORT void<br>
weston_view_damage_below(struct weston_view *view)<br>
{<br>
diff --git a/src/compositor.h b/src/compositor.h<br>
index 5c3ee2f..fa79569 100644<br>
--- a/src/compositor.h<br>
+++ b/src/compositor.h<br>
@@ -764,7 +764,7 @@ struct weston_view {<br>
struct weston_plane *plane;<br>
struct weston_view *parent_view;<br>
<br>
- pixman_region32_t clip;<br>
+ pixman_region32_t clip; /* See weston_view_damage_below() */<br>
float alpha; /* part of geometry, see below */<br>
<br>
void *renderer_state;<br>
<span class="HOEnZb"><font color="#888888">--<br>
2.0.5<br>
<br>
_______________________________________________<br>
wayland-devel mailing list<br>
<a href="mailto:wayland-devel@lists.freedesktop.org">wayland-devel@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/wayland-devel" target="_blank">http://lists.freedesktop.org/mailman/listinfo/wayland-devel</a><br>
</font></span></blockquote></div><br></div>