Adrian Johnson
8da24bf7fb
Make _cairo_calloc() consistent with _cairo_malloc()
...
ie
_cairo_calloc(size)
_cairo_calloc_ab(a, size)
2024-06-21 08:53:01 +09:30
Adrian Johnson
3715d93bdf
Create _cairo_calloc() macro to replace calloc()
...
Not all platforms handle a zero sized allocation in calloc the
same. This macro ensures that _cairo_calloc(0) always returns NULL
similar to _cairo_malloc(0).
2024-05-21 20:20:49 +09:30
Alan Coopersmith
44e4e11236
Fix alloca undefined on Solaris
...
Solaris defines alloca in the <alloca.h> header
../src/cairo-colr-glyph-render.c: In function ‘add_sweep_gradient_patches’:
../src/cairo-colr-glyph-render.c:661:14: error: implicit declaration of
function ‘alloca’ [-Werror=implicit-function-declaration]
661 | angles = alloca (sizeof (double) * cl->n_stops);
| ^~~~~~
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2024-04-15 10:40:08 -07:00
Dan Yeaw
27cdee5e4c
Fix alloca undefined with MSVC
...
Conditionally includes malloc.h when compiling with
MSVC so that alloca is defined.
2023-09-30 13:30:51 -04:00
Adrian Johnson
c8695f0503
Foreground color fixes for ft, svg, colrv1
2023-01-27 20:22:18 +10:30
Behdad Esfahbod
3b807c1d7e
[colrv1] Fix crash in get_palette_color
...
is_foreground_color can be NULL.
2023-01-23 16:50:48 -07:00
Matthias Clasen
2e4afeb4bc
cairo-ft: Pass the palette to the COLRv1 renderer
...
It an unnecessary complication for use to pass
the palette index, and have the COLRv1 renderer
pull the palette out of the FT_Face, after we
just selected it.
2023-01-20 14:58:27 -05:00
Adrian Johnson
2c557d7cea
Merge branch 'colrv1-stack-variable' into 'master'
...
[COLRv1] Allocate context variable on the stack
See merge request cairo/cairo!410
2023-01-17 20:26:50 +00:00
Adrian Johnson
f133b4be13
Merge branch 'optimize-paint-composite' into 'master'
...
[COLRv1] Optimize paint-composite
See merge request cairo/cairo!411
2023-01-17 20:25:07 +00:00
Adrian Johnson
68ee427b66
Merge branch 'colr-foreground-alpha' into 'master'
...
[COLRv1] Apply alpha to foreground color
See merge request cairo/cairo!409
2023-01-17 20:24:16 +00:00
Behdad Esfahbod
0f8bd754ae
[COLRv1] Optimize paint-composite
...
See https://github.com/googlefonts/colr-gradients-spec/issues/369
2023-01-17 08:10:36 -07:00
Behdad Esfahbod
9e6c1e479f
[COLRv1] Allocate context variable on the stack
2023-01-17 07:58:38 -07:00
Behdad Esfahbod
ef9ea14352
[COLRv1] Apply alpha to foreground color
2023-01-17 06:48:28 -07:00
Adrian Johnson
f642714473
colrv1: Fix palette alpha
...
Fixes #624
2023-01-17 23:08:22 +10:30
Adrian Johnson
dd8f55100a
Require -DDEBUG_ENABLE_COLR_V1 to enable the COLR v1 renderer
...
Once there is a FreeType release where the COLR v1 API is no longer
marked experimental, we can change this to a version check.
2023-01-08 15:15:13 +10:30
Adrian Johnson
89d004432b
COLRv1: Use cairo style and types
2023-01-08 15:15:13 +10:30
Adrian Johnson
2dfc52064e
Use cairo-ft-font.c decompose function
2023-01-08 15:15:13 +10:30
Adrian Johnson
1129b194b5
Render COLRv1 to a recording surface
2023-01-08 15:15:13 +10:30
Adrian Johnson
9ed34574a6
Fix a couple of bugs and add a #define to enable debug
2023-01-08 15:15:13 +10:30
Adrian Johnson
3c8dec60e5
Integrate COLR v1 renderer with cairo-ft-font.c
2023-01-08 15:15:13 +10:30
Adrian Johnson
e892d0e92f
COLRv1 glyph renderer
...
Matthias Clasen's COLR v1 glyph renderer from !370
2023-01-08 10:00:29 +10:30