To support differentiating between GLES v2 and v3, rename the flavor
enum to be version specific, as CAIRO_GL_FLAVOR_ES2.
Then, when GLES v3 support is introduced we can add it as a distinct
flavor enum (i.e. CAIRO_GL_FLAVOR_ES3).
Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
On systems using GNU's strings implementation, 'strings -' causes a scan
of the whole file, which is equivalent to 'strings -a'. However, in
POSIX passing '-' as the first argument to 'strings' is declared
unspecified, and thus may break the build on systems that use a
different POSIX strings implementation.
Patch from Jung-uk Kim
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=88639
Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
"This function returns the type a pattern." is obviously missing 'of',
but this can be stated more succinctly with active voice.
Signed-off-by: Bryce Harrington <bryce@bryceharrington.org>
"can be get" is incorrect grammar; "can be gotten" would be better, but
active voice is best.
Signed-off-by: Bryce Harrington <bryce@bryceharrington.org>
The cairo_tag_begin/cairo_tag_end API is for supporting hyperlinks and
creating tagged PDF files.
The source, ctm, and stroke style are passed to the backend to allow
these parameters to be used to specify hyperlink border attributes.
Adobe PhotoShop generates CMYK JPEG files with inverted CMYK. When a
JPEG file with this format is included in a PDF file, a `/Decode`
array must be included to convert to "normal" CMYK.
These JPEG files can be detected via the presence of the APP14 "Adobe"
marker. However, PDF viewers are not required to detect and handle
this private marker, so it must be detected and handled (by adding a
`/Decode`) by the PDF generator.
Signed-Off-By: Peter TB Brett <peter.brett@livecode.com>
Some debugging functions wrote to stdout, which is inconsistent with
the other debugging functions of the same groups.
Instead they should write to the debugging file that they are given as
input.
Reviewed-by: Andrea Canciani <ranma42@gmail.com>
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=95227
Invoking cairo_surface_mark_dirty () on an observer surface would
cause it to print debugging output to stdout.
Reviewed-by: Andrea Canciani <ranma42@gmail.com>
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=95227
The destruction of a scaled font could indirectly trigger the destruction
of a second scaled font, causing the global cache to be locked twice in
the same thread.
This is solved by unlinking the font's glyph pages while holding the global
lock, then releasing the lock before destruction takes place.
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=93891
When doing a "complicated" mask operation, we draw the clip to a surface and use
this as a mask in later operations. The code assumes that this operation draws
to the whole target surface and thus a deferred clear may be skipped.
However, this requires that the extents of the trapezoids that will be drawn and
the extents of the surface are the same. This assumption is wrong, as can be
seen e.g. by the bug report that this commit fixes.
The fix is just not to skip the deferred clear.
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=84330
Signed-off-by: Uli Schlachter <psychon@znc.in>
In this bug a Type 3 font contains a dash glyph. The dash glyph
consists of an 82x2 image. The image height, when scaled to user space,
is < 1 resuling in the drawing operation for the image being culled.
https://bugs.freedesktop.org/show_bug.cgi?id=94615
If the image operator does not read all the ASCII85 data, the PS
interpreter will try to execute the next byte of unread data.
Define our own image operator that calls flushfile (reads until end of
file) on the filter after drawing the image.
https://bugs.freedesktop.org/show_bug.cgi?id=84811
According to the Opentype spec, num_contours in a glyf table entry can
be > 0 (single glyph) or < 0 (composite glyph). num_contours == 0 is
undefined.
The embedded font in the test case for this bug contained a space
glyph with num_contours == 0. This was failing on some printers.
According to the spec, glyphs with no outlines such as space are
required to have a 0 size entry in the loca table.
https://bugs.freedesktop.org/show_bug.cgi?id=79897
_cairo_clip_init_copy() was removed with commit b132fae5e8,
but a few calls were still remaining.
Signed-off-by: Enrico Weigelt, metux IT consult <enrico.weigelt@gr13.net>
Signed-off-by: Uli Schlachter <psychon@znc.in>
We have two places where copying from box set to clip is
implemented in the same way. Just move that to one function.
Signed-off-by: Enrico Weigelt, metux IT consult <enrico.weigelt@gr13.net>
Signed-off-by: Uli Schlachter <psychon@znc.in>
When parameter force_allocation is false *and* the box set has
exactly one chunk, this chunk is returned directly - w/o copying it.
That mode is never used, and it's highly problematic as it's unclear
whether we have to free the returnd object or it's still owned
by somebody else.
Just dropping the useless parameter / corner case to make the function
simpler and more robust.
Signed-off-by: Enrico Weigelt, metux IT consult <enrico.weigelt@gr13.net>
Signed-off-by: Uli Schlachter <psychon@znc.in>
The code correct, but the compiler can't check that and thinks
there're uninitialized variables.
Perhaps we could rewrite it in a better way, so the compiler
can do better (even arch specific) optimizations.
Signed-off-by: Enrico Weigelt, metux IT consult <enrico.weigelt@gr13.net>
Signed-off-by: Uli Schlachter <psychon@znc.in>