Hi Pekka,<br><br>I like the functionality these patches provide. It seems there was more finagling than I figured there'd need to be. I've made a few nitpick comments on some of the other patches in this set.<br><br>
- Scott<br>
<br><div class="gmail_quote">On Tue, Dec 18, 2012 at 4:58 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">

Update the matrix always, regardless of transform.enabled. Will make it<br>
easier to inherit a surface transform.<br>
<br>
Signed-off-by: Pekka Paalanen <<a href="mailto:ppaalanen@gmail.com" target="_blank">ppaalanen@gmail.com</a>><br>
---<br>
 src/compositor.c |    5 +++++<br>
 src/compositor.h |    6 ++++--<br>
 2 files changed, 9 insertions(+), 2 deletions(-)<br>
<br>
diff --git a/src/compositor.c b/src/compositor.c<br>
index e556766..0b37e63 100644<br>
--- a/src/compositor.c<br>
+++ b/src/compositor.c<br>
@@ -514,6 +514,11 @@ weston_surface_update_transform_disable(struct weston_surface *surface)<br>
        surface->geometry.x = roundf(surface->geometry.x);<br>
        surface->geometry.y = roundf(surface->geometry.y);<br>
<br>
+       /* Otherwise identity matrix, but with x and y translation. */<br>
+       weston_matrix_init(&surface->transform.matrix);<br>
+       surface->transform.matrix.d[12] = surface->geometry.x;<br>
+       surface->transform.matrix.d[13] = surface->geometry.y;<br>
+<br>
        pixman_region32_init_rect(&surface->transform.boundingbox,<br>
                                  surface->geometry.x,<br>
                                  surface->geometry.y,<br>
diff --git a/src/compositor.h b/src/compositor.h<br>
index 15d6939..1d790d3 100644<br>
--- a/src/compositor.h<br>
+++ b/src/compositor.h<br>
@@ -415,8 +415,10 @@ struct weston_surface {<br>
                pixman_region32_t boundingbox;<br>
                pixman_region32_t opaque;<br>
<br>
-               /* matrix and inverse are used only if enabled = 1.<br>
-                * If enabled = 0, use x, y, width, height directly.<br>
+               /* 'inverse' is used only if enabled = 1.<br>
+                * 'matrix' can be used regardless of 'enabled', to allow<br>
+                * inheriting transformation.<br>
+                * If enabled = 0, you can use x, y, width, height instead.<br>
                 */<br>
                int enabled;<br>
                struct weston_matrix matrix;<br>
<span><font color="#888888">--<br>
1.7.8.6<br>
<br>
_______________________________________________<br>
wayland-devel mailing list<br>
<a href="mailto:wayland-devel@lists.freedesktop.org" target="_blank">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>