Using DEST_OVER in this form to paint the background white fails in the
presence of subpixel geometry (particular text), so remove the hack and
simply paint the background white prior to passing the surface to
poppler. KISS.
This test case should be much clearer than half-coverage over what it
purports to actually test. In each pixel, it draws a single geometric
primitive that coverages a known percentage of the pixel and then we
measure how close the rasterisers are to that ideal.
Hitting an error in a test case is almost as bad as crashing, and the
severity may be lost amidst "normal" failures. So introduce a new class
of ERROR so that we can immediately spot these during a test run, and
appropriately log them afterwards.
Add some overlapping triangles (coarse enough for them to be resolved
using Cairo's 24.8 fixed point without loss of precision) to exercise
handling of overlapping subpixel geometry.
Hmm, red over red makes the test pointless. The test still remains of
highly dubious quality, as it primarily serves as a rendercheck more
than a test of Cairo. The best hope for this test is that it inspires a
better one.
And incorporate the notes made by Joonas.
Add tests for degeneratate linear gradients (with start point equal
to the end point), degenerate radial gradients (start radius and end
radius equal to zero, same start and end circle) and gradients (both
linear and radial) with just a single stop.
I accidentally pushed this debugging left-over from when I was tracking
down a race in memfault. Remove it so that the test suite compiles on
more minimal pthread setups.
Set the CAIRO_TEST_FORCE_PASS environment variable to run through the
test suite and ignore errors. Useful for forcing distcheck to continue
past a broken test suite.
As we actually use the GLXContext to create the device, we only want to
free those resources upon the final unreference of the device (and not
the initial surface).
Test handling of source clipping with an image - principally to check
handling of mime types and zero-copy image snapshotting in the vector
surfaces and ensure that they work with subsurface patterns as well.
Add tests to ensure that modifications to the subsurface via the
original surface are tracked by the subsurface, i.e. that any snapshots
are detached upon modification of the parent as well as modification of
itself and vice versa.
Carefully handle subsurfaces of a recording surface through the analysis
and paginated surfaces so that we can generate a native pattern for the
vector backends, demonstrated by the PostScript backend.
Nothing remarkable, just a lot of bookkeeping to track the wrapped
surface types and to apply the correct offsets when generating the
subsurface pattern.
After a renewed discussion, it was pointed out that the API in Cairo was
not restrictive and by using doubles we would be consisted with the rest
of the API. Thus prompting the name change to
cairo_surface_create_for_rectangle()
similar to cairo_rectangle().
And document the public API.