[call for testing v2] clients: add cliptest program
Birin Sanchez
birintxo at gmail.com
Tue Sep 11 03:56:02 PDT 2012
On 11/09/12 12:38, Pekka Paalanen wrote:
> On Tue, 11 Sep 2012 11:14:09 +0200
> Birin Sanchez <birintxo at gmail.com> wrote:
>
>> Hi Pekka,
> Hi Birin!
>
>> I gave a try to v2 of cliptest and found something that might be
>> interesting. See attached screenshot.
>>
>> This is how to get those extra 4 vertex:
>>
>> * Move the clipping area to cover the surface with exactly the same
>> size, you'll see 4 vertex as expected
>> * Press 'n' or 'm' to get the surface to spin at least 4 times
>> * From the 4th spin onwards you'll see the extra 4 vertex. If you
>> make the surface to spin in the other direction the extra vertex will
>> disappear.
>>
>> I guess this is due to float rounding errors.
> Yes, but at least the vertices are not clearly duplicate. It is hard to
> set the limit on what fraction of a pixel is significant enough that we
> need to compute the intersection. There is a somewhat arbitrary limit
> hardcoded now, and the value is a trade-off between geometric
> correctness and number of vertices.
>
> When you spin the red box enough, the rounding errors accumulate, and
> the angle (the orientation is stored as a single angle in cliptest) is
> no longer approximately the multiple of 2pi. The red box is tilted
> enough for the algorithm to compute intersections instead of rounding
> back to a quadrilateral. At least I assume so.
>
> Therefore, I do not consider this a bug.
Thanks for the explanation.
>
> Now that I think of it, I could probably do with a lot smaller rounding
> threshold than the 4e-5, since your extra vertices are a result of the
> intersection code working *right*.
>
>> Apart from this issue I couldn't find any other problems.
> Thank you very much for testing!
Always happy to help!!
Cheers,
Birin
More information about the wayland-devel
mailing list