The buffer stack was moved from the surface to the device, as
mapped buffers are shared across all surfaces using the device
and more than one surface may be doing so. Stemming from this, if
a surface tries to map a buffer without first unmapping one that
has been mapped by another surface, it will trigger an error.
The parent backend functions were moved from the device to the
context, as it is possible that the context creation function could
be passed a non-cogl device. Prior to this change, many of the
subsurface tests segfaulted.
Signed-off-by: George Matsumura <gmmatsumura01@bvsd.org>
Previously, if an unbounded recording surface was given as the
source, the program triggered an assertion failure in the recording
surface code, as acquire_source_image cannot be used on the surface
in this case. This adds a new path to deal with such an unbounded
source surface.
Signed-off-by: George Matsumura <gmmatsumura01@bvsd.org>
Previously, the rectangle fallback path in surface_paint was
incorrectly passing and int to a function that required a
fixed-point number.
Signed-off-by: George Matsumura <gmmatsumura01@bvsd.org>
With the new cogl API, casting the framebuffer into offscreen
and onscreen types with the provided macros is a deprecated
behavior.
Signed-off-by: George Matsumura <gmmatsumura01@bvsd.org>
Before this change, there was the possibility of context functions
only meant for the cogl surface backend being used on a non-cogl
surface.
Signed-off-by: George Matsumura <gmmatsumura01@bvsd.org>
Without this, a buffer-swapping function only usable on onscreen
framebuffers would have been used on offscreen framebuffers.
Signed-off-by: George Matsumura <gmmatsumura01@bvsd.org>
In order to satisfy the runtime check that accounts for new
API functions that modify the transformation matrix, the new
functions for translation from backend to user coordinates must
be accounted for.
Signed-off-by: George Matsumura <gmmatsumura01@bvsd.org>
The path functions in the cogl API have now been split into a
separate one which builds from the same codebase. In order to
compile with this change, the new library has to be added as
an explicit dependency.
Signed-off-by: George Matsumura <gmmatsumura01@bvsd.org>
The old boilerplate code no longer worked due to the deprecation of
functions for swapping the buffers that it used.
Signed-off-by: George Matsumura <gmmatsumura01@bvsd.org>
These are more changes required to match the new backwards-incompatible
API of cogl-experimental.
Signed-off-by: George Matsumura <gmmatsumura01@bvsd.org>
This is the first part of updates to match the backwards-incompatible
changes that have been made in the cogl-experimental public API
since this backend last worked.
Signed-off-by: George Matsumura <gmmatsumura01@bvsd.org>
Update fontconfig wrap to upstream now that it's been merged.
Add gperf wrap which is needed for fontconfig, same as in the
upstream fontconfig repo (this can't be put into wrapdb yet
because it requires changes to source files).
- vsnprintf and snprintf are available since vs2015
- define ISREG if not provided
- guard unistd.h include with HAVE_UNISTD_H
- isnan() is available after vs2010
When the build dir is different from the source dir,
"png.png" is not a valid path. As we can't dispose of
an allocated filename, we add an atexit handler.
This way all binutils tools are detected with $CHOST prefix
if exist. And strings is allowed to be substituted with
STRINGS environment override, so 'llvm-strings' (or other)
alternative can be used.
Bug: https://bugs.gentoo.org/726200
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
This function is reachable via cairo_ft_font_face_create_for_ft_face()
-> _cairo_ft_unscaled_font_create_from_face() ->
_cairo_ft_unscaled_font_create_internal() ->
_cairo_ft_unscaled_font_map_lock(). Thus, it could happen that nothing
initialized mutexes before this code runs.
Signed-off-by: Uli Schlachter <psychon@znc.in>
The code in test/cairo-test-runner.c properly takes into account
platforms that do have fork() support, and uses the SHOULD_FORK define
to know whether fork is available or not.
However, this SHOULD_FORK macro is used to guard the inclusion of
<unistd.h>, which is needed to get the prototype of other functions
(namely readlink and getppid), that are used in portions of this file
not guarded by SHOULD_FORK.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
[Retrieved from:
https://git.buildroot.net/buildroot/tree/package/cairo/0001-fix-nofork-build.patch]
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
We can't just move around the contents of the
passed-in string, we need to make a copy. This
was showing up as memory corruption in pango.
See https://gitlab.gnome.org/GNOME/pango/issues/346
Support subpixel positioning with a 4x4 subpixel grid.
When compositing glyphs in the image compositor,
we store the subpixel phases in the high bits of the
glyph index. The _cairo_scaled_glyph_index() macro
has been updated to discard these bits. By storing
the phases in the glyph index, the glyph cache just
keeps working. When loading a glyph, the Freetype
font backend shifts the outline according to the
phases.
FT_PIXEL_MODE_BGRA is an enum member, not a define, so it always appears
as 0 in the preprocessor conditions added in commit c0ed8ce1a1.
There is an existing define for color font support, use that instead.
Since commit a34cb719cd, we need pixman >= 0.36, which is not yet
in the latest Fedora. Thus, this switches to Fedora rawhide to make
things work again.
Signed-off-by: Uli Schlachter <psychon@znc.in>