Use cairo_format_stride_for_width() instead of assuming the pixel size
and manually calculating the row stride. This should make it easier to
support loading multiple image formats in future.
Check the user supplied values for validity and potential overflow,
returning -1 in such cases, and update the documentation to warn of the
new error return.
On some OOM paths, libpng raises a warning as opposed to an error,
these were not being propagated back to the caller. We were also not
checking that we did not overwrite a pre-existing error status when
raising an error whilst performing I/O.
Remove duplicate _cairo_error() by ensuring that the error status is
always propagated from the original error site. Note that in one case
this eliminates a potential _cairo_error(CAIRO_INT_STATUS_UNSUPPORTED)!
_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).