mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2025-12-30 12:00:15 +01:00
Merge branch 'master' into 'svg-backend-work'
# Conflicts: # src/cairo-gstate.c
This commit is contained in:
commit
cd0082338e
10 changed files with 78 additions and 16 deletions
File diff suppressed because one or more lines are too long
|
|
@ -43,6 +43,8 @@ if cc.get_id() == 'msvc'
|
|||
language : 'c')
|
||||
endif
|
||||
|
||||
add_project_arguments('-D_GNU_SOURCE', language: 'c')
|
||||
|
||||
# Make sure source directory hasn't been configured with autotools
|
||||
if meson.version().version_compare('>= 0.53')
|
||||
fs = import('fs')
|
||||
|
|
|
|||
|
|
@ -938,7 +938,7 @@ _cairo_gstate_copy_transformed_pattern (cairo_gstate_t *gstate,
|
|||
const cairo_matrix_t *ctm_inverse)
|
||||
{
|
||||
/*
|
||||
* What calculations bellow do can described in pseudo-code (so using nonexistent fields) as (using column vectors):
|
||||
* What calculations below do can be described in pseudo-code (so using nonexistent fields) as (using column vectors):
|
||||
* pattern->matrix = surface->device_transform *
|
||||
* pattern->matrix *
|
||||
* ctm_inverse *
|
||||
|
|
|
|||
|
|
@ -43,7 +43,10 @@
|
|||
#include "cairo-xlib-surface-private.h"
|
||||
|
||||
#if !HAVE_X11_EXTENSIONS_XSHM_H || !(HAVE_X11_EXTENSIONS_SHMPROTO_H || HAVE_X11_EXTENSIONS_SHMSTR_H)
|
||||
void _cairo_xlib_display_init_shm (cairo_xlib_display_t *display) {}
|
||||
void _cairo_xlib_display_init_shm (cairo_xlib_display_t *display)
|
||||
{
|
||||
display->shm = NULL;
|
||||
}
|
||||
|
||||
cairo_surface_t *
|
||||
_cairo_xlib_surface_get_shm (cairo_xlib_surface_t *surface,
|
||||
|
|
|
|||
|
|
@ -209,13 +209,15 @@ static const char *
|
|||
_format_to_string (cairo_format_t format)
|
||||
{
|
||||
switch (format) {
|
||||
case CAIRO_FORMAT_ARGB32: return "ARGB32";
|
||||
case CAIRO_FORMAT_RGB30: return "RGB30";
|
||||
case CAIRO_FORMAT_RGB24: return "RGB24";
|
||||
case CAIRO_FORMAT_RGB16_565: return "RGB16_565";
|
||||
case CAIRO_FORMAT_A8: return "A8";
|
||||
case CAIRO_FORMAT_A1: return "A1";
|
||||
case CAIRO_FORMAT_INVALID: return "INVALID";
|
||||
case CAIRO_FORMAT_ARGB32: return "ARGB32";
|
||||
case CAIRO_FORMAT_RGB30: return "RGB30";
|
||||
case CAIRO_FORMAT_RGB24: return "RGB24";
|
||||
case CAIRO_FORMAT_RGB16_565: return "RGB16_565";
|
||||
case CAIRO_FORMAT_RGB96F: return "RGB96F";
|
||||
case CAIRO_FORMAT_RGBA128F: return "RGBA128F";
|
||||
case CAIRO_FORMAT_A8: return "A8";
|
||||
case CAIRO_FORMAT_A1: return "A1";
|
||||
case CAIRO_FORMAT_INVALID: return "INVALID";
|
||||
}
|
||||
ASSERT_NOT_REACHED;
|
||||
return "INVALID";
|
||||
|
|
|
|||
|
|
@ -69,6 +69,7 @@
|
|||
#endif
|
||||
|
||||
#if CAIRO_CAN_TEST_SVG_SURFACE
|
||||
#define RSVG_DISABLE_DEPRECATION_WARNINGS
|
||||
#include <librsvg/rsvg.h>
|
||||
#ifndef RSVG_CAIRO_H
|
||||
#include <librsvg/rsvg-cairo.h>
|
||||
|
|
|
|||
|
|
@ -612,6 +612,7 @@ expect_fail_due_to_env_var (cairo_test_context_t *ctx,
|
|||
char *env_name;
|
||||
const char *env;
|
||||
cairo_bool_t result = FALSE;
|
||||
char *to_replace;
|
||||
|
||||
/* Construct the name of the env var */
|
||||
env_name = malloc (strlen (prefix) + strlen (target->name) + 1 + strlen (content) + 1);
|
||||
|
|
@ -625,6 +626,14 @@ expect_fail_due_to_env_var (cairo_test_context_t *ctx,
|
|||
strcat (env_name, "_");
|
||||
strcat (env_name, content);
|
||||
|
||||
/* Deal with some invalid characters: Replace '-' and '&' with '_' */
|
||||
while ((to_replace = strchr(env_name, '-')) != NULL) {
|
||||
*to_replace = '_';
|
||||
}
|
||||
while ((to_replace = strchr(env_name, '&')) != NULL) {
|
||||
*to_replace = '_';
|
||||
}
|
||||
|
||||
env = getenv (env_name);
|
||||
|
||||
/* Look for the test name in the env var (comma separated) */
|
||||
|
|
@ -1066,6 +1075,20 @@ main (int argc, char **argv)
|
|||
}
|
||||
}
|
||||
}
|
||||
if (getenv ("CAIRO_TEST_UGLY_HACK_TO_IGNORE_QUARTZ_COVERAGE_COLUMN_TRIANGLES")) {
|
||||
if (strcmp (target->name, "quartz") == 0 && target->content == CAIRO_CONTENT_COLOR_ALPHA && strcmp (ctx.test_name, "coverage-column-triangles") == 0) {
|
||||
if (status == CAIRO_TEST_FAILURE) {
|
||||
cairo_test_log (&ctx, "Turning FAIL into XFAIL due to env\n");
|
||||
fprintf (stderr, "Turning FAIL into XFAIL due to env\n");
|
||||
runner.num_ignored_via_env++;
|
||||
status = CAIRO_TEST_XFAILURE;
|
||||
} else {
|
||||
fprintf (stderr, "Test was expected to fail due to an environment variable, but did not!\n");
|
||||
fprintf (stderr, "Please remove the hack to ignore xcb-huge-image-shm errors for the script backend.\n");
|
||||
status = CAIRO_TEST_ERROR;
|
||||
}
|
||||
}
|
||||
}
|
||||
switch (status) {
|
||||
case CAIRO_TEST_SUCCESS:
|
||||
target_skipped = FALSE;
|
||||
|
|
|
|||
|
|
@ -858,6 +858,8 @@ matches_reference (struct slave *slave)
|
|||
|
||||
case CAIRO_FORMAT_RGB30:
|
||||
case CAIRO_FORMAT_RGB16_565:
|
||||
case CAIRO_FORMAT_RGB96F:
|
||||
case CAIRO_FORMAT_RGBA128F:
|
||||
case CAIRO_FORMAT_INVALID:
|
||||
assert (0);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,6 +27,9 @@
|
|||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
|
||||
/* Disable deprecation warnings coming from librsvg */
|
||||
#define RSVG_DISABLE_DEPRECATION_WARNINGS
|
||||
#include <librsvg/rsvg.h>
|
||||
|
||||
#define FAIL(msg) \
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@
|
|||
GType \
|
||||
underscore_name ## _get_type (void) \
|
||||
{ \
|
||||
static volatile gsize type_volatile = 0; \
|
||||
static gsize type_volatile = 0; \
|
||||
if (g_once_init_enter (&type_volatile)) { \
|
||||
GType type = g_boxed_type_register_static (g_intern_static_string (Name), \
|
||||
(GBoxedCopyFunc)copy_func, \
|
||||
|
|
@ -71,12 +71,19 @@ CAIRO_DEFINE_BOXED ("CairoFontOptions", cairo_gobject_font_options,
|
|||
CAIRO_DEFINE_BOXED ("CairoRegion", cairo_gobject_region,
|
||||
cairo_region_reference, cairo_region_destroy);
|
||||
|
||||
#if GLIB_CHECK_VERSION(2, 68, 0)
|
||||
#define COPY_FUNC(name) \
|
||||
static gpointer \
|
||||
cairo_gobject_cairo_ ## name ## _copy (gpointer src) \
|
||||
{ \
|
||||
return g_memdup (src, sizeof (cairo_ ## name ## _t)); \
|
||||
cairo_gobject_cairo_ ## name ## _copy (gpointer src) { \
|
||||
return g_memdup2 (src, sizeof (cairo_ ## name ## _t)); \
|
||||
}
|
||||
#else
|
||||
#define COPY_FUNC(name) \
|
||||
static gpointer \
|
||||
cairo_gobject_cairo_ ## name ## _copy (gpointer src) { \
|
||||
return g_memdup (src, sizeof (cairo_ ## name ## _t)); \
|
||||
}
|
||||
#endif
|
||||
|
||||
COPY_FUNC (matrix)
|
||||
CAIRO_DEFINE_BOXED ("CairoMatrix", cairo_gobject_matrix,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue