summaryrefslogtreecommitdiffstats
path: root/gfx/cairo/libpixman
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-12 05:35:29 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-12 05:35:29 +0000
commit59203c63bb777a3bacec32fb8830fba33540e809 (patch)
tree58298e711c0ff0575818c30485b44a2f21bf28a0 /gfx/cairo/libpixman
parentAdding upstream version 126.0.1. (diff)
downloadfirefox-59203c63bb777a3bacec32fb8830fba33540e809.tar.xz
firefox-59203c63bb777a3bacec32fb8830fba33540e809.zip
Adding upstream version 127.0.upstream/127.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'gfx/cairo/libpixman')
-rw-r--r--gfx/cairo/libpixman/AUTHORS0
-rw-r--r--gfx/cairo/libpixman/INSTALL228
-rw-r--r--gfx/cairo/libpixman/README6
-rw-r--r--gfx/cairo/libpixman/src/meson.build5
-rw-r--r--gfx/cairo/libpixman/src/pixman-access.c160
-rw-r--r--gfx/cairo/libpixman/src/pixman-arm-asm.h10
-rw-r--r--gfx/cairo/libpixman/src/pixman-arm-neon-asm-bilinear.S2
-rw-r--r--gfx/cairo/libpixman/src/pixman-arm-neon-asm.S78
-rw-r--r--gfx/cairo/libpixman/src/pixman-arm-neon-asm.h27
-rw-r--r--gfx/cairo/libpixman/src/pixman-arm-neon.c2
-rw-r--r--gfx/cairo/libpixman/src/pixman-arm-simd-asm-scaled.S21
-rw-r--r--gfx/cairo/libpixman/src/pixman-arm-simd-asm.S19
-rw-r--r--gfx/cairo/libpixman/src/pixman-arm-simd-asm.h34
-rw-r--r--gfx/cairo/libpixman/src/pixman-arm-simd.c2
-rw-r--r--gfx/cairo/libpixman/src/pixman-arm.c2
-rw-r--r--gfx/cairo/libpixman/src/pixman-bits-image.c28
-rw-r--r--gfx/cairo/libpixman/src/pixman-combine-float.c2
-rw-r--r--gfx/cairo/libpixman/src/pixman-combine32.c2
-rw-r--r--gfx/cairo/libpixman/src/pixman-conical-gradient.c2
-rw-r--r--gfx/cairo/libpixman/src/pixman-edge.c2
-rw-r--r--gfx/cairo/libpixman/src/pixman-fast-path.c12
-rw-r--r--gfx/cairo/libpixman/src/pixman-filter.c33
-rw-r--r--gfx/cairo/libpixman/src/pixman-general.c2
-rw-r--r--gfx/cairo/libpixman/src/pixman-glyph.c2
-rw-r--r--gfx/cairo/libpixman/src/pixman-gradient-walker.c2
-rw-r--r--gfx/cairo/libpixman/src/pixman-image.c6
-rw-r--r--gfx/cairo/libpixman/src/pixman-implementation.c2
-rw-r--r--gfx/cairo/libpixman/src/pixman-linear-gradient.c2
-rw-r--r--gfx/cairo/libpixman/src/pixman-matrix.c2
-rw-r--r--gfx/cairo/libpixman/src/pixman-mips-dspr2.c2
-rw-r--r--gfx/cairo/libpixman/src/pixman-mips.c2
-rw-r--r--gfx/cairo/libpixman/src/pixman-mmx.c6
-rw-r--r--gfx/cairo/libpixman/src/pixman-noop.c2
-rw-r--r--gfx/cairo/libpixman/src/pixman-ppc.c2
-rw-r--r--gfx/cairo/libpixman/src/pixman-private.h23
-rw-r--r--gfx/cairo/libpixman/src/pixman-radial-gradient.c2
-rw-r--r--gfx/cairo/libpixman/src/pixman-region.c8
-rw-r--r--gfx/cairo/libpixman/src/pixman-region16.c2
-rw-r--r--gfx/cairo/libpixman/src/pixman-region32.c2
-rw-r--r--gfx/cairo/libpixman/src/pixman-solid-fill.c2
-rw-r--r--gfx/cairo/libpixman/src/pixman-sse2.c20
-rw-r--r--gfx/cairo/libpixman/src/pixman-ssse3.c2
-rw-r--r--gfx/cairo/libpixman/src/pixman-timer.c2
-rw-r--r--gfx/cairo/libpixman/src/pixman-trap.c2
-rw-r--r--gfx/cairo/libpixman/src/pixman-utils.c6
-rw-r--r--gfx/cairo/libpixman/src/pixman-version.h6
-rw-r--r--gfx/cairo/libpixman/src/pixman-vmx.c35
-rw-r--r--gfx/cairo/libpixman/src/pixman-x86.c65
-rw-r--r--gfx/cairo/libpixman/src/pixman.c7
-rw-r--r--gfx/cairo/libpixman/src/pixman.h11
50 files changed, 369 insertions, 535 deletions
diff --git a/gfx/cairo/libpixman/AUTHORS b/gfx/cairo/libpixman/AUTHORS
deleted file mode 100644
index e69de29bb2..0000000000
--- a/gfx/cairo/libpixman/AUTHORS
+++ /dev/null
diff --git a/gfx/cairo/libpixman/INSTALL b/gfx/cairo/libpixman/INSTALL
index 5458714e1e..582470441c 100644
--- a/gfx/cairo/libpixman/INSTALL
+++ b/gfx/cairo/libpixman/INSTALL
@@ -10,225 +10,29 @@ unlimited permission to copy, distribute and modify it.
Basic Installation
==================
-Briefly, the shell commands `./configure; make; make install' should
-configure, build, and install this package. The following
-more-detailed instructions are generic; see the `README' file for
-instructions specific to this package.
+Briefly, the shell commands `meson setup build/; ninja -C build; ninja
+-C build install` should configure, build, and install this package. The
+following more-detailed instructions are generic; see the `README` file
+for instructions specific to this package.
- The `configure' shell script attempts to guess correct values for
-various system-dependent variables used during compilation. It uses
-those values to create a `Makefile' in each directory of the package.
-It may also create one or more `.h' files containing system-dependent
-definitions. Finally, it creates a shell script `config.status' that
-you can run in the future to recreate the current configuration, and a
-file `config.log' containing compiler output (useful mainly for
-debugging `configure').
-
- It can also use an optional file (typically called `config.cache'
-and enabled with `--cache-file=config.cache' or simply `-C') that saves
-the results of its tests to speed up reconfiguring. Caching is
-disabled by default to prevent problems with accidental use of stale
-cache files.
-
- If you need to do unusual things to compile the package, please try
-to figure out how `configure' could check whether to do them, and mail
-diffs or instructions to the address given in the `README' so they can
-be considered for the next release. If you are using the cache, and at
-some point `config.cache' contains results you don't want to keep, you
-may remove or edit it.
-
- The file `configure.ac' (or `configure.in') is used to create
-`configure' by a program called `autoconf'. You need `configure.ac' if
-you want to change it or regenerate `configure' using a newer version
-of `autoconf'.
+ Running `meson setup` attempts to guess correct values for various
+system-dependent variables used during compilation.
The simplest way to compile this package is:
- 1. `cd' to the directory containing the package's source code and type
- `./configure' to configure the package for your system.
+ 1. `cd` to the directory containing the package's source code and type
+ `meson setup build/` to configure the package for your system.
- Running `configure' might take a while. While running, it prints
- some messages telling which features it is checking for.
+ While running, it prints some messages telling which features it
+ is checking for.
- 2. Type `make' to compile the package.
+ 2. Type `ninja -C build` to compile the package.
- 3. Optionally, type `make check' to run any self-tests that come with
- the package.
+ 3. Optionally, type `ninja -C build test` to run any self-tests that
+ come with the package.
- 4. Type `make install' to install the programs and any data files and
- documentation.
+ 4. Type `ninja -C build install` to install the programs and any
+ data files and documentation.
5. You can remove the program binaries and object files from the
- source code directory by typing `make clean'. To also remove the
- files that `configure' created (so you can compile the package for
- a different kind of computer), type `make distclean'. There is
- also a `make maintainer-clean' target, but that is intended mainly
- for the package's developers. If you use it, you may have to get
- all sorts of other programs in order to regenerate files that came
- with the distribution.
-
-Compilers and Options
-=====================
-
-Some systems require unusual options for compilation or linking that the
-`configure' script does not know about. Run `./configure --help' for
-details on some of the pertinent environment variables.
-
- You can give `configure' initial values for configuration parameters
-by setting variables in the command line or in the environment. Here
-is an example:
-
- ./configure CC=c99 CFLAGS=-g LIBS=-lposix
-
- *Note Defining Variables::, for more details.
-
-Compiling For Multiple Architectures
-====================================
-
-You can compile the package for more than one kind of computer at the
-same time, by placing the object files for each architecture in their
-own directory. To do this, you can use GNU `make'. `cd' to the
-directory where you want the object files and executables to go and run
-the `configure' script. `configure' automatically checks for the
-source code in the directory that `configure' is in and in `..'.
-
- With a non-GNU `make', it is safer to compile the package for one
-architecture at a time in the source code directory. After you have
-installed the package for one architecture, use `make distclean' before
-reconfiguring for another architecture.
-
-Installation Names
-==================
-
-By default, `make install' installs the package's commands under
-`/usr/local/bin', include files under `/usr/local/include', etc. You
-can specify an installation prefix other than `/usr/local' by giving
-`configure' the option `--prefix=PREFIX'.
-
- You can specify separate installation prefixes for
-architecture-specific files and architecture-independent files. If you
-pass the option `--exec-prefix=PREFIX' to `configure', the package uses
-PREFIX as the prefix for installing programs and libraries.
-Documentation and other data files still use the regular prefix.
-
- In addition, if you use an unusual directory layout you can give
-options like `--bindir=DIR' to specify different values for particular
-kinds of files. Run `configure --help' for a list of the directories
-you can set and what kinds of files go in them.
-
- If the package supports it, you can cause programs to be installed
-with an extra prefix or suffix on their names by giving `configure' the
-option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
-
-Optional Features
-=================
-
-Some packages pay attention to `--enable-FEATURE' options to
-`configure', where FEATURE indicates an optional part of the package.
-They may also pay attention to `--with-PACKAGE' options, where PACKAGE
-is something like `gnu-as' or `x' (for the X Window System). The
-`README' should mention any `--enable-' and `--with-' options that the
-package recognizes.
-
- For packages that use the X Window System, `configure' can usually
-find the X include and library files automatically, but if it doesn't,
-you can use the `configure' options `--x-includes=DIR' and
-`--x-libraries=DIR' to specify their locations.
-
-Specifying the System Type
-==========================
-
-There may be some features `configure' cannot figure out automatically,
-but needs to determine by the type of machine the package will run on.
-Usually, assuming the package is built to be run on the _same_
-architectures, `configure' can figure that out, but if it prints a
-message saying it cannot guess the machine type, give it the
-`--build=TYPE' option. TYPE can either be a short name for the system
-type, such as `sun4', or a canonical name which has the form:
-
- CPU-COMPANY-SYSTEM
-
-where SYSTEM can have one of these forms:
-
- OS KERNEL-OS
-
- See the file `config.sub' for the possible values of each field. If
-`config.sub' isn't included in this package, then this package doesn't
-need to know the machine type.
-
- If you are _building_ compiler tools for cross-compiling, you should
-use the option `--target=TYPE' to select the type of system they will
-produce code for.
-
- If you want to _use_ a cross compiler, that generates code for a
-platform different from the build platform, you should specify the
-"host" platform (i.e., that on which the generated programs will
-eventually be run) with `--host=TYPE'.
-
-Sharing Defaults
-================
-
-If you want to set default values for `configure' scripts to share, you
-can create a site shell script called `config.site' that gives default
-values for variables like `CC', `cache_file', and `prefix'.
-`configure' looks for `PREFIX/share/config.site' if it exists, then
-`PREFIX/etc/config.site' if it exists. Or, you can set the
-`CONFIG_SITE' environment variable to the location of the site script.
-A warning: not all `configure' scripts look for a site script.
-
-Defining Variables
-==================
-
-Variables not defined in a site shell script can be set in the
-environment passed to `configure'. However, some packages may run
-configure again during the build, and the customized values of these
-variables may be lost. In order to avoid this problem, you should set
-them in the `configure' command line, using `VAR=value'. For example:
-
- ./configure CC=/usr/local2/bin/gcc
-
-causes the specified `gcc' to be used as the C compiler (unless it is
-overridden in the site shell script).
-
-Unfortunately, this technique does not work for `CONFIG_SHELL' due to
-an Autoconf bug. Until the bug is fixed you can use this workaround:
-
- CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
-
-`configure' Invocation
-======================
-
-`configure' recognizes the following options to control how it operates.
-
-`--help'
-`-h'
- Print a summary of the options to `configure', and exit.
-
-`--version'
-`-V'
- Print the version of Autoconf used to generate the `configure'
- script, and exit.
-
-`--cache-file=FILE'
- Enable the cache: use and save the results of the tests in FILE,
- traditionally `config.cache'. FILE defaults to `/dev/null' to
- disable caching.
-
-`--config-cache'
-`-C'
- Alias for `--cache-file=config.cache'.
-
-`--quiet'
-`--silent'
-`-q'
- Do not print messages saying which checks are being made. To
- suppress all normal output, redirect it to `/dev/null' (any error
- messages will still be shown).
-
-`--srcdir=DIR'
- Look for the package's source code in directory DIR. Usually
- `configure' can determine that directory automatically.
-
-`configure' also accepts some other, not widely useful, options. Run
-`configure --help' for more details.
-
+ source code directory by typing `ninja -C build clean`.
diff --git a/gfx/cairo/libpixman/README b/gfx/cairo/libpixman/README
index 961a8529bd..e0e7dcae1c 100644
--- a/gfx/cairo/libpixman/README
+++ b/gfx/cairo/libpixman/README
@@ -97,14 +97,8 @@ following guidelines:
You can run the test suite with
- make check
-
- if you built pixman with autotools or
-
meson test -C builddir
- if you built pixman with meson.
-
It will take around two minutes to run on a modern PC.
- Follow the coding style described in the CODING_STYLE file
diff --git a/gfx/cairo/libpixman/src/meson.build b/gfx/cairo/libpixman/src/meson.build
index 652cda3418..62ec66bec3 100644
--- a/gfx/cairo/libpixman/src/meson.build
+++ b/gfx/cairo/libpixman/src/meson.build
@@ -20,7 +20,7 @@
config_h = configure_file(
configuration : config,
- output : 'config.h'
+ output : 'pixman-config.h'
)
version_h = configure_file(
@@ -31,7 +31,8 @@ version_h = configure_file(
)
libpixman_extra_cargs = []
-if cc.has_function_attribute('dllexport')
+default_library = get_option('default_library')
+if default_library != 'static' and cc.has_function_attribute('dllexport')
libpixman_extra_cargs = ['-DPIXMAN_API=__declspec(dllexport)']
endif
diff --git a/gfx/cairo/libpixman/src/pixman-access.c b/gfx/cairo/libpixman/src/pixman-access.c
index 7c5ce783f9..7bd7a5a258 100644
--- a/gfx/cairo/libpixman/src/pixman-access.c
+++ b/gfx/cairo/libpixman/src/pixman-access.c
@@ -25,7 +25,7 @@
*/
#ifdef HAVE_CONFIG_H
-#include <config.h>
+#include <pixman-config.h>
#endif
#include <stdlib.h>
@@ -465,7 +465,7 @@ convert_and_store_pixel (bits_image_t * image,
image, bits, offset, PIXMAN_ ## format); \
} \
\
- static const void *const __dummy__ ## format
+ static const void *const __dummy__ ## format MAYBE_UNUSED
MAKE_ACCESSORS(a8r8g8b8);
MAKE_ACCESSORS(x8r8g8b8);
@@ -610,6 +610,32 @@ fetch_scanline_a8r8g8b8_sRGB_float (bits_image_t * image,
}
}
+static void
+fetch_scanline_r8g8b8_sRGB_float (bits_image_t * image,
+ int x,
+ int y,
+ int width,
+ uint32_t * b,
+ const uint32_t *mask)
+{
+ const uint8_t *bits = (uint8_t *)(image->bits + y * image->rowstride);
+ argb_t *buffer = (argb_t *)b;
+ int i;
+ for (i = x; i < width; ++i)
+ {
+ uint32_t p = FETCH_24 (image, bits, i);
+ argb_t *argb = buffer;
+
+ argb->a = 1.0f;
+
+ argb->r = to_linear[(p >> 16) & 0xff];
+ argb->g = to_linear[(p >> 8) & 0xff];
+ argb->b = to_linear[(p >> 0) & 0xff];
+
+ buffer++;
+ }
+}
+
/* Expects a float buffer */
static void
fetch_scanline_a2r10g10b10_float (bits_image_t * image,
@@ -981,6 +1007,24 @@ fetch_pixel_a8r8g8b8_sRGB_float (bits_image_t *image,
return argb;
}
+static argb_t
+fetch_pixel_r8g8b8_sRGB_float (bits_image_t *image,
+ int offset,
+ int line)
+{
+ uint8_t *bits = (uint8_t *)(image->bits + line * image->rowstride);
+ uint32_t p = FETCH_24 (image, bits, offset);
+ argb_t argb;
+
+ argb.a = 1.0f;
+
+ argb.r = to_linear[(p >> 16) & 0xff];
+ argb.g = to_linear[(p >> 8) & 0xff];
+ argb.b = to_linear[(p >> 0) & 0xff];
+
+ return argb;
+}
+
static uint32_t
fetch_pixel_yuy2 (bits_image_t *image,
int offset,
@@ -1205,6 +1249,31 @@ store_scanline_a8r8g8b8_sRGB_float (bits_image_t * image,
}
}
+static void
+store_scanline_r8g8b8_sRGB_float (bits_image_t * image,
+ int x,
+ int y,
+ int width,
+ const uint32_t *v)
+{
+ uint8_t *bits = (uint8_t *)(image->bits + image->rowstride * y) + 3 * x;
+ argb_t *values = (argb_t *)v;
+ int i;
+
+ for (i = 0; i < width; ++i)
+ {
+ uint32_t r, g, b, rgb;
+
+ r = to_srgb (values[i].r);
+ g = to_srgb (values[i].g);
+ b = to_srgb (values[i].b);
+
+ rgb = (r << 16) | (g << 8) | b;
+
+ STORE_24 (image, bits, i, rgb);
+ }
+}
+
/*
* Contracts a floating point image to 32bpp and then stores it using a
* regular 32-bit store proc. Despite the type, this function expects an
@@ -1283,6 +1352,37 @@ fetch_scanline_a8r8g8b8_32_sRGB (bits_image_t *image,
}
}
+static void
+fetch_scanline_r8g8b8_32_sRGB (bits_image_t *image,
+ int x,
+ int y,
+ int width,
+ uint32_t *buffer,
+ const uint32_t *mask)
+{
+ const uint8_t *bits = (uint8_t *)(image->bits + y * image->rowstride) + 3 * x;
+ uint32_t tmp;
+ int i;
+
+ for (i = 0; i < width; ++i)
+ {
+ uint32_t a, r, g, b;
+
+ tmp = FETCH_24 (image, bits, i);
+
+ a = 0xff;
+ r = (tmp >> 16) & 0xff;
+ g = (tmp >> 8) & 0xff;
+ b = (tmp >> 0) & 0xff;
+
+ r = to_linear[r] * 255.0f + 0.5f;
+ g = to_linear[g] * 255.0f + 0.5f;
+ b = to_linear[b] * 255.0f + 0.5f;
+
+ *buffer++ = (a << 24) | (r << 16) | (g << 8) | (b << 0);
+ }
+}
+
static uint32_t
fetch_pixel_a8r8g8b8_32_sRGB (bits_image_t *image,
int offset,
@@ -1304,6 +1404,27 @@ fetch_pixel_a8r8g8b8_32_sRGB (bits_image_t *image,
return (a << 24) | (r << 16) | (g << 8) | (b << 0);
}
+static uint32_t
+fetch_pixel_r8g8b8_32_sRGB (bits_image_t *image,
+ int offset,
+ int line)
+{
+ uint8_t *bits = (uint8_t *)(image->bits + line * image->rowstride);
+ uint32_t tmp = FETCH_24 (image, bits, offset);
+ uint32_t a, r, g, b;
+
+ a = 0xff;
+ r = (tmp >> 16) & 0xff;
+ g = (tmp >> 8) & 0xff;
+ b = (tmp >> 0) & 0xff;
+
+ r = to_linear[r] * 255.0f + 0.5f;
+ g = to_linear[g] * 255.0f + 0.5f;
+ b = to_linear[b] * 255.0f + 0.5f;
+
+ return (a << 24) | (r << 16) | (g << 8) | (b << 0);
+}
+
static void
store_scanline_a8r8g8b8_32_sRGB (bits_image_t *image,
int x,
@@ -1336,6 +1457,36 @@ store_scanline_a8r8g8b8_32_sRGB (bits_image_t *image,
}
}
+static void
+store_scanline_r8g8b8_32_sRGB (bits_image_t *image,
+ int x,
+ int y,
+ int width,
+ const uint32_t *v)
+{
+ uint8_t *bits = (uint8_t *)(image->bits + image->rowstride * y) + 3 * x;
+ uint64_t *values = (uint64_t *)v;
+ uint64_t tmp;
+ int i;
+
+ for (i = 0; i < width; ++i)
+ {
+ uint32_t r, g, b;
+
+ tmp = values[i];
+
+ r = (tmp >> 16) & 0xff;
+ g = (tmp >> 8) & 0xff;
+ b = (tmp >> 0) & 0xff;
+
+ r = to_srgb (r * (1/255.0f));
+ g = to_srgb (g * (1/255.0f));
+ b = to_srgb (b * (1/255.0f));
+
+ STORE_24 (image, bits, i, (r << 16) | (g << 8) | (b << 0));
+ }
+}
+
static argb_t
fetch_pixel_generic_float (bits_image_t *image,
int offset,
@@ -1409,6 +1560,11 @@ static const format_info_t accessors[] =
fetch_pixel_a8r8g8b8_32_sRGB, fetch_pixel_a8r8g8b8_sRGB_float,
store_scanline_a8r8g8b8_32_sRGB, store_scanline_a8r8g8b8_sRGB_float,
},
+ { PIXMAN_r8g8b8_sRGB,
+ fetch_scanline_r8g8b8_32_sRGB, fetch_scanline_r8g8b8_sRGB_float,
+ fetch_pixel_r8g8b8_32_sRGB, fetch_pixel_r8g8b8_sRGB_float,
+ store_scanline_r8g8b8_32_sRGB, store_scanline_r8g8b8_sRGB_float,
+ },
/* 24bpp formats */
FORMAT_INFO (r8g8b8),
diff --git a/gfx/cairo/libpixman/src/pixman-arm-asm.h b/gfx/cairo/libpixman/src/pixman-arm-asm.h
index e7093623e0..882789305b 100644
--- a/gfx/cairo/libpixman/src/pixman-arm-asm.h
+++ b/gfx/cairo/libpixman/src/pixman-arm-asm.h
@@ -25,6 +25,10 @@
*
*/
+#ifdef HAVE_CONFIG_H
+#include "pixman-config.h"
+#endif
+
/* Supplementary macro for setting function attributes */
.macro pixman_asm_function_impl fname
#ifdef ASM_HAVE_FUNC_DIRECTIVE
@@ -46,6 +50,12 @@
#endif
.endm
+.macro pixman_syntax_unified
+#ifdef ASM_HAVE_SYNTAX_UNIFIED
+ .syntax unified
+#endif
+.endm
+
.macro pixman_end_asm_function
#ifdef ASM_HAVE_FUNC_DIRECTIVE
.endfunc
diff --git a/gfx/cairo/libpixman/src/pixman-arm-neon-asm-bilinear.S b/gfx/cairo/libpixman/src/pixman-arm-neon-asm-bilinear.S
index ce4d5f84e3..6bd27360aa 100644
--- a/gfx/cairo/libpixman/src/pixman-arm-neon-asm-bilinear.S
+++ b/gfx/cairo/libpixman/src/pixman-arm-neon-asm-bilinear.S
@@ -68,6 +68,8 @@
#include "pixman-arm-asm.h"
#include "pixman-arm-neon-asm.h"
+pixman_syntax_unified
+
/*
* Bilinear macros from pixman-arm-neon-asm.S
*/
diff --git a/gfx/cairo/libpixman/src/pixman-arm-neon-asm.S b/gfx/cairo/libpixman/src/pixman-arm-neon-asm.S
index 35eca116d1..0e092577f1 100644
--- a/gfx/cairo/libpixman/src/pixman-arm-neon-asm.S
+++ b/gfx/cairo/libpixman/src/pixman-arm-neon-asm.S
@@ -34,12 +34,6 @@
* - pixman_composite_over_n_8_0565_asm_neon
*/
-#ifdef __clang__
-#define ldrgeb ldrbge
-#define subges subsge
-#define subpls subspl
-#endif
-
/* Prevent the stack from becoming executable for no reason... */
#if defined(__linux__) && defined(__ELF__)
.section .note.GNU-stack,"",%progbits
@@ -59,6 +53,8 @@
#include "pixman-arm-asm.h"
#include "pixman-arm-neon-asm.h"
+ pixman_syntax_unified
+
/* Global configuration options and preferences */
/*
@@ -287,12 +283,12 @@
PF subge, PF_X, PF_X, ORIG_W
vrshr.u16 q3, q11, #8
vrshr.u16 q15, q12, #8
- PF subges, PF_CTL, PF_CTL, #0x10
+ PF subsge, PF_CTL, PF_CTL, #0x10
vsri.u16 q14, q9, #11
- PF ldrgeb, DUMMY, [PF_SRC, SRC_STRIDE, lsl #src_bpp_shift]!
+ PF ldrbge, DUMMY, [PF_SRC, SRC_STRIDE, lsl #src_bpp_shift]!
vraddhn.u16 d20, q10, q13
vraddhn.u16 d23, q11, q3
- PF ldrgeb, DUMMY, [PF_DST, DST_STRIDE, lsl #dst_bpp_shift]!
+ PF ldrbge, DUMMY, [PF_DST, DST_STRIDE, lsl #dst_bpp_shift]!
vraddhn.u16 d22, q12, q15
vst1.16 {d28, d29}, [DST_W, :128]!
.endm
@@ -451,9 +447,9 @@ generate_composite_function \
vshll.u8 q8, d1, #8
vst1.16 {d28, d29}, [DST_W, :128]!
PF subge, PF_X, PF_X, ORIG_W
- PF subges, PF_CTL, PF_CTL, #0x10
+ PF subsge, PF_CTL, PF_CTL, #0x10
vshll.u8 q14, d2, #8
- PF ldrgeb, DUMMY, [PF_SRC, SRC_STRIDE, lsl #src_bpp_shift]!
+ PF ldrbge, DUMMY, [PF_SRC, SRC_STRIDE, lsl #src_bpp_shift]!
vshll.u8 q9, d0, #8
.endm
@@ -525,10 +521,10 @@ generate_composite_function \
PF pld, [PF_SRC, PF_X, lsl #src_bpp_shift]
PF pld, [PF_DST, PF_X, lsl #dst_bpp_shift]
PF subge, PF_X, PF_X, ORIG_W
- PF subges, PF_CTL, PF_CTL, #0x10
+ PF subsge, PF_CTL, PF_CTL, #0x10
vqadd.u8 q14, q0, q2
- PF ldrgeb, DUMMY, [PF_SRC, SRC_STRIDE, lsl #src_bpp_shift]!
- PF ldrgeb, DUMMY, [PF_DST, DST_STRIDE, lsl #dst_bpp_shift]!
+ PF ldrbge, DUMMY, [PF_SRC, SRC_STRIDE, lsl #src_bpp_shift]!
+ PF ldrbge, DUMMY, [PF_DST, DST_STRIDE, lsl #dst_bpp_shift]!
vqadd.u8 q15, q1, q3
.endm
@@ -557,10 +553,10 @@ generate_composite_function \
PF pld, [PF_SRC, PF_X, lsl #src_bpp_shift]
PF pld, [PF_DST, PF_X, lsl #dst_bpp_shift]
PF subge, PF_X, PF_X, ORIG_W
- PF subges, PF_CTL, PF_CTL, #0x10
+ PF subsge, PF_CTL, PF_CTL, #0x10
vqadd.u8 q14, q0, q2
- PF ldrgeb, DUMMY, [PF_SRC, SRC_STRIDE, lsl #src_bpp_shift]!
- PF ldrgeb, DUMMY, [PF_DST, DST_STRIDE, lsl #dst_bpp_shift]!
+ PF ldrbge, DUMMY, [PF_SRC, SRC_STRIDE, lsl #src_bpp_shift]!
+ PF ldrbge, DUMMY, [PF_DST, DST_STRIDE, lsl #dst_bpp_shift]!
vqadd.u8 q15, q1, q3
.endm
@@ -631,9 +627,9 @@ generate_composite_function_single_scanline \
vmull.u8 q8, d22, d4
PF subsge, PF_CTL, PF_CTL, #0x10
vmull.u8 q9, d22, d5
- PF ldrgeb, DUMMY, [PF_SRC, SRC_STRIDE, lsl #src_bpp_shift]!
+ PF ldrbge, DUMMY, [PF_SRC, SRC_STRIDE, lsl #src_bpp_shift]!
vmull.u8 q10, d22, d6
- PF ldrgeb, DUMMY, [PF_DST, DST_STRIDE, lsl #dst_bpp_shift]!
+ PF ldrbge, DUMMY, [PF_DST, DST_STRIDE, lsl #dst_bpp_shift]!
vmull.u8 q11, d22, d7
.endm
@@ -683,11 +679,11 @@ generate_composite_function_single_scanline \
vst4.8 {d28, d29, d30, d31}, [DST_W, :128]!
PF subge, PF_X, PF_X, ORIG_W
vmull.u8 q8, d22, d4
- PF subges, PF_CTL, PF_CTL, #0x10
+ PF subsge, PF_CTL, PF_CTL, #0x10
vmull.u8 q9, d22, d5
- PF ldrgeb, DUMMY, [PF_SRC, SRC_STRIDE, lsl #src_bpp_shift]!
+ PF ldrbge, DUMMY, [PF_SRC, SRC_STRIDE, lsl #src_bpp_shift]!
vmull.u8 q10, d22, d6
- PF ldrgeb, DUMMY, [PF_DST, DST_STRIDE, lsl #dst_bpp_shift]!
+ PF ldrbge, DUMMY, [PF_DST, DST_STRIDE, lsl #dst_bpp_shift]!
vmull.u8 q11, d22, d7
.endm
@@ -759,9 +755,9 @@ generate_composite_function_single_scanline \
vmull.u8 q9, d24, d5
PF subge, PF_X, PF_X, ORIG_W
vmull.u8 q10, d24, d6
- PF subges, PF_CTL, PF_CTL, #0x10
+ PF subsge, PF_CTL, PF_CTL, #0x10
vmull.u8 q11, d24, d7
- PF ldrgeb, DUMMY, [PF_DST, DST_STRIDE, lsl #dst_bpp_shift]!
+ PF ldrbge, DUMMY, [PF_DST, DST_STRIDE, lsl #dst_bpp_shift]!
vst4.8 {d28, d29, d30, d31}, [DST_W, :128]!
.endm
@@ -810,10 +806,10 @@ generate_composite_function \
vst4.8 {d28, d29, d30, d31}, [DST_W, :128]!
PF subge, PF_X, PF_X, ORIG_W
vmull.u8 q8, d22, d4
- PF subges, PF_CTL, PF_CTL, #0x10
+ PF subsge, PF_CTL, PF_CTL, #0x10
vmull.u8 q9, d22, d5
vmull.u8 q10, d22, d6
- PF ldrgeb, DUMMY, [PF_DST, DST_STRIDE, lsl #dst_bpp_shift]!
+ PF ldrbge, DUMMY, [PF_DST, DST_STRIDE, lsl #dst_bpp_shift]!
vmull.u8 q11, d22, d7
.endm
@@ -1265,9 +1261,9 @@ generate_composite_function \
vmull.u8 q9, d24, d1
PF subge, PF_X, PF_X, ORIG_W
vmull.u8 q10, d24, d2
- PF subges, PF_CTL, PF_CTL, #0x10
+ PF subsge, PF_CTL, PF_CTL, #0x10
vmull.u8 q11, d24, d3
- PF ldrgeb, DUMMY, [PF_MASK, MASK_STRIDE, lsl #mask_bpp_shift]!
+ PF ldrbge, DUMMY, [PF_MASK, MASK_STRIDE, lsl #mask_bpp_shift]!
vst4.8 {d28, d29, d30, d31}, [DST_W, :128]!
vrsra.u16 q8, q8, #8
vrsra.u16 q9, q9, #8
@@ -1334,9 +1330,9 @@ generate_composite_function \
vmull.u8 q1, d25, d16
PF subge, PF_X, PF_X, ORIG_W
vmull.u8 q2, d26, d16
- PF subges, PF_CTL, PF_CTL, #0x10
+ PF subsge, PF_CTL, PF_CTL, #0x10
vmull.u8 q3, d27, d16
- PF ldrgeb, DUMMY, [PF_MASK, MASK_STRIDE, lsl #mask_bpp_shift]!
+ PF ldrbge, DUMMY, [PF_MASK, MASK_STRIDE, lsl #mask_bpp_shift]!
vst1.8 {d28, d29, d30, d31}, [DST_W, :128]!
vrsra.u16 q0, q0, #8
vrsra.u16 q1, q1, #8
@@ -1430,11 +1426,11 @@ generate_composite_function \
vmull.u8 q7, d24, d9
PF subge, PF_X, PF_X, ORIG_W
vmull.u8 q8, d24, d10
- PF subges, PF_CTL, PF_CTL, #0x10
+ PF subsge, PF_CTL, PF_CTL, #0x10
vmull.u8 q9, d24, d11
- PF ldrgeb, DUMMY, [PF_DST, DST_STRIDE, lsl #dst_bpp_shift]!
+ PF ldrbge, DUMMY, [PF_DST, DST_STRIDE, lsl #dst_bpp_shift]!
vqadd.u8 q14, q0, q14
- PF ldrgeb, DUMMY, [PF_MASK, MASK_STRIDE, lsl #mask_bpp_shift]!
+ PF ldrbge, DUMMY, [PF_MASK, MASK_STRIDE, lsl #mask_bpp_shift]!
vqadd.u8 q15, q1, q15
vrshr.u16 q10, q6, #8
vrshr.u16 q11, q7, #8
@@ -2444,8 +2440,8 @@ generate_composite_function \
PF cmp, PF_X, ORIG_W
PF pld, [PF_SRC, PF_X, lsl #src_bpp_shift]
PF subge, PF_X, PF_X, ORIG_W
- PF subges, PF_CTL, PF_CTL, #0x10
- PF ldrgeb, DUMMY, [PF_SRC, SRC_STRIDE, lsl #src_bpp_shift]!
+ PF subsge, PF_CTL, PF_CTL, #0x10
+ PF ldrbge, DUMMY, [PF_SRC, SRC_STRIDE, lsl #src_bpp_shift]!
.endm
generate_composite_function \
@@ -2501,8 +2497,8 @@ generate_composite_function \
PF cmp, PF_X, ORIG_W
PF pld, [PF_SRC, PF_X, lsl #src_bpp_shift]
PF subge, PF_X, PF_X, ORIG_W
- PF subges, PF_CTL, PF_CTL, #0x10
- PF ldrgeb, DUMMY, [PF_SRC, SRC_STRIDE, lsl #src_bpp_shift]!
+ PF subsge, PF_CTL, PF_CTL, #0x10
+ PF ldrbge, DUMMY, [PF_SRC, SRC_STRIDE, lsl #src_bpp_shift]!
.endm
generate_composite_function \
@@ -3153,7 +3149,7 @@ pixman_asm_function \fname
/* ensure good destination alignment */
cmp WIDTH, #1
blt 0f
- tst OUT, #(1 << dst_bpp_shift)
+ tst OUT, #(1 << \dst_bpp_shift)
beq 0f
vshr.u16 q15, q12, #(16 - BILINEAR_INTERPOLATION_BITS)
vadd.u16 q12, q12, q13
@@ -3166,7 +3162,7 @@ pixman_asm_function \fname
cmp WIDTH, #2
blt 0f
- tst OUT, #(1 << (dst_bpp_shift + 1))
+ tst OUT, #(1 << (\dst_bpp_shift + 1))
beq 0f
bilinear_interpolate_two_pixels \src_fmt, \dst_fmt
sub WIDTH, WIDTH, #2
@@ -3175,7 +3171,7 @@ pixman_asm_function \fname
/*********** 8 pixels per iteration *****************/
cmp WIDTH, #4
blt 0f
- tst OUT, #(1 << (dst_bpp_shift + 2))
+ tst OUT, #(1 << (\dst_bpp_shift + 2))
beq 0f
bilinear_interpolate_four_pixels \src_fmt, \dst_fmt
sub WIDTH, WIDTH, #4
@@ -3242,7 +3238,7 @@ pixman_asm_function \fname
.unreq TMP3
.unreq TMP4
.unreq STRIDE
-pixman_end_asm_function
+ pixman_end_asm_function
.endm
diff --git a/gfx/cairo/libpixman/src/pixman-arm-neon-asm.h b/gfx/cairo/libpixman/src/pixman-arm-neon-asm.h
index 07a136234e..06318d9a93 100644
--- a/gfx/cairo/libpixman/src/pixman-arm-neon-asm.h
+++ b/gfx/cairo/libpixman/src/pixman-arm-neon-asm.h
@@ -213,24 +213,24 @@
.if \elem_size == 16
mov TMP1, VX, asr #16
adds VX, VX, UNIT_X
-5: subpls VX, VX, SRC_WIDTH_FIXED
+5: subspl VX, VX, SRC_WIDTH_FIXED
bpl 5b
add TMP1, \mem_operand, TMP1, asl #1
mov TMP2, VX, asr #16
adds VX, VX, UNIT_X
-5: subpls VX, VX, SRC_WIDTH_FIXED
+5: subspl VX, VX, SRC_WIDTH_FIXED
bpl 5b
add TMP2, \mem_operand, TMP2, asl #1
vld1.16 {d\()\reg1\()[0]}, [TMP1, :16]
mov TMP1, VX, asr #16
adds VX, VX, UNIT_X
-5: subpls VX, VX, SRC_WIDTH_FIXED
+5: subspl VX, VX, SRC_WIDTH_FIXED
bpl 5b
add TMP1, \mem_operand, TMP1, asl #1
vld1.16 {d\()\reg1\()[1]}, [TMP2, :16]
mov TMP2, VX, asr #16
adds VX, VX, UNIT_X
-5: subpls VX, VX, SRC_WIDTH_FIXED
+5: subspl VX, VX, SRC_WIDTH_FIXED
bpl 5b
add TMP2, \mem_operand, TMP2, asl #1
vld1.16 {d\()\reg1\()[2]}, [TMP1, :16]
@@ -238,12 +238,12 @@
.elseif \elem_size == 32
mov TMP1, VX, asr #16
adds VX, VX, UNIT_X
-5: subpls VX, VX, SRC_WIDTH_FIXED
+5: subspl VX, VX, SRC_WIDTH_FIXED
bpl 5b
add TMP1, \mem_operand, TMP1, asl #2
mov TMP2, VX, asr #16
adds VX, VX, UNIT_X
-5: subpls VX, VX, SRC_WIDTH_FIXED
+5: subspl VX, VX, SRC_WIDTH_FIXED
bpl 5b
add TMP2, \mem_operand, TMP2, asl #2
vld1.32 {d\()\reg1\()[0]}, [TMP1, :32]
@@ -281,14 +281,14 @@
.if \elem_size == 16
mov TMP1, VX, asr #16
adds VX, VX, UNIT_X
-5: subpls VX, VX, SRC_WIDTH_FIXED
+5: subspl VX, VX, SRC_WIDTH_FIXED
bpl 5b
add TMP1, \mem_operand, TMP1, asl #1
vld1.16 {d\()\reg1\()[\idx]}, [TMP1, :16]
.elseif \elem_size == 32
mov TMP1, VX, asr #16
adds VX, VX, UNIT_X
-5: subpls VX, VX, SRC_WIDTH_FIXED
+5: subspl VX, VX, SRC_WIDTH_FIXED
bpl 5b
add TMP1, \mem_operand, TMP1, asl #2
vld1.32 {d\()\reg1\()[\idx]}, [TMP1, :32]
@@ -420,15 +420,15 @@
PF pld, [PF_MASK, PF_X, lsl #mask_bpp_shift]
.endif
PF subge, PF_X, PF_X, ORIG_W
- PF subges, PF_CTL, PF_CTL, #0x10
+ PF subsge, PF_CTL, PF_CTL, #0x10
.if src_bpp_shift >= 0
- PF ldrgeb, DUMMY, [PF_SRC, SRC_STRIDE, lsl #src_bpp_shift]!
+ PF ldrbge, DUMMY, [PF_SRC, SRC_STRIDE, lsl #src_bpp_shift]!
.endif
.if dst_r_bpp != 0
- PF ldrgeb, DUMMY, [PF_DST, DST_STRIDE, lsl #dst_bpp_shift]!
+ PF ldrbge, DUMMY, [PF_DST, DST_STRIDE, lsl #dst_bpp_shift]!
.endif
.if mask_bpp_shift >= 0
- PF ldrgeb, DUMMY, [PF_MASK, MASK_STRIDE, lsl #mask_bpp_shift]!
+ PF ldrbge, DUMMY, [PF_MASK, MASK_STRIDE, lsl #mask_bpp_shift]!
.endif
.endif
.endm
@@ -465,9 +465,6 @@
beq 2f
.irp lowbit, 1, 2, 4, 8, 16
-#ifndef __clang__
-local skip1
-#endif
.if (dst_w_bpp <= (\lowbit * 8)) && ((\lowbit * 8) < (pixblock_size * dst_w_bpp))
.if \lowbit < 16 /* we don't need more than 16-byte alignment */
tst DST_R, #\lowbit
diff --git a/gfx/cairo/libpixman/src/pixman-arm-neon.c b/gfx/cairo/libpixman/src/pixman-arm-neon.c
index 62c944222d..103f1c2dbc 100644
--- a/gfx/cairo/libpixman/src/pixman-arm-neon.c
+++ b/gfx/cairo/libpixman/src/pixman-arm-neon.c
@@ -27,7 +27,7 @@
*/
#ifdef HAVE_CONFIG_H
-#include <config.h>
+#include <pixman-config.h>
#endif
#include <string.h>
diff --git a/gfx/cairo/libpixman/src/pixman-arm-simd-asm-scaled.S b/gfx/cairo/libpixman/src/pixman-arm-simd-asm-scaled.S
index a06b5964ef..cc62c812c2 100644
--- a/gfx/cairo/libpixman/src/pixman-arm-simd-asm-scaled.S
+++ b/gfx/cairo/libpixman/src/pixman-arm-simd-asm-scaled.S
@@ -25,10 +25,6 @@
*
*/
-#ifdef __clang__
-#define subpls subspl
-#endif
-
/* Prevent the stack from becoming executable */
#if defined(__linux__) && defined(__ELF__)
.section .note.GNU-stack,"",%progbits
@@ -43,6 +39,8 @@
#include "pixman-arm-asm.h"
+ pixman_syntax_unified
+
/*
* Note: This code is only using armv5te instructions (not even armv6),
* but is scheduled for ARM Cortex-A8 pipeline. So it might need to
@@ -89,21 +87,21 @@ pixman_asm_function \fname
and TMP2, VXMASK, VX, asr #(16 - \bpp_shift)
adds VX, VX, UNIT_X
str\()\t TMP1, [DST], #(1 << \bpp_shift)
-9: subpls VX, VX, SRC_WIDTH_FIXED
+9: subspl VX, VX, SRC_WIDTH_FIXED
bpl 9b
ldr\()\t TMP2, [SRC, TMP2]
and TMP1, VXMASK, VX, asr #(16 - \bpp_shift)
adds VX, VX, UNIT_X
str\()\t TMP2, [DST], #(1 << \bpp_shift)
-9: subpls VX, VX, SRC_WIDTH_FIXED
+9: subspl VX, VX, SRC_WIDTH_FIXED
bpl 9b
.endm
/* now do the scaling */
and TMP1, VXMASK, VX, asr #(16 - \bpp_shift)
adds VX, VX, UNIT_X
-9: subpls VX, VX, SRC_WIDTH_FIXED
+9: subspl VX, VX, SRC_WIDTH_FIXED
bpl 9b
subs W, W, #(8 + \prefetch_braking_distance)
blt 2f
@@ -112,7 +110,7 @@ pixman_asm_function \fname
mla PF_OFFS, UNIT_X, PF_OFFS, VX
1: /* main loop, process 8 pixels per iteration with prefetch */
pld [SRC, PF_OFFS, asr #(16 - \bpp_shift)]
- add PF_OFFS, UNIT_X, lsl #3
+ add PF_OFFS, PF_OFFS, UNIT_X, lsl #3
scale_2_pixels
scale_2_pixels
scale_2_pixels
@@ -133,13 +131,8 @@ pixman_asm_function \fname
scale_2_pixels
2:
tst W, #1
-#ifdef __clang__
ldr\()\t\()ne TMP1, [SRC, TMP1]
str\()\t\()ne TMP1, [DST]
-#else
- ldrne\()\t TMP1, [SRC, TMP1]
- strne\()\t TMP1, [DST]
-#endif
/* cleanup helper macro */
.purgem scale_2_pixels
.unreq DST
@@ -155,7 +148,7 @@ pixman_asm_function \fname
/* return */
pop {r4, r5, r6, r7, r8, r10}
bx lr
-pixman_end_asm_function
+ pixman_end_asm_function
.endm
generate_nearest_scanline_func \
diff --git a/gfx/cairo/libpixman/src/pixman-arm-simd-asm.S b/gfx/cairo/libpixman/src/pixman-arm-simd-asm.S
index 48032183a3..34d38f1f05 100644
--- a/gfx/cairo/libpixman/src/pixman-arm-simd-asm.S
+++ b/gfx/cairo/libpixman/src/pixman-arm-simd-asm.S
@@ -25,11 +25,6 @@
*
*/
-#ifdef __clang__
-#define adceqs adcseq
-#define ldmnedb ldmdbne
-#endif
-
/* Prevent the stack from becoming executable */
#if defined(__linux__) && defined(__ELF__)
.section .note.GNU-stack,"",%progbits
@@ -45,6 +40,8 @@
#include "pixman-arm-asm.h"
#include "pixman-arm-simd-asm.h"
+ pixman_syntax_unified
+
/* A head macro should do all processing which results in an output of up to
* 16 bytes, as far as the final load instruction. The corresponding tail macro
* should complete the processing of the up-to-16 bytes. The calling macro will
@@ -127,7 +124,7 @@ generate_composite_function \
.macro src_n_0565_init
ldrh SRC, [sp, #ARGS_STACK_OFFSET]
- orr SRC, SRC, lsl #16
+ orr SRC, SRC, SRC, lsl #16
mov STRIDE_S, SRC
mov MASK, SRC
mov STRIDE_M, SRC
@@ -135,8 +132,8 @@ generate_composite_function \
.macro src_n_8_init
ldrb SRC, [sp, #ARGS_STACK_OFFSET]
- orr SRC, SRC, lsl #8
- orr SRC, SRC, lsl #16
+ orr SRC, SRC, SRC, lsl #8
+ orr SRC, SRC, SRC, lsl #16
mov STRIDE_S, SRC
mov MASK, SRC
mov STRIDE_M, SRC
@@ -1025,7 +1022,7 @@ pixman_asm_function pixman_composite_over_n_8888_8888_ca_asm_armv6
cmp ip, #-1
beq pixman_composite_over_white_8888_8888_ca_asm_armv6
/* else drop through... */
- pixman_end_asm_function
+pixman_end_asm_function
generate_composite_function \
pixman_composite_over_n_8888_8888_ca_asm_armv6_helper, 0, 32, 32 \
FLAG_DST_READWRITE | FLAG_BRANCH_OVER | FLAG_PROCESS_CORRUPTS_PSR | FLAG_PROCESS_DOES_STORE | FLAG_SPILL_LINE_VARS | FLAG_PROCESS_CORRUPTS_SCRATCH | FLAG_PROCESS_CORRUPTS_WK0 \
@@ -1098,13 +1095,13 @@ generate_composite_function \
.elseif \numbytes == 8
teq ORIG_W, WK\()\reg1
teqeq ORIG_W, ORIG_W, asr #32 /* all 0 or all -1? */
- ldmnedb DST, {WK\()\reg1-WK\()\reg2}
+ ldmdbne DST, {WK\()\reg1-WK\()\reg2}
.else
teq ORIG_W, WK\()\reg1
teqeq ORIG_W, WK\()\reg2
teqeq ORIG_W, WK\()\reg3
teqeq ORIG_W, ORIG_W, asr #32 /* all 0 or all -1? */
- ldmnedb DST, {WK\()\reg1-WK\()\reg4}
+ ldmdbne DST, {WK\()\reg1-WK\()\reg4}
.endif
cmnne DST, #0 /* clear C if NE */
bcs 49f /* no writes to dest if source all -1 */
diff --git a/gfx/cairo/libpixman/src/pixman-arm-simd-asm.h b/gfx/cairo/libpixman/src/pixman-arm-simd-asm.h
index 3e78e8a468..5ec19e0034 100644
--- a/gfx/cairo/libpixman/src/pixman-arm-simd-asm.h
+++ b/gfx/cairo/libpixman/src/pixman-arm-simd-asm.h
@@ -119,37 +119,21 @@
\op\()r\()\cond WK\()\reg2, [\base], #4
\op\()r\()\cond WK\()\reg3, [\base], #4
.else
-#ifdef __clang__
\op\()mia\()\cond \base!, {WK\()\reg0,WK\()\reg1,WK\()\reg2,WK\()\reg3}
-#else
- \op\()m\()\cond\()ia \base!, {WK\()\reg0,WK\()\reg1,WK\()\reg2,WK\()\reg3}
-#endif
.endif
.elseif \numbytes == 8
.if \unaligned == 1
\op\()r\()\cond WK\()\reg0, [\base], #4
\op\()r\()\cond WK\()\reg1, [\base], #4
.else
-#ifdef __clang__
\op\()mia\()\cond \base!, {WK\()\reg0,WK\()\reg1}
-#else
- \op\()m\()\cond\()ia \base!, {WK\()\reg0,WK\()\reg1}
-#endif
.endif
.elseif \numbytes == 4
\op\()r\()\cond WK\()\reg0, [\base], #4
.elseif \numbytes == 2
-#ifdef __clang__
\op\()rh\()\cond WK\()\reg0, [\base], #2
-#else
- \op\()r\()\cond\()h WK\()\reg0, [\base], #2
-#endif
.elseif \numbytes == 1
-#ifdef __clang__
\op\()rb\()\cond WK\()\reg0, [\base], #1
-#else
- \op\()r\()\cond\()b WK\()\reg0, [\base], #1
-#endif
.else
.error "unsupported size: \numbytes"
.endif
@@ -157,31 +141,15 @@
.macro pixst_baseupdated cond, numbytes, reg0, reg1, reg2, reg3, base
.if \numbytes == 16
-#ifdef __clang__
stm\()\cond\()db \base, {WK\()\reg0,WK\()\reg1,WK\()\reg2,WK\()\reg3}
-#else
- stmdb\()\cond \base, {WK\()\reg0,WK\()\reg1,WK\()\reg2,WK\()\reg3}
-#endif
.elseif \numbytes == 8
-#ifdef __clang__
stmdb\()\cond \base, {WK\()\reg0,WK\()\reg1}
-#else
- stm\()\cond\()db \base, {WK\()\reg0,WK\()\reg1}
-#endif
.elseif \numbytes == 4
str\()\cond WK\()\reg0, [\base, #-4]
.elseif \numbytes == 2
-#ifdef __clang__
strh\()\cond WK\()\reg0, [\base, #-2]
-#else
- str\()\cond\()h WK\()\reg0, [\base, #-2]
-#endif
.elseif \numbytes == 1
-#ifdef __clang__
strb\()\cond WK\()\reg0, [\base, #-1]
-#else
- str\()\cond\()b WK\()\reg0, [\base, #-1]
-#endif
.else
.error "unsupported size: \numbytes"
.endif
@@ -291,7 +259,7 @@
/* If exactly one fetch per block, then we need either 0, 1 or 2 extra preloads */
PF mov, SCRATCH, \base, lsl #32-5
PF adds, SCRATCH, SCRATCH, X, lsl #32-5+\bpp_shift
- PF adceqs, SCRATCH, SCRATCH, #0
+ PF adcseq, SCRATCH, SCRATCH, #0
/* The instruction above has two effects: ensures Z is only
* set if C was clear (so Z indicates that both shifted quantities
* were 0), and clears C if Z was set (so C indicates that the sum
diff --git a/gfx/cairo/libpixman/src/pixman-arm-simd.c b/gfx/cairo/libpixman/src/pixman-arm-simd.c
index f0d14540bc..40f3a9759b 100644
--- a/gfx/cairo/libpixman/src/pixman-arm-simd.c
+++ b/gfx/cairo/libpixman/src/pixman-arm-simd.c
@@ -24,7 +24,7 @@
*
*/
#ifdef HAVE_CONFIG_H
-#include <config.h>
+#include <pixman-config.h>
#endif
#include "pixman-private.h"
diff --git a/gfx/cairo/libpixman/src/pixman-arm.c b/gfx/cairo/libpixman/src/pixman-arm.c
index a164b7f6ca..288172b62d 100644
--- a/gfx/cairo/libpixman/src/pixman-arm.c
+++ b/gfx/cairo/libpixman/src/pixman-arm.c
@@ -20,7 +20,7 @@
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifdef HAVE_CONFIG_H
-#include <config.h>
+#include <pixman-config.h>
#endif
#include "pixman-private.h"
diff --git a/gfx/cairo/libpixman/src/pixman-bits-image.c b/gfx/cairo/libpixman/src/pixman-bits-image.c
index f050f35316..20353cfd17 100644
--- a/gfx/cairo/libpixman/src/pixman-bits-image.c
+++ b/gfx/cairo/libpixman/src/pixman-bits-image.c
@@ -27,7 +27,7 @@
*/
#ifdef HAVE_CONFIG_H
-#include <config.h>
+#include <pixman-config.h>
#endif
#include <stdio.h>
#include <stdlib.h>
@@ -209,15 +209,15 @@ static force_inline void reduce_32(unsigned int satot, unsigned int srtot,
{
uint32_t *ret = p;
- satot = (satot + 0x8000) >> 16;
- srtot = (srtot + 0x8000) >> 16;
- sgtot = (sgtot + 0x8000) >> 16;
- sbtot = (sbtot + 0x8000) >> 16;
+ satot = (int32_t)(satot + 0x8000) / 65536;
+ srtot = (int32_t)(srtot + 0x8000) / 65536;
+ sgtot = (int32_t)(sgtot + 0x8000) / 65536;
+ sbtot = (int32_t)(sbtot + 0x8000) / 65536;
- satot = CLIP (satot, 0, 0xff);
- srtot = CLIP (srtot, 0, 0xff);
- sgtot = CLIP (sgtot, 0, 0xff);
- sbtot = CLIP (sbtot, 0, 0xff);
+ satot = CLIP ((int32_t)satot, 0, 0xff);
+ srtot = CLIP ((int32_t)srtot, 0, 0xff);
+ sgtot = CLIP ((int32_t)sgtot, 0, 0xff);
+ sbtot = CLIP ((int32_t)sbtot, 0, 0xff);
*ret = ((satot << 24) | (srtot << 16) | (sgtot << 8) | (sbtot));
}
@@ -240,10 +240,10 @@ static force_inline void reduce_float(unsigned int satot, unsigned int srtot,
{
argb_t *ret = p;
- ret->a = CLIP (satot / 65536.f, 0.f, 1.f);
- ret->r = CLIP (srtot / 65536.f, 0.f, 1.f);
- ret->g = CLIP (sgtot / 65536.f, 0.f, 1.f);
- ret->b = CLIP (sbtot / 65536.f, 0.f, 1.f);
+ ret->a = CLIP ((int32_t)satot / 65536.f, 0.f, 1.f);
+ ret->r = CLIP ((int32_t)srtot / 65536.f, 0.f, 1.f);
+ ret->g = CLIP ((int32_t)sgtot / 65536.f, 0.f, 1.f);
+ ret->b = CLIP ((int32_t)sbtot / 65536.f, 0.f, 1.f);
}
typedef void (* accumulate_pixel_t) (unsigned int *satot, unsigned int *srtot,
@@ -1270,7 +1270,7 @@ create_bits (pixman_format_code_t format,
*rowstride_bytes = stride;
if (clear)
- return calloc (buf_size, 1);
+ return calloc (1, buf_size);
else
return malloc (buf_size);
}
diff --git a/gfx/cairo/libpixman/src/pixman-combine-float.c b/gfx/cairo/libpixman/src/pixman-combine-float.c
index f5145bc9d7..27392d6089 100644
--- a/gfx/cairo/libpixman/src/pixman-combine-float.c
+++ b/gfx/cairo/libpixman/src/pixman-combine-float.c
@@ -26,7 +26,7 @@
*/
#ifdef HAVE_CONFIG_H
-#include <config.h>
+#include <pixman-config.h>
#endif
#include <math.h>
diff --git a/gfx/cairo/libpixman/src/pixman-combine32.c b/gfx/cairo/libpixman/src/pixman-combine32.c
index 4a89384d9c..de51f64e16 100644
--- a/gfx/cairo/libpixman/src/pixman-combine32.c
+++ b/gfx/cairo/libpixman/src/pixman-combine32.c
@@ -22,7 +22,7 @@
* SOFTWARE.
*/
#ifdef HAVE_CONFIG_H
-#include <config.h>
+#include <pixman-config.h>
#endif
#include <math.h>
diff --git a/gfx/cairo/libpixman/src/pixman-conical-gradient.c b/gfx/cairo/libpixman/src/pixman-conical-gradient.c
index a39e20c4eb..37dfffd733 100644
--- a/gfx/cairo/libpixman/src/pixman-conical-gradient.c
+++ b/gfx/cairo/libpixman/src/pixman-conical-gradient.c
@@ -25,7 +25,7 @@
*/
#ifdef HAVE_CONFIG_H
-#include <config.h>
+#include <pixman-config.h>
#endif
#include <stdlib.h>
diff --git a/gfx/cairo/libpixman/src/pixman-edge.c b/gfx/cairo/libpixman/src/pixman-edge.c
index ad6dfc4cfa..c324cd3d42 100644
--- a/gfx/cairo/libpixman/src/pixman-edge.c
+++ b/gfx/cairo/libpixman/src/pixman-edge.c
@@ -21,7 +21,7 @@
*/
#ifdef HAVE_CONFIG_H
-#include <config.h>
+#include <pixman-config.h>
#endif
#include <string.h>
diff --git a/gfx/cairo/libpixman/src/pixman-fast-path.c b/gfx/cairo/libpixman/src/pixman-fast-path.c
index fa5ea03e59..d510cacbf8 100644
--- a/gfx/cairo/libpixman/src/pixman-fast-path.c
+++ b/gfx/cairo/libpixman/src/pixman-fast-path.c
@@ -24,7 +24,7 @@
*/
#ifdef HAVE_CONFIG_H
-#include <config.h>
+#include <pixman-config.h>
#endif
#include <string.h>
#include <stdlib.h>
@@ -2836,11 +2836,7 @@ bits_image_fetch_separable_convolution_affine (pixman_image_t * image,
sgtot = CLIP (sgtot, 0, 0xff);
sbtot = CLIP (sbtot, 0, 0xff);
-#ifdef WORDS_BIGENDIAN
- buffer[k] = (satot << 0) | (srtot << 8) | (sgtot << 16) | (sbtot << 24);
-#else
buffer[k] = (satot << 24) | (srtot << 16) | (sgtot << 8) | (sbtot << 0);
-#endif
next:
vx += ux;
@@ -2848,7 +2844,7 @@ bits_image_fetch_separable_convolution_affine (pixman_image_t * image,
}
}
-static const uint8_t zero[8] = { 0, 0, 0, 0, 0, 0, 0, 0 };
+static const uint32_t zero[2] = { 0, 0 };
static force_inline void
bits_image_fetch_bilinear_affine (pixman_image_t * image,
@@ -2948,7 +2944,7 @@ bits_image_fetch_bilinear_affine (pixman_image_t * image,
if (y2 == 0)
{
- row1 = zero;
+ row1 = (const uint8_t *)zero;
mask1 = 0;
}
else
@@ -2961,7 +2957,7 @@ bits_image_fetch_bilinear_affine (pixman_image_t * image,
if (y1 == height - 1)
{
- row2 = zero;
+ row2 = (const uint8_t *)zero;
mask2 = 0;
}
else
diff --git a/gfx/cairo/libpixman/src/pixman-filter.c b/gfx/cairo/libpixman/src/pixman-filter.c
index 5f3b752f9b..33327df83a 100644
--- a/gfx/cairo/libpixman/src/pixman-filter.c
+++ b/gfx/cairo/libpixman/src/pixman-filter.c
@@ -29,7 +29,7 @@
#include <math.h>
#include <assert.h>
#ifdef HAVE_CONFIG_H
-#include <config.h>
+#include <pixman-config.h>
#endif
#include "pixman-private.h"
@@ -237,11 +237,14 @@ create_1d_filter (int width,
pixman_kernel_t sample,
double scale,
int n_phases,
- pixman_fixed_t *p)
+ pixman_fixed_t *pstart,
+ pixman_fixed_t *pend
+ )
{
+ pixman_fixed_t *p = pstart;
double step;
int i;
-
+ if(width <= 0) return;
step = 1.0 / n_phases;
for (i = 0; i < n_phases; ++i)
@@ -258,7 +261,7 @@ create_1d_filter (int width,
x1 = ceil (frac - width / 2.0 - 0.5);
x2 = x1 + width;
-
+ assert( p >= pstart && p + (x2 - x1) <= pend ); /* assert validity of the following loop */
total = 0;
for (x = x1; x < x2; ++x)
{
@@ -287,8 +290,10 @@ create_1d_filter (int width,
/* Normalize, with error diffusion */
p -= width;
- total = 65536.0 / total;
- new_total = 0;
+ assert(p >= pstart && p + (x2 - x1) <= pend); /* assert validity of the following loop */
+
+ total = 65536.0 / total;
+ new_total = 0;
e = 0.0;
for (x = x1; x < x2; ++x)
{
@@ -304,6 +309,8 @@ create_1d_filter (int width,
* at the first sample, since that is the only one that
* hasn't had any error diffused into it.
*/
+
+ assert(p - width >= pstart && p - width < pend); /* assert... */
*(p - width) += pixman_fixed_1 - new_total;
}
}
@@ -465,10 +472,16 @@ pixman_filter_create_separable_convolution (int *n_values,
params[2] = pixman_int_to_fixed (subsample_bits_x);
params[3] = pixman_int_to_fixed (subsample_bits_y);
- create_1d_filter (width, reconstruct_x, sample_x, sx, subsample_x,
- params + 4);
- create_1d_filter (height, reconstruct_y, sample_y, sy, subsample_y,
- params + 4 + width * subsample_x);
+ {
+ pixman_fixed_t
+ *xparams = params+4,
+ *yparams = xparams + width*subsample_x,
+ *endparams = params + *n_values;
+ create_1d_filter(width, reconstruct_x, sample_x, sx, subsample_x,
+ xparams, yparams);
+ create_1d_filter(height, reconstruct_y, sample_y, sy, subsample_y,
+ yparams, endparams);
+ }
#ifdef PIXMAN_GNUPLOT
gnuplot_filter(width, subsample_x, params + 4);
diff --git a/gfx/cairo/libpixman/src/pixman-general.c b/gfx/cairo/libpixman/src/pixman-general.c
index 7e5a0d09cc..b4450cbec9 100644
--- a/gfx/cairo/libpixman/src/pixman-general.c
+++ b/gfx/cairo/libpixman/src/pixman-general.c
@@ -26,7 +26,7 @@
* SOFTWARE.
*/
#ifdef HAVE_CONFIG_H
-#include <config.h>
+#include <pixman-config.h>
#endif
#include <stdlib.h>
#include <string.h>
diff --git a/gfx/cairo/libpixman/src/pixman-glyph.c b/gfx/cairo/libpixman/src/pixman-glyph.c
index 96a349ab47..dc9041180e 100644
--- a/gfx/cairo/libpixman/src/pixman-glyph.c
+++ b/gfx/cairo/libpixman/src/pixman-glyph.c
@@ -25,7 +25,7 @@
*/
#ifdef HAVE_CONFIG_H
-#include <config.h>
+#include <pixman-config.h>
#endif
#include "pixman-private.h"
diff --git a/gfx/cairo/libpixman/src/pixman-gradient-walker.c b/gfx/cairo/libpixman/src/pixman-gradient-walker.c
index fb7f401dac..b31d5ad7a9 100644
--- a/gfx/cairo/libpixman/src/pixman-gradient-walker.c
+++ b/gfx/cairo/libpixman/src/pixman-gradient-walker.c
@@ -24,7 +24,7 @@
*/
#ifdef HAVE_CONFIG_H
-#include <config.h>
+#include <pixman-config.h>
#endif
#include "pixman-private.h"
diff --git a/gfx/cairo/libpixman/src/pixman-image.c b/gfx/cairo/libpixman/src/pixman-image.c
index db29ff5b4f..72796fc9c9 100644
--- a/gfx/cairo/libpixman/src/pixman-image.c
+++ b/gfx/cairo/libpixman/src/pixman-image.c
@@ -21,7 +21,7 @@
*/
#ifdef HAVE_CONFIG_H
-#include <config.h>
+#include <pixman-config.h>
#endif
#include <stdlib.h>
@@ -567,7 +567,7 @@ _pixman_image_validate (pixman_image_t *image)
PIXMAN_EXPORT pixman_bool_t
pixman_image_set_clip_region32 (pixman_image_t * image,
- pixman_region32_t *region)
+ const pixman_region32_t *region)
{
image_common_t *common = (image_common_t *)image;
pixman_bool_t result;
@@ -591,7 +591,7 @@ pixman_image_set_clip_region32 (pixman_image_t * image,
PIXMAN_EXPORT pixman_bool_t
pixman_image_set_clip_region (pixman_image_t * image,
- pixman_region16_t *region)
+ const pixman_region16_t *region)
{
image_common_t *common = (image_common_t *)image;
pixman_bool_t result;
diff --git a/gfx/cairo/libpixman/src/pixman-implementation.c b/gfx/cairo/libpixman/src/pixman-implementation.c
index 5a2cbfead5..69fa70bc38 100644
--- a/gfx/cairo/libpixman/src/pixman-implementation.c
+++ b/gfx/cairo/libpixman/src/pixman-implementation.c
@@ -22,7 +22,7 @@
*/
#ifdef HAVE_CONFIG_H
-#include <config.h>
+#include <pixman-config.h>
#endif
#include <stdlib.h>
#include "pixman-private.h"
diff --git a/gfx/cairo/libpixman/src/pixman-linear-gradient.c b/gfx/cairo/libpixman/src/pixman-linear-gradient.c
index 3f528508a1..014b69ceb0 100644
--- a/gfx/cairo/libpixman/src/pixman-linear-gradient.c
+++ b/gfx/cairo/libpixman/src/pixman-linear-gradient.c
@@ -26,7 +26,7 @@
*/
#ifdef HAVE_CONFIG_H
-#include <config.h>
+#include <pixman-config.h>
#endif
#include <stdlib.h>
#include "pixman-private.h"
diff --git a/gfx/cairo/libpixman/src/pixman-matrix.c b/gfx/cairo/libpixman/src/pixman-matrix.c
index 81b6e613ed..da5209cbee 100644
--- a/gfx/cairo/libpixman/src/pixman-matrix.c
+++ b/gfx/cairo/libpixman/src/pixman-matrix.c
@@ -25,7 +25,7 @@
*/
#ifdef HAVE_CONFIG_H
-#include <config.h>
+#include <pixman-config.h>
#endif
#include <math.h>
diff --git a/gfx/cairo/libpixman/src/pixman-mips-dspr2.c b/gfx/cairo/libpixman/src/pixman-mips-dspr2.c
index 87969ae704..c43eb1e897 100644
--- a/gfx/cairo/libpixman/src/pixman-mips-dspr2.c
+++ b/gfx/cairo/libpixman/src/pixman-mips-dspr2.c
@@ -30,7 +30,7 @@
*/
#ifdef HAVE_CONFIG_H
-#include <config.h>
+#include <pixman-config.h>
#endif
#include "pixman-private.h"
diff --git a/gfx/cairo/libpixman/src/pixman-mips.c b/gfx/cairo/libpixman/src/pixman-mips.c
index 304881383b..7479a08848 100644
--- a/gfx/cairo/libpixman/src/pixman-mips.c
+++ b/gfx/cairo/libpixman/src/pixman-mips.c
@@ -20,7 +20,7 @@
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifdef HAVE_CONFIG_H
-#include <config.h>
+#include <pixman-config.h>
#endif
#include "pixman-private.h"
diff --git a/gfx/cairo/libpixman/src/pixman-mmx.c b/gfx/cairo/libpixman/src/pixman-mmx.c
index 80c3ad42a5..05d5f86bb5 100644
--- a/gfx/cairo/libpixman/src/pixman-mmx.c
+++ b/gfx/cairo/libpixman/src/pixman-mmx.c
@@ -30,7 +30,7 @@
*/
#ifdef HAVE_CONFIG_H
-#include <config.h>
+#include <pixman-config.h>
#endif
#if defined USE_X86_MMX || defined USE_ARM_IWMMXT || defined USE_LOONGSON_MMI
@@ -60,7 +60,7 @@ _mm_empty (void)
#endif
#ifdef USE_X86_MMX
-# if (defined(__SUNPRO_C) || defined(_MSC_VER) || defined(_WIN64)) || defined(__MINGW32__)
+# if (defined(__SSE2__) || defined(__SUNPRO_C) || defined(_MSC_VER) || defined(_WIN64))
# include <xmmintrin.h>
# else
/* We have to compile with -msse to use xmmintrin.h, but that causes SSE
@@ -103,7 +103,7 @@ _mm_mulhi_pu16 (__m64 __A, __m64 __B)
# endif
#endif
-#ifndef _MSC_VER
+#ifndef _MM_SHUFFLE
#define _MM_SHUFFLE(fp3,fp2,fp1,fp0) \
(((fp3) << 6) | ((fp2) << 4) | ((fp1) << 2) | (fp0))
#endif
diff --git a/gfx/cairo/libpixman/src/pixman-noop.c b/gfx/cairo/libpixman/src/pixman-noop.c
index e59890492f..e43199bc18 100644
--- a/gfx/cairo/libpixman/src/pixman-noop.c
+++ b/gfx/cairo/libpixman/src/pixman-noop.c
@@ -22,7 +22,7 @@
* DEALINGS IN THE SOFTWARE.
*/
#ifdef HAVE_CONFIG_H
-#include <config.h>
+#include <pixman-config.h>
#endif
#include <string.h>
#include <stdlib.h>
diff --git a/gfx/cairo/libpixman/src/pixman-ppc.c b/gfx/cairo/libpixman/src/pixman-ppc.c
index 4d5506d25d..926eb445fa 100644
--- a/gfx/cairo/libpixman/src/pixman-ppc.c
+++ b/gfx/cairo/libpixman/src/pixman-ppc.c
@@ -20,7 +20,7 @@
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifdef HAVE_CONFIG_H
-#include <config.h>
+#include <pixman-config.h>
#endif
#include "pixman-private.h"
diff --git a/gfx/cairo/libpixman/src/pixman-private.h b/gfx/cairo/libpixman/src/pixman-private.h
index 0adf9fa067..9db21f792d 100644
--- a/gfx/cairo/libpixman/src/pixman-private.h
+++ b/gfx/cairo/libpixman/src/pixman-private.h
@@ -865,11 +865,11 @@ pixman_contract_from_float (uint32_t *dst,
/* Region Helpers */
pixman_bool_t
pixman_region32_copy_from_region16 (pixman_region32_t *dst,
- pixman_region16_t *src);
+ const pixman_region16_t *src);
pixman_bool_t
pixman_region16_copy_from_region32 (pixman_region16_t *dst,
- pixman_region32_t *src);
+ const pixman_region32_t *src);
/* Doubly linked lists */
typedef struct pixman_link_t pixman_link_t;
@@ -1059,28 +1059,9 @@ float pixman_unorm_to_float (uint16_t u, int n_bits);
* Various debugging code
*/
-#undef DEBUG
-
#define COMPILE_TIME_ASSERT(x) \
do { typedef int compile_time_assertion [(x)?1:-1]; } while (0)
-/* Turn on debugging depending on what type of release this is
- */
-#if (((PIXMAN_VERSION_MICRO % 2) == 0) && ((PIXMAN_VERSION_MINOR % 2) == 1))
-
-/* Debugging gets turned on for development releases because these
- * are the things that end up in bleeding edge distributions such
- * as Rawhide etc.
- *
- * For performance reasons we don't turn it on for stable releases or
- * random git checkouts. (Random git checkouts are often used for
- * performance work).
- */
-
-# define DEBUG
-
-#endif
-
void
_pixman_log_error (const char *function, const char *message);
diff --git a/gfx/cairo/libpixman/src/pixman-radial-gradient.c b/gfx/cairo/libpixman/src/pixman-radial-gradient.c
index e8e99c98b9..38e1052f32 100644
--- a/gfx/cairo/libpixman/src/pixman-radial-gradient.c
+++ b/gfx/cairo/libpixman/src/pixman-radial-gradient.c
@@ -28,7 +28,7 @@
*/
#ifdef HAVE_CONFIG_H
-#include <config.h>
+#include <pixman-config.h>
#endif
#include <stdlib.h>
#include <math.h>
diff --git a/gfx/cairo/libpixman/src/pixman-region.c b/gfx/cairo/libpixman/src/pixman-region.c
index a2daa279fa..537d5fbe46 100644
--- a/gfx/cairo/libpixman/src/pixman-region.c
+++ b/gfx/cairo/libpixman/src/pixman-region.c
@@ -2387,6 +2387,14 @@ PREFIX (_contains_point) (const region_type_t * region,
}
PIXMAN_EXPORT int
+PREFIX (_empty) (const region_type_t * region)
+{
+ GOOD (region);
+
+ return(PIXREGION_NIL (region));
+}
+
+PIXMAN_EXPORT int
PREFIX (_not_empty) (const region_type_t * region)
{
GOOD (region);
diff --git a/gfx/cairo/libpixman/src/pixman-region16.c b/gfx/cairo/libpixman/src/pixman-region16.c
index d88d3380f8..da4719e7a8 100644
--- a/gfx/cairo/libpixman/src/pixman-region16.c
+++ b/gfx/cairo/libpixman/src/pixman-region16.c
@@ -23,7 +23,7 @@
* Author: Soren Sandmann <sandmann@redhat.com>
*/
#ifdef HAVE_CONFIG_H
-#include <config.h>
+#include <pixman-config.h>
#endif
#undef PIXMAN_DISABLE_DEPRECATED
diff --git a/gfx/cairo/libpixman/src/pixman-region32.c b/gfx/cairo/libpixman/src/pixman-region32.c
index abd6b1a937..68b456bf3c 100644
--- a/gfx/cairo/libpixman/src/pixman-region32.c
+++ b/gfx/cairo/libpixman/src/pixman-region32.c
@@ -23,7 +23,7 @@
* Author: Soren Sandmann <sandmann@redhat.com>
*/
#ifdef HAVE_CONFIG_H
-#include <config.h>
+#include <pixman-config.h>
#endif
#include "pixman-private.h"
diff --git a/gfx/cairo/libpixman/src/pixman-solid-fill.c b/gfx/cairo/libpixman/src/pixman-solid-fill.c
index 4694ebc700..44f4de07a8 100644
--- a/gfx/cairo/libpixman/src/pixman-solid-fill.c
+++ b/gfx/cairo/libpixman/src/pixman-solid-fill.c
@@ -22,7 +22,7 @@
*/
#ifdef HAVE_CONFIG_H
-#include <config.h>
+#include <pixman-config.h>
#endif
#include "pixman-private.h"
diff --git a/gfx/cairo/libpixman/src/pixman-sse2.c b/gfx/cairo/libpixman/src/pixman-sse2.c
index ce4e75f247..9c9cff2450 100644
--- a/gfx/cairo/libpixman/src/pixman-sse2.c
+++ b/gfx/cairo/libpixman/src/pixman-sse2.c
@@ -27,7 +27,7 @@
* Based on work by Owen Taylor and Søren Sandmann
*/
#ifdef HAVE_CONFIG_H
-#include <config.h>
+#include <pixman-config.h>
#endif
/* PSHUFD is slow on a lot of old processors, and new processors have SSSE3 */
@@ -373,16 +373,6 @@ load_128_unaligned (const __m128i* src)
return _mm_loadu_si128 (src);
}
-/* save 4 pixels using Write Combining memory on a 16-byte
- * boundary aligned address
- */
-static force_inline void
-save_128_write_combining (__m128i* dst,
- __m128i data)
-{
- _mm_stream_si128 (dst, data);
-}
-
/* save 4 pixels on a 16-byte boundary aligned address */
static force_inline void
save_128_aligned (__m128i* dst,
@@ -391,14 +381,6 @@ save_128_aligned (__m128i* dst,
_mm_store_si128 (dst, data);
}
-/* save 4 pixels on a unaligned address */
-static force_inline void
-save_128_unaligned (__m128i* dst,
- __m128i data)
-{
- _mm_storeu_si128 (dst, data);
-}
-
static force_inline __m128i
load_32_1x128 (uint32_t data)
{
diff --git a/gfx/cairo/libpixman/src/pixman-ssse3.c b/gfx/cairo/libpixman/src/pixman-ssse3.c
index 680d6b95a0..0359895af9 100644
--- a/gfx/cairo/libpixman/src/pixman-ssse3.c
+++ b/gfx/cairo/libpixman/src/pixman-ssse3.c
@@ -24,7 +24,7 @@
* Author: Soren Sandmann (soren.sandmann@gmail.com)
*/
#ifdef HAVE_CONFIG_H
-#include <config.h>
+#include <pixman-config.h>
#endif
#include <stdlib.h>
diff --git a/gfx/cairo/libpixman/src/pixman-timer.c b/gfx/cairo/libpixman/src/pixman-timer.c
index f5ae18e89f..656d900175 100644
--- a/gfx/cairo/libpixman/src/pixman-timer.c
+++ b/gfx/cairo/libpixman/src/pixman-timer.c
@@ -20,7 +20,7 @@
*/
#ifdef HAVE_CONFIG_H
-#include <config.h>
+#include <pixman-config.h>
#endif
#include <stdlib.h>
diff --git a/gfx/cairo/libpixman/src/pixman-trap.c b/gfx/cairo/libpixman/src/pixman-trap.c
index 7560405ee2..0ec73dc652 100644
--- a/gfx/cairo/libpixman/src/pixman-trap.c
+++ b/gfx/cairo/libpixman/src/pixman-trap.c
@@ -22,7 +22,7 @@
*/
#ifdef HAVE_CONFIG_H
-#include <config.h>
+#include <pixman-config.h>
#endif
#include <stdio.h>
diff --git a/gfx/cairo/libpixman/src/pixman-utils.c b/gfx/cairo/libpixman/src/pixman-utils.c
index 2c2dddd64c..302cd0c290 100644
--- a/gfx/cairo/libpixman/src/pixman-utils.c
+++ b/gfx/cairo/libpixman/src/pixman-utils.c
@@ -23,7 +23,7 @@
*/
#ifdef HAVE_CONFIG_H
-#include <config.h>
+#include <pixman-config.h>
#endif
#include <stdio.h>
#include <stdlib.h>
@@ -238,7 +238,7 @@ _pixman_iter_init_bits_stride (pixman_iter_t *iter, const pixman_iter_info_t *in
pixman_bool_t
pixman_region16_copy_from_region32 (pixman_region16_t *dst,
- pixman_region32_t *src)
+ const pixman_region32_t *src)
{
int n_boxes, i;
pixman_box32_t *boxes32;
@@ -268,7 +268,7 @@ pixman_region16_copy_from_region32 (pixman_region16_t *dst,
pixman_bool_t
pixman_region32_copy_from_region16 (pixman_region32_t *dst,
- pixman_region16_t *src)
+ const pixman_region16_t *src)
{
int n_boxes, i;
pixman_box16_t *boxes16;
diff --git a/gfx/cairo/libpixman/src/pixman-version.h b/gfx/cairo/libpixman/src/pixman-version.h
index 0f39bf3400..e523db9838 100644
--- a/gfx/cairo/libpixman/src/pixman-version.h
+++ b/gfx/cairo/libpixman/src/pixman-version.h
@@ -32,10 +32,10 @@
#endif
#define PIXMAN_VERSION_MAJOR 0
-#define PIXMAN_VERSION_MINOR 42
-#define PIXMAN_VERSION_MICRO 2
+#define PIXMAN_VERSION_MINOR 43
+#define PIXMAN_VERSION_MICRO 4
-#define PIXMAN_VERSION_STRING "0.42.2"
+#define PIXMAN_VERSION_STRING "0.43.4"
#define PIXMAN_VERSION_ENCODE(major, minor, micro) ( \
((major) * 10000) \
diff --git a/gfx/cairo/libpixman/src/pixman-vmx.c b/gfx/cairo/libpixman/src/pixman-vmx.c
index 52de37e69e..d4b5dc8e11 100644
--- a/gfx/cairo/libpixman/src/pixman-vmx.c
+++ b/gfx/cairo/libpixman/src/pixman-vmx.c
@@ -26,7 +26,7 @@
*/
#ifdef HAVE_CONFIG_H
-#include <config.h>
+#include <pixman-config.h>
#endif
#include "pixman-private.h"
#include "pixman-combine32.h"
@@ -279,20 +279,9 @@ save_128_aligned (uint32_t* data,
}
static force_inline vector unsigned int
-create_mask_1x32_128 (const uint32_t *src)
-{
- vector unsigned int vsrc;
- DECLARE_SRC_MASK_VAR;
-
- COMPUTE_SHIFT_MASK (src);
- LOAD_VECTOR (src);
- return vec_splat(vsrc, 0);
-}
-
-static force_inline vector unsigned int
create_mask_32_128 (uint32_t mask)
{
- return create_mask_1x32_128(&mask);
+ return (vector unsigned int) {mask, mask, mask, mask};
}
static force_inline vector unsigned int
@@ -2471,7 +2460,7 @@ vmx_fill (pixman_implementation_t *imp,
return FALSE;
}
- vfiller = create_mask_1x32_128(&filler);
+ vfiller = create_mask_32_128(filler);
while (height--)
{
@@ -2913,32 +2902,26 @@ scaled_nearest_scanline_vmx_8888_8888_OVER (uint32_t* pd,
while (w >= 4)
{
- vector unsigned int tmp;
- uint32_t tmp1, tmp2, tmp3, tmp4;
+ uint32_t tmp[4];
- tmp1 = *(ps + pixman_fixed_to_int (vx));
+ tmp[0] = *(ps + pixman_fixed_to_int (vx));
vx += unit_x;
while (vx >= 0)
vx -= src_width_fixed;
- tmp2 = *(ps + pixman_fixed_to_int (vx));
+ tmp[1] = *(ps + pixman_fixed_to_int (vx));
vx += unit_x;
while (vx >= 0)
vx -= src_width_fixed;
- tmp3 = *(ps + pixman_fixed_to_int (vx));
+ tmp[2] = *(ps + pixman_fixed_to_int (vx));
vx += unit_x;
while (vx >= 0)
vx -= src_width_fixed;
- tmp4 = *(ps + pixman_fixed_to_int (vx));
+ tmp[3] = *(ps + pixman_fixed_to_int (vx));
vx += unit_x;
while (vx >= 0)
vx -= src_width_fixed;
- tmp[0] = tmp1;
- tmp[1] = tmp2;
- tmp[2] = tmp3;
- tmp[3] = tmp4;
-
- vsrc = combine4 ((const uint32_t *) &tmp, pm);
+ vsrc = combine4 (tmp, pm);
if (is_opaque (vsrc))
{
diff --git a/gfx/cairo/libpixman/src/pixman-x86.c b/gfx/cairo/libpixman/src/pixman-x86.c
index 2c702e5c3b..d3c04385fc 100644
--- a/gfx/cairo/libpixman/src/pixman-x86.c
+++ b/gfx/cairo/libpixman/src/pixman-x86.c
@@ -20,7 +20,7 @@
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifdef HAVE_CONFIG_H
-#include <config.h>
+#include <pixman-config.h>
#endif
#include "pixman-private.h"
@@ -74,40 +74,9 @@ detect_cpu_features (void)
#else
-#define _PIXMAN_X86_64 \
- (defined(__amd64__) || defined(__x86_64__) || defined(_M_AMD64))
-
-static pixman_bool_t
-have_cpuid (void)
-{
-#if _PIXMAN_X86_64 || defined (_MSC_VER)
-
- return TRUE;
-
-#elif defined (__GNUC__)
- uint32_t result;
-
- __asm__ volatile (
- "pushf" "\n\t"
- "pop %%eax" "\n\t"
- "mov %%eax, %%ecx" "\n\t"
- "xor $0x00200000, %%eax" "\n\t"
- "push %%eax" "\n\t"
- "popf" "\n\t"
- "pushf" "\n\t"
- "pop %%eax" "\n\t"
- "xor %%ecx, %%eax" "\n\t"
- "mov %%eax, %0" "\n\t"
- : "=r" (result)
- :
- : "%eax", "%ecx");
-
- return !!result;
-
-#else
-#error "Unknown compiler"
+#if defined (__GNUC__)
+#include <cpuid.h>
#endif
-}
#ifdef _MSC_VER
#include <intrin.h> /* for __cpuid */
@@ -118,29 +87,8 @@ pixman_cpuid (uint32_t feature,
uint32_t *a, uint32_t *b, uint32_t *c, uint32_t *d)
{
#if defined (__GNUC__)
-
-#if _PIXMAN_X86_64
- __asm__ volatile (
- "cpuid" "\n\t"
- : "=a" (*a), "=b" (*b), "=c" (*c), "=d" (*d)
- : "a" (feature));
-#else
- /* On x86-32 we need to be careful about the handling of %ebx
- * and %esp. We can't declare either one as clobbered
- * since they are special registers (%ebx is the "PIC
- * register" holding an offset to global data, %esp the
- * stack pointer), so we need to make sure that %ebx is
- * preserved, and that %esp has its original value when
- * accessing the output operands.
- */
- __asm__ volatile (
- "xchg %%ebx, %1" "\n\t"
- "cpuid" "\n\t"
- "xchg %%ebx, %1" "\n\t"
- : "=a" (*a), "=r" (*b), "=c" (*c), "=d" (*d)
- : "a" (feature));
-#endif
-
+ *a = *b = *c = *d = 0;
+ __get_cpuid(feature, a, b, c, d);
#elif defined (_MSC_VER)
int info[4];
@@ -161,9 +109,6 @@ detect_cpu_features (void)
uint32_t a, b, c, d;
cpu_features_t features = 0;
- if (!have_cpuid())
- return features;
-
/* Get feature bits */
pixman_cpuid (0x01, &a, &b, &c, &d);
if (d & (1 << 15))
diff --git a/gfx/cairo/libpixman/src/pixman.c b/gfx/cairo/libpixman/src/pixman.c
index c09b528083..82ec236a6f 100644
--- a/gfx/cairo/libpixman/src/pixman.c
+++ b/gfx/cairo/libpixman/src/pixman.c
@@ -24,7 +24,7 @@
*/
#ifdef HAVE_CONFIG_H
-#include <config.h>
+#include <pixman-config.h>
#endif
#include "pixman-private.h"
@@ -182,7 +182,7 @@ clip_general_image (pixman_region32_t * region,
return FALSE;
}
}
- else if (!pixman_region32_not_empty (clip))
+ else if (pixman_region32_empty (clip))
{
return FALSE;
}
@@ -277,7 +277,7 @@ _pixman_compute_composite_region32 (pixman_region32_t * region,
{
return FALSE;
}
- if (!pixman_region32_not_empty (region))
+ if (pixman_region32_empty (region))
return FALSE;
if (dest_image->common.alpha_map->common.have_clip_region)
{
@@ -1020,6 +1020,7 @@ pixman_format_supported_source (pixman_format_code_t format)
case PIXMAN_x2r10g10b10:
case PIXMAN_a8r8g8b8:
case PIXMAN_a8r8g8b8_sRGB:
+ case PIXMAN_r8g8b8_sRGB:
case PIXMAN_x8r8g8b8:
case PIXMAN_a8b8g8r8:
case PIXMAN_x8b8g8r8:
diff --git a/gfx/cairo/libpixman/src/pixman.h b/gfx/cairo/libpixman/src/pixman.h
index 858955554a..a5c51934ca 100644
--- a/gfx/cairo/libpixman/src/pixman.h
+++ b/gfx/cairo/libpixman/src/pixman.h
@@ -586,6 +586,9 @@ pixman_region_overlap_t pixman_region_contains_rectangle (const pixman_region16_
const pixman_box16_t *prect);
PIXMAN_API
+pixman_bool_t pixman_region_empty (const pixman_region16_t *region);
+
+PIXMAN_API
pixman_bool_t pixman_region_not_empty (const pixman_region16_t *region);
PIXMAN_API
@@ -727,6 +730,9 @@ pixman_region_overlap_t pixman_region32_contains_rectangle (const pixman_region3
const pixman_box32_t *prect);
PIXMAN_API
+pixman_bool_t pixman_region32_empty (const pixman_region32_t *region);
+
+PIXMAN_API
pixman_bool_t pixman_region32_not_empty (const pixman_region32_t *region);
PIXMAN_API
@@ -895,6 +901,7 @@ typedef enum {
/* sRGB formats */
PIXMAN_a8r8g8b8_sRGB = PIXMAN_FORMAT(32,PIXMAN_TYPE_ARGB_SRGB,8,8,8,8),
+ PIXMAN_r8g8b8_sRGB = PIXMAN_FORMAT(24,PIXMAN_TYPE_ARGB_SRGB,0,8,8,8),
/* 24bpp formats */
PIXMAN_r8g8b8 = PIXMAN_FORMAT(24,PIXMAN_TYPE_ARGB,0,8,8,8),
@@ -1012,11 +1019,11 @@ void * pixman_image_get_destroy_data (pixman_image_t *image);
/* Set properties */
PIXMAN_API
pixman_bool_t pixman_image_set_clip_region (pixman_image_t *image,
- pixman_region16_t *region);
+ const pixman_region16_t *region);
PIXMAN_API
pixman_bool_t pixman_image_set_clip_region32 (pixman_image_t *image,
- pixman_region32_t *region);
+ const pixman_region32_t *region);
PIXMAN_API
void pixman_image_set_has_client_clip (pixman_image_t *image,