_cairo_surface_show_glyphs is allowed to mutate the glyph array; if it's
handed the internal array that the meta surface holds, then any subsequent
playback (such as for fine-grained fallbacks) will result in incorrect
glyph rendering.
Ref: https://bugzilla.mozilla.org/show_bug.cgi?id=419917
(I was unable to create a simple cairo testcase to demonstrate the problem.)
We need to have a way to figure out if a context is a bitmap context;
the current method works, but it prints a warning to the system console
if called on a non-bitmap context. There's a private CGContextGetType
API that seems to let us get this information.
I mistakenly generated the original reference images with
a 16.16 version of cairo, (which manifests a different
buggy behavior than does the current 24.8 cairo).
Need to use __WIN32__ instead of _MSC_VER to select _snprintf in
place of snprintf when cross compiling. Otherwise all all %ld
arguments get misprinted resulting in broken PDF output.
These were added in cb5ea8abfd to
quiet a compiler warning. We're reverting them now to avoid
gratuitously requiring a new pixman version just to pick up two
enum values that we aren't actually using.
This was recently broken in commit 40d5082c24
which uses a base85-stream but without strings for encapsulating image
data. The bug was that the protection for ~> was only being applied
to the string encodings rather than all base85 streams.
We got lucky recently that the 24.8 change just happened to put the ~>
sequence on the line-wrap boundary so the test suite tripped up the
bug. Otherwise, we could have missed this for quite some time.
The additional 8 bits of integer allows device space to be 256
times larger before applications need to start worrying about
any issues with overflow. So this should help in many cases.
And the loss of 8 bits of sub-pixel precision shouldn't cause
any harm at all---16 was really much more than necessary.
With this change the details of rasterization for several tests
are changed slightly, (particularly on arcs, for example), so
many reference images are updated here.
NOTE: This change is currently breaking get-path-extents for
ps/pdf/svg as well as push-group for ps. We do not yet know
the reasons for these new failures.
This test isn't generating any image output, so it's silly to
have a 60x60 reference image for that. Not only that, but the
rgb24 cases have always been failing due to a missing rgb24-
specific reference image, (but pdiff had been hiding that).
The rectangle_int16_t usage was causing failures on 24.8 (due to a wrong
pointer used to get_extents); I removed all the specific int16/int32 typedefs
to avoid this situation in the future.
Propagate the true status value back from the _cairo_gstate_init_copy()
instead of assuming that is a NO_MEMORY and re-raising the error in the
caller.
I was wrong in my assertion that the call to
_cairo_path_fixed_interpret_flat() could not possibly fail with the
given _cairo_path_bounder_* callbacks - as I had missed the implicit
spline decomposition. (An interesting exercise would be to avoid the
spline allocation...) As a result we do have to check and propagate the
status return through the call stack.
Parts of the stroker depend upon whether we have in effect a reflection
matrix (one whose determinant < 0). This test incopororates the same
drawing under the a couple of reflections to exercise stroking under
matrices with both positive and negative determinants.
Draw a few rectangles whose vertices are outside the bounds of the
surface, but whose segments cross the surface. This exercises the new
dashed stroker optimisation which tries to determine whether the line
segment is visible.
Modify cairo-pdf-operators.c to emit to 're' path operator when the
path contains only a rectangle. This can only be done when the path is
logically equivilent to the the path drawn by the 're'
operator. Otherwise dashed strokes may start on the wrong line.
ie the path must be equivalent to:
cairo_move_to (cr, x, y);
cairo_rel_line_to (cr, width, 0);
cairo_rel_line_to (cr, 0, height);
cairo_rel_line_to (cr, -width, 0);
cairo_close_path (cr);
which is also equivilent to cairo_rectangle().
pdiff was hiding a rgb24 failure here, as the test was drawing using
black ink on the default black background. Instead, explicitly fill
the surface with white first.