<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Sep 1, 2014 at 8:33 AM, Derek Foreman <span dir="ltr"><<a href="mailto:derekf@osg.samsung.com" target="_blank">derekf@osg.samsung.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="HOEnZb"><div class="h5">On 01/09/14 04:52 AM, Jason Ekstrand wrote:<br>
> On Mon, Sep 1, 2014 at 2:37 AM, Pekka Paalanen <<a href="mailto:ppaalanen@gmail.com">ppaalanen@gmail.com</a>> wrote:<br>
><br>
>> On Fri, 29 Aug 2014 23:35:37 -0700<br>
>> Jason Ekstrand <<a href="mailto:jason@jlekstrand.net">jason@jlekstrand.net</a>> wrote:<br>
>><br>
>>> On Aug 29, 2014 6:25 PM, "Derek Foreman" <<a href="mailto:derekf@osg.samsung.com">derekf@osg.samsung.com</a>> wrote:<br>
>>>><br>
>>>> On 29/08/14 06:42 PM, Jason Ekstrand wrote:<br>
>>>>> Derek,<br>
>>>>> I haven't had a chance to look that hard at or play with this patch<br>
>> yet.<br>
>>>>> Hopefully I can look at it before too long.  One quick question<br>
>> though:<br>
>>>>> Have you verified that this works with all of the output transforms?<br>
>>> I'm<br>
>>>>> sorry if this seems premature but a) pixman renderer stuff is hard to<br>
>>> get<br>
>>>>> right and b) people are constantly breaking the pixman renderer with<br>
>>>>> respect to output transforms.  So I thought the question was worth<br>
>>> asking<br>
>>>>> even if I haven't had time to review yet.<br>
>>>><br>
>>>> Ouch - I am now guilty of 'b'<br>
>>><br>
>>> That's OK. I, for one, can never get pixman changes right on the first<br>
>>> try.  That's why I asked. ;-)<br>
>><br>
>> We'd really need to hook pixman renderer into the headless backend, let<br>
>> the test extension do screenshots, and write some tests to test all the<br>
>> output transforms... it's a big task, but would be hugely useful and<br>
>> allow to write more tests that can check real on-screen results. I've<br>
>> been dreaming about that for a while.<br>
<br>
</div></div>FWIW that's on my TODO list right now, just haven't really started it<br>
yet.  Perhaps I should give it a higher priority.<br>
<div><div class="h5"><br>
>>>> Transforms do indeed break - the zoom translation is being applied in<br>
>>>> the wrong direction for some, and the clip region needs to be rotated<br>
>>>> for others.<br>
>>>><br>
>>>>> FWIW, I have a series on my github that accomplishes the same thing<br>
>> only<br>
>>>>> with substantially deeper changes to Weston:<br>
>>>>><br>
>>>>> <a href="https://github.com/jekstrand/weston/commits/wip/transforms" target="_blank">https://github.com/jekstrand/weston/commits/wip/transforms</a><br>
>>>><br>
>>>> Interesting...<br>
>>>><br>
>>>> I think I can re-work my patch to handle rotations/flips pretty easily,<br>
>>>> though the code will bulk up a little.<br>
>>>><br>
>>>> Is that worth the time, or would you prefer to move forward with yours?<br>
>>><br>
>>> I think mine is ultimately a better way forward.  The big advantage is<br>
>> that<br>
>>> it provides a surface to/from buffer coordinates matrix and gets rid of<br>
>> all<br>
>>> of the transform logic from the pixman renderer.  Part of the reason the<br>
>>> pixman renderer is always breaking is that it's a separate<br>
>> render/transform<br>
>>> path from the go renderer and the two can get out of sync.  Also, pixman<br>
>>> does things more-or-less backwards from GL so it's hard to get right.<br>
>>><br>
>>> My patches shouldn't need much of a rebase.  The reason I never pushed<br>
>> them<br>
>>> was that fixing zoom in the pixman renderer was never the end objective<br>
>> and<br>
>>> I never considered the series really finished.  However, if else want<br>
>>> zoom+pixman, they are probably good to go.<br>
>><br>
>> Oh yeah, finishing Jason's transformations revolution would be very<br>
>> good. I should probably take a quick look if someone wants to pick it<br>
>> up, since I don't recall if/what we agreed on the basic principles like<br>
>> weston_matrix vs. pixman matrix etc.<br>
>><br>
>> Pixman is not the only rendering path that has to manually unravel and<br>
>> redo everything, rpi-renderer is the other one. Currently Weston's core<br>
>> has been written to support only the GL-renderer with its funny<br>
>> normalized GL coordinate spaces, which means the common transformation<br>
>> code (like output zoom handling) is practically useless for any other<br>
>> renderer that might (*gasp*) want to deal with pixel coordinates.<br>
>><br>
><br>
> You should look at my patches.  They fix some of that. :-)  Don't quite fix<br>
> the rpi stuff though.<br>
><br>
> I got a fair ways with those patches but blocked on a few things and then<br>
> didn't have time to finish.  Here's roughly what needs to be done:<br>
><br>
>  1) Add region transform code that transforms a region based on a matrix.<br>
>  2) Use said region transform code to do region transforms instead of the<br>
> current ints+enum version<br>
>  3) Write a function to detect if a matrix is a combination of integer<br>
> translation, integer scale, 90-degree rotation, and possible flip.  If it<br>
> is, return the data needed to reconstruct it as such.<br>
>  4) Use said function for a bunch of things;<br>
>      a) Inside of the GL renderer to determine whether GL_LINEAR or<br>
> GL_NEAREST should be used<br>
>      b) Inside of the DRM backend to determine if something can go in a<br>
> plane<br>
>      c) Maybe in the RPI renderer for some things?<br>
><br>
> That's a rough sketch for what I had intended.  Then there was stuff about<br>
> damage coordinates but that's blocking on getting at least 2) if not 3).<br>
<br>
</div></div>I'm quite willing to pick that up if you don't mind the occasional silly<br>
question on IRC...<br></blockquote><div><br></div><div>Cool!  I would love to see that go forward, I just don't have the time at the moment to work on it.  Silly IRC questions welcome!  Just direct them at "jekstrand"<br>
</div><div>--Jason<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class=""><br>
> --Jason<br>
><br>
><br>
>> The current code also makes using hardware overlays in e.g. DRM-backend<br>
>> more of a hassle than it needs to, because there too you would like to<br>
>> have the end-to-end pixels-to-pixels transformation to program the<br>
>> overlays.<br>
>><br>
>> So roughly the big idea would be that Weston core provides coordinates<br>
>> and transformations end-to-end from buffer to output in raw pixels, and<br>
>> if the renderer has something strange like GL, it should do the<br>
>> adaptation in its own code.<br>
>><br>
>> I don't recall complaints about zoom on pixman renderer, but maybe<br>
>> that's because I've known it is broken.<br>
<br>
</div>I found it in the bugzilla (80258) - though the user thought it was a<br>
problem with transparency and misreported it.<br>
<br>
The problem isn't really a lack of zoom, more the incredibly anti-social<br>
way in which weston reacts to the lack of zoom.<br>
<br>
Once you enable zoom it starts dumping the same "zoom not supported"<br>
warning into the log file every time a frame should be rendered, and<br>
never actually rendering.  It gives the impression that weston is<br>
crashed, when it's actually just not bothering to do anything visible.<br>
<br>
I guess I'll send another patch that makes it log the warning once, and<br>
just continue to draw without the zoom.  I suppose maybe we don't want<br>
to paper over this one, but to me the failure mode seems a little heavy<br>
handed and it's pretty easy to accidentally enable zoom when you intend<br>
to adjust window transparency.<br>
<div class=""><br>
>> IMHO, working towards that testing thing or pushing Jason coordinate<br>
>> revolution forward would be time better used than patching pixman<br>
>> renderer case by case.<br>
<br>
</div>Nod - fixing my patch to provide output rotations would continue the<br>
proliferation of ugly switch statements in the pixman renderer.<br>
<div class="im HOEnZb"><br>
>><br>
>> Thanks,<br>
>> pq<br>
>><br>
>>>>> On Aug 29, 2014 7:56 AM, "Derek Foreman" <<a href="mailto:derekf@osg.samsung.com">derekf@osg.samsung.com</a>><br>
>> wrote:<br>
>>>>><br>
>>>>>> Currently if you try to zoom with mod+scrollwheel the pixman<br>
>>>>>> backend will stop rendering anything at all and will continuously<br>
>>>>>> log "pixman renderer does not support zoom", giving the impression<br>
>>>>>> that the server is hung.<br>
>>>>>><br>
>>>>>> Instead, this patch adds the missing zoom functionality.<br>
>>>>>><br>
>>>>>> This should close BUG 80258<br>
>>>>>> ---<br>
>>>>>>  src/pixman-renderer.c | 65<br>
>>>>>> ++++++++++++++++++++++++++++++++++++++++++++++-----<br>
>>>>>>  1 file changed, 59 insertions(+), 6 deletions(-)<br>
>><br>
><br>
><br>
><br>
</div><div class="HOEnZb"><div class="h5">> _______________________________________________<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>
><br>
</div></div></blockquote></div><br></div></div>