Hi Pekka,<br><br>Thanks for the review and detailed explanation.<br><br><div class="gmail_quote">On Fri, Nov 23, 2012 at 12:35 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"><div class="im">On Thu, 22 Nov 2012 15:35:13 -0700<br>
Scott Moreau <<a href="mailto:oreaus@gmail.com">oreaus@gmail.com</a>> wrote:<br>
<br>
> Since surface.commit was introduced, opqaue regions are stored in a pending<br>
> variable that isn't used until surface.commit. Xwayland uses the surface opaque<br>
> region as a way to tell weston what region of the surface should be opaque.<br>
> However when this pending opaque region was introduced, xwm was not updated<br>
> and so we have the 'black = transparent' problem again. This patch fixes the<br>
> problem by having xwm use the pending opaque regions.<br>
> ---<br>
><br>
> Hi, I noticed this broke again and fixed it here. However, now I'm wondering<br>
> if weston_surface needs an opaque region at all anymore. It seems the only thing<br>
> that uses it is weston_surface_update_transform_disable(). I'm not sure if this<br>
> is the best fix but the opaque region system could use a closer examination<br>
> now that surface.commit is in place.<br>
<br>
</div>Hi Scott,<br>
<br>
I believe it is still needed. The opaque region is needed in global<br>
coordinate frame, but weston_surface:opaque is in surface-local<br>
coordinate frame. Just like the bounding box,<br>
weston_surface:transform.opaque is computed in<br>
weston_surface_update_transform(), and it is used in clipping repaint<br>
regions.<br>
<br>
Weston_surface:opaque is referenced only in the transform_disable()<br>
path, because we never bothered to write an algorithm for the<br>
transform_enable() path. A pixman region deals with axis-aligned<br>
rectangles, and the conversion from an arbitrary rectangle to an<br>
approximating set of axis-aligned rectangles is not trivial nor<br>
unique. In the transform enabled case, we just imagine that nothing is<br>
opaque, and compute repaint regions accordingly. The only downside is<br>
that we may repaint more than absolutely necessary. It should not cause<br>
misrendering, though.<br>
<br>
Weston_surface:opaque is also used in the gl-renderer, where the<br>
surface tessellation is split into two parts: blended and opaque.</blockquote><div><br>Ah yes, this is probably the main reason to have it. I overlooked this case<br>when thinking about where the opaque region is used.<br>
</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">This<br>
is possible, because the tessellation is not limited to axis-aligned<br>
rectangles, and the opaque region in surface-local coordinates can be<br>
handled properly.<br>
<br>
The patch looks ok to me in the sense, that it is now modifying the<br>
pending.opaque region, which a following wl_surface.commit will take<br>
into use. I do wonder, how that interacts with possible<br>
wl_surface.set_opaque_region requests from the client. Maybe such<br>
requests do not occur? This will probably be rewritten in the<br>
xwm-as-client work, anyway, so it's fine if it works well enough for<br>
now.<br>
<br></blockquote><div><br>Thanks,<br><br>Scott<br> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Thanks,<br>
pq<br>
</blockquote></div><br>