[cairo] [PATCH] test: Fix coverage-intersecting-triangles reference

Andrea Canciani ranma42 at gmail.com
Thu Mar 26 17:09:40 PDT 2015


On Thu, Mar 26, 2015 at 10:36 PM, Chris Wilson <chris at chris-wilson.co.uk>
wrote:

> On Thu, Mar 26, 2015 at 05:55:37PM +0100, Andrea Canciani wrote:
> > Commit 4e3ef57bc892b0b046c486390adc7164a1de64de added
> > coverage-intersecting-triangles with an incorrect reference and
> > generator. The test checks the rasterization of two overlapping
> > triangles in the following position:
> >
> >    .   .
> >    |\ /|
> >    | X |
> >    |/ \|
> >    .---.
> >
> > Since the triangles have both vertical and horizontal sides of size
> > x/WIDTH, the expected coverage is 3/4 (75%) of (x/WIDTH)^2. The
> > original code, instead, was checking for a coverage of 0.75*x/WIDTH,
> > as if one of the sides was always 1 unit long.
> >
> > The image and xlib backends still suffer from some jitter, caused by
> > the approximation of the actual coverage by means of sampling, but
> > their result now looks consistent with the expected reference.
> > ---
> >  test/coverage.c                                         |   2 +-
> >  .../coverage-intersecting-triangles.image.ref.png       | Bin 0 ->
> 14444 bytes
> >  test/reference/coverage-intersecting-triangles.ref.png  | Bin 209 ->
> 262 bytes
> >  .../reference/coverage-intersecting-triangles.xfail.png | Bin 14444 ->
> 0 bytes
> >  .../coverage-intersecting-triangles.xlib.ref.png        | Bin 0 ->
> 16728 bytes
> >  .../coverage-intersecting-triangles.xlib.xfail.png      | Bin 16728 ->
> 0 bytes
> >  6 files changed, 1 insertion(+), 1 deletion(-)
> >  create mode 100644
> test/reference/coverage-intersecting-triangles.image.ref.png
> >  delete mode 100644
> test/reference/coverage-intersecting-triangles.xfail.png
> >  create mode 100644
> test/reference/coverage-intersecting-triangles.xlib.ref.png
> >  delete mode 100644
> test/reference/coverage-intersecting-triangles.xlib.xfail.png
>
> Apart from they are still xfail since they are necessarily imperfect
> approximations (xlib doubly so if backed by pixman due to the
> intersections).
>

I just sent in a new patch which keeps xfail references for image and xlib
and updates the generic reference image.

Andrea


> -Chris
>
> --
> Chris Wilson, Intel Open Source Technology Centre
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cairographics.org/archives/cairo/attachments/20150327/4505dd42/attachment.html>


More information about the cairo mailing list