DO_SHADING, DO_IMAGE and DO_TILED_IMAGE sources all require the source
to be painted over the whole surface (inside the clip region), thus can
share the same code path in drawing functions.
Both DO_SOLID and DO_PATTERN setup the underlying CGContext to directly
use the chosen color/pattern when filling and stroking, thus require no
additional drawing operations and can share the same drawing code.
Share some code between the drawing functions by saving the state
and setting the operator when setting up the source and by restoring
the state during teardown.
Based on a patch by Robert O'Callahan <robert@ocallahan.org>.
See https://bugzilla.mozilla.org/show_bug.cgi?id=522859
DO_NOTHING and DO_UNSUPPORTED are not actual actions and are better
handled by returning an appropriate cairo_int_status_t (and falling
back, if needed).
Instead of extending the range of the interpolation parameter to make
sure that pixels exactly on the edge get drawn, we are now asking
quartz to extend the gradient.
Make PAD extended gardients more robust, by computing the color
explicitly like for REPEAT and REFLECT extend modes.
This removes a hack introducing a small but non-0 negative value
that ensured that the gradient started with the correct color (but
not that it ended with the correct one, too).
Fixes linear-gradient-large.
By keeping "virtual extents", quartz surfaces now keep track of
the extents where they want the gradients to be consistent.
This works across various API for surface creation and editing:
- cairo_surface_create_for_rectangle
- cairo_surface_create_similar + cairo_surface_set_device_offset
- cairo_push_group/cairo_pop_group
This method does not use clip extents, so it also makes gradient
rasterization independent of clip/path extents.
Pixman master (soon to become pixman 0.20) implements radial
gradients based on the PDF specification (section 8.7.4.5.4).
Quartz natively implements them, so falling back is not needed
anymore.
This page uses JavaScript to parse test log files and create the
test table according to the results. It also allows dynamic selection
and hiding of rows/columns based on a chosen parameter and table
structure change, by dragging a field from rows to columns and vice
versa.
Left click selects the cells with the chosen parameter-value association.
If these cells are exactly the only show cells, it hides them and shows
all the other ones, instead.
Right click inverts the visibility of the cells with the chosen
parameter-value association.
When some rows are hidden, the PASS/NEW/FAIL/XFAIL/CRASH counters show
both the currently shown test case count and the total count, if they are
different: "23[62]" means that there are 62 test case in that category,
but only 23 are currently visible.
Dragging a field from the row (or column) header to the column (or row)
header rebuilds the table to have that field along the columns (or rows),
updating PASS/NEW/FAIL/... counters and showing the whole table again.
Test names are hyperlinks to the test log.
Images are hyperlinks to themselves.
Returning CAIRO_INT_STATUS_NOTHING_TO_DO removes some code that
specifically handles it to convert to CAIRO_STATUS_SUCCESS. This
is already performed out of the backend, in the upper layers, so
it is not needed here.
The pattern handling code ensures that 0 stops patterns are reduced
to clear solid patterns before being passed down to the backend.
An assertion is used to make sure that the assumption actually holds,
removing the duplication of the reduce-to-solid-clear logic.
Invalid enum values were being ignored (and replaced by a default
value). This behavior is not desirable on development builds,
because an explicit failure is much easier to track.
Assertions allow release builds to keep on with the old behaviour,
while development builds fail as soon as the invalid operaiton is
performed.
Sun Studio Compiler complains:
"cairo-xcb-surface.c", line 585: void function cannot return value
even if the returned value is void.
Some minor code restructuring removes the issue.
Calling _cairo_xcb_surface_render_paint() with CAIRO_OPERATOR_CLEAR and no clip
just results in the surface's deferred_clear flag to be set to TRUE. Fix this by
calling _cairo_xcb_surface_clear() directly instead.
This half-fixes the clip-shape test in the test-suite. The difference to the
reference image becomes much smaller at least. :(
Signed-off-by: Uli Schlachter <psychon@znc.in>
The if that is being removed here resulted in no drawing done at all when it
skipped the call to _render_fill_boxes(). This is obviously not what
CAIRO_OPERATOR_IN wants.
This fixes the "operator" test in the test suite.
Signed-off-by: Uli Schlachter <psychon@znc.in>
In the XCB backend, drawing a surface pattern always caused an extend of
CAIRO_EXTEND_NONE to be used. This caused e.g. all the
surface-pattern-scale-down-extend-* tests in the test suite to fail.
Signed-off-by: Uli Schlachter <psychon@znc.in>