Commit Graph

2788 Commits

Author SHA1 Message Date
Timo Aaltonen
52a3693957 release to sid 2020-12-03 15:38:38 +02:00
Timo Aaltonen
16f9268369 symbols: Updated, bump shlibs 2020-12-03 15:25:18 +02:00
Timo Aaltonen
ad3904afb6 control, rules: Migrate to debhelper-compat, bump to 13. 2020-12-03 15:19:07 +02:00
Timo Aaltonen
8b58485eb3 bump the version 2020-12-03 15:15:54 +02:00
Timo Aaltonen
4772386a28 Merge branch 'upstream-unstable' into debian-unstable 2020-12-03 15:14:50 +02:00
Matt Turner
244383bf9f Pre-release version bump to 0.40.0
Signed-off-by: Matt Turner <mattst88@gmail.com>
2020-04-19 14:52:22 -07:00
Matt Turner
405f26068c Move from MD5/SHA1 to SHA256/SHA512 digests
Signed-off-by: Matt Turner <mattst88@gmail.com>
2020-04-19 14:52:22 -07:00
Matt Turner
88b167d18c Build xz tarballs instead of bzip2
Signed-off-by: Matt Turner <mattst88@gmail.com>
2020-04-19 14:49:46 -07:00
Matt Turner
54a13221ee Distribute the blue-noise files
Signed-off-by: Matt Turner <mattst88@gmail.com>
2020-04-19 14:46:56 -07:00
Ghabry
eb0c3d26ed Enabled armv6 SIMD for 3DS (devkitARM) and arm neon SIMD for PS Vita (vitasdk) and Switch (devkitA64) 2020-04-14 00:08:57 +00:00
Matt Turner
9976d2c099 loongson: Avoid C90 mixing-code-and-decls warning 2020-04-07 15:18:09 -07:00
Shiyou Yin
5330640025 configure.ac: use '-mloongson-mmi' for Loongson MMI
It's recommended to use '-mloongson-mmi' for MMI.

Reviewed-by: Matt Turner <mattst88@gmail.com>
2020-04-07 15:18:03 -07:00
Adam Jackson
348e99b52f fast-path: Fix some sketchy pointer arithmetic
We want a uint8_t * at the end of this math, because that's what the
function we're about to pass it to takes. But ->bits is a uint32_t, so
if we just do the math in units of that we can avoid the explicit factor
of four which would risk an integer overflow.

Fixes: pixman/pixman#14
2020-04-02 14:58:52 +00:00
Matt Turner
ba5d794515 lowlevel-blt-bench: Remove unused variable
Closes: https://gitlab.freedesktop.org/pixman/pixman/issues/7
2020-03-20 12:42:45 -07:00
Federico Mena Quintero
6fe0131394 Initialize temporary buffers in general_composite_rect()
Otherwise, Valgrind shows things like "conditional jump or move
depends on uninitialised values" errors much later in calling code.
For example, see https://gitlab.gnome.org/GNOME/librsvg/issues/572

Fixes https://gitlab.freedesktop.org/pixman/pixman/issues/9
2020-03-18 18:52:16 -06:00
Antonio Ospite
3344f507dd pixman-compiler.h: fix building tests with MinGW
MinGW supports __declspec(dllexport) but the current logic that sets
PIXMAN_EXPORT only uses it when building with MSVC, leaving some symbols
hidden when building with MinGW.

This results in an error when trying to link the tests:

-----------------------------------------------------------------------
FAILED: subprojects/pixman/test/combiner-test.exe
x86_64-w64-mingw32-gcc  -o subprojects/pixman/test/combiner-test.exe 'subprojects/pixman/test/f48fa9c@@combiner-test@exe/combiner-test.c.obj' -Wl,--allow-shlib-undefined -Wl,--start-group subprojects/pixman/test/libtestutils.a subprojects/pixman/pixman/libpixman-1.dll.a -pthread -fopenmp -fopenmp -lm -mconsole -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32 -Wl,--end-group
/usr/bin/x86_64-w64-mingw32-ld: subprojects/pixman/test/f48fa9c@@combiner-test@exe/combiner-test.c.obj: in function `main':
.../build/../subprojects/pixman/test/combiner-test.c:124: undefined reference to `_pixman_internal_only_get_implementation'
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
-----------------------------------------------------------------------

By using PIXMAN_API also when building with MinGW, the tests can link
successfully and the build succeed.

Tested with x86_64-w64-mingw32-gcc (GCC) 8.3-win32 20191201.
2020-03-15 00:19:56 +01:00
Yin Shiyou
127d9525d6 pixman-combine: Fix wrong value of RB_MASK_PLUS_ONE.
No functional change, as explained by Søren in
https://lists.freedesktop.org/archives/pixman/2020-February/004902.html
2020-02-20 09:55:17 -08:00
Mathieu Duponchelle
e8321503c6 meson: add missing function check (getisax)
.. and add gettimeofday to the list of funcs to check instead
of having a separate check for it.
2020-01-30 23:31:35 +01:00
Mathieu Duponchelle
8992d5b4fc meson: finish porting over mmx and ssse2 flags for sun and msvc
Those flags are set by the configure.ac script
2020-01-30 23:29:20 +01:00
Khem Raj
364760cd3d test/utils: Check for FE_INVALID definition before use
Some architectures e.g. nios2 do not support all exceptions.
2019-12-19 23:34:38 +00:00
Chun-wei Fan
7331d2b4e3 thread-test.c: Use Windows Threading API on Windows
...When we don't have a pthreads implementation available, which is
normally the case on Windows.  This attempts to make it easier for people
on Windows to verify whether their builds of Pixman (and Cairo component,
if applicable) are thread-safe.  Also, make the number of threads
a #define, so if we need to change it at some point, it's easier.

This re-enables the thread-test program on Windows in Meson builds.
2019-11-19 05:50:28 +08:00
Chun-wei Fan
1dd3bc0a35 demos: Define _USE_MATH_DEFINES on MSVC-style compilers
This is required for the use of M_PI.
2019-11-19 05:49:35 +08:00
Chun-wei Fan
3bceb3a9d3 test/solid-test.c: Include stdint.h
We need that to make sure we have UINT16_MAX.
2019-11-19 05:49:35 +08:00
Chun-wei Fan
c608e9663e pixman/meson.build: Define PIXMAN_API on MSVC-style compilers
This will make the public APIs exported from the DLL, so that we have an
import libary that we can use.
2019-11-19 05:49:35 +08:00
Chun-wei Fan
9d8dd17ada pixman-[compiler|private].h: Export symbols for tests
Define the existing PIXMAN_EXPORT to be PIXMAN_API, which can overriden
to be __declspec(dllexport) during the build of the pixman DLL on MSVC
builds, which will be in the next patch.

Also, export more private symbols as they are needed for the test
programs.
2019-11-19 05:49:35 +08:00
Chun-wei Fan
21d8ded566 pixman/pixman.h: Mark public APIs with PIXMAN_API
We can override PIXMAN_API with a CFLAG or config.h define to export
the symbols with compiler directives, if needed.
2019-11-19 05:49:35 +08:00
Chun-wei Fan
b7eea54028 pixman/pixman-version.h.in: Add a PIXMAN_API macro
This prepares to mark the public APIs that we have in pixman.h so that
we can use compiler directives such as __declspec(dllexport) to export
those symbols.
2019-11-19 05:49:35 +08:00
Chun-wei Fan
06a3f6e60b meson.build: Improve libpng search on MSVC
The build system for libpng for MSVC does not generate a pkg-config file
for us, and CMake support in Meson does not work very well.  So, look
for libpng manually on MSVC builds if depedency discovery did not work
out via pkg-config or the CMake config files.
2019-11-19 05:49:35 +08:00
Chun-wei Fan
7661b1fae9 build: Don't assume PThreads if threading support is found
Look also for pthread.h if threading support is found by Meson, as the
underlying threading support may not be PThreads, depending on platform.

For now, disable the thread-test test program if pthread.h and if
necessary, the PThreads library, cannot be found, as the current
implementation assumes the use of PThreads.

Also bump the required Meson version to 0.50.0 since we need it for
-cc.get_argument_syntax()
-For a later commit, the has_headers sub-method for cc.find_library()
2019-11-19 05:49:35 +08:00
Chun-wei Fan
e9db26898b meson.build: Disable OpenMP on MSVC builds
The implementation of OpenMP is not compliant for our uses, so disable
it for now by just not checking for it on MSVC builds, as we implicitly
add an /openmp switch to the build, which will cause linking the tests
programs to fail, as the OpenMP implementation is not enough.
2019-11-19 05:49:34 +08:00
Chun-wei Fan
f251c12f8a meson.build: Fix MMX, SSE2 and SSSE3 checks on MSVC
-For MSVC builds, do not use the GCC-specific CFlags when checking for
 these features.

-For the MMX check, assume that we have good enough MMX intrinsics and
 inline assembly support (on ix86), since MSVC provides sufficient
 support for those since before the times of MSVC 2008, and 2008 is the
 oldest version that we can support, as with the pre-C99 GTK+ stack.

Unfortunately due to x64 compiler issues, pre-Visual Studio 2010 will
crash when building SSSE3 code, so we do not enable building SSSE3 code
on pre-2010 Visual Studio.

Also, for all x64 Visual Studio builds, we do not enable USE_X86_MMX
as inline assembly is not allowed for x64 Visual Studio builds, and
instead use the compatibility instrinsics that we already have in the
code.
2019-11-18 16:19:36 +08:00
Adam Jackson
32a55aa8ac pixman-sse2: Fix undefined unaligned loads 2019-11-13 20:00:20 +00:00
Adam Jackson
47bec681d9 pixman-mmx: Fix undefined unaligned loads 2019-11-13 20:00:20 +00:00
Adam Jackson
baed75faa9 pixman-mmx: Fix undefined left-shifts 2019-11-13 20:00:20 +00:00
Adam Jackson
85acb0a933 test: Fix unrepresentable subtraction in stress-test
Does not make the test pass, but does fix this error:

../test/stress-test.c:538:25: runtime error: signed integer overflow: 2147483647 - -2 cannot be represented in type 'int'
2019-11-01 14:36:54 -04:00
Adam Jackson
1f5b20c4aa pixman-matrix: Fix left shift of a negative number
../pixman/pixman-matrix.c:276:35: runtime error: left shift of negative value -32768
2019-11-01 14:36:54 -04:00
Adam Jackson
bcfb3490db pixman-bits-image: Fix left shift of a negative number
../pixman/pixman-bits-image.c:678:33: runtime error: left shift of negative value -32768
2019-11-01 14:36:52 -04:00
Adam Jackson
fef82109eb pixman-bits-image: Fix various undefined left shifts
../pixman/pixman-bits-image.c:221:20: runtime error: left shift of 204 by 24 places cannot be represented in type 'int'
2019-10-15 16:35:25 -04:00
Adam Jackson
7d6b71b315 pixman-fast-path: Fix various undefined left shifts
../pixman/pixman-fast-path.c:3089:23: runtime error: left shift of 154 by 24 places cannot be represented in type 'int'
2019-10-15 16:34:56 -04:00
Adam Jackson
880f48b2b4 pixman-sse2: Fix an undefined left shift
../pixman/pixman-sse2.c:3346:14: runtime error: left shift of 41891 by 16 places cannot be represented in type 'int'
2019-10-15 16:33:46 -04:00
Adam Jackson
4897ad0a3f pixman-gradient-walker: Fix undefined left shift
../pixman/pixman-gradient-walker.c:216:35: runtime error: left shift of 163 by 24 places cannot be represented in type 'int'
2019-10-15 16:31:45 -04:00
Adam Jackson
7eb9c8c004 pixman-image: Fix undefined left shift
../pixman/pixman-image.c:963:46: runtime error: left shift of 255 by 24 places cannot be represented in type 'int'
2019-10-15 16:31:45 -04:00
Adam Jackson
81c87543d1 pixman-combine: Fix various undefined left shifts
../pixman/pixman-combine32.c:657:1: runtime error: left shift of 128 by 24 places cannot be represented in type 'int'
../pixman/pixman-combine32.c:694:1: runtime error: left shift of 232 by 24 places cannot be represented in type 'int'
../pixman/pixman-combine32.c:712:1: runtime error: left shift of 255 by 24 places cannot be represented in type 'int'
../pixman/pixman-combine32.c:786:1: runtime error: left shift of 255 by 24 places cannot be represented in type 'int'
../pixman/pixman-combine32.c:805:1: runtime error: left shift of 255 by 24 places cannot be represented in type 'int'
2019-10-15 16:31:45 -04:00
Adam Jackson
6d0a930b14 pixman-access: Fix various undefined left shifts
../pixman/pixman-access.c:389:2: runtime error: left shift of 1 by 31 places cannot be represented in type 'int'
../pixman/pixman-access.c:1101:2: runtime error: left shift of 2 by 30 places cannot be represented in type 'int'
../pixman/pixman-access.c:1152:2: runtime error: left shift of 2 by 30 places cannot be represented in type 'int'
2019-10-15 16:31:43 -04:00
Adam Jackson
a09bcc062f pixman: Fix undefined left shift in pixel_contract_from_float
../pixman/pixman-utils.c:216:14: runtime error: left shift of 255 by 24 places cannot be represented in type 'int'
2019-10-15 16:31:40 -04:00
Adam Jackson
f6040f56da test: Fix undefined left shift in pixel_checker_init
../test/utils.c:2070:57: runtime error: left shift of 255 by 24 places cannot be represented in type 'int'
2019-10-15 16:31:38 -04:00
Adam Jackson
52c27c82de test: Fix undefined left shift in affine-test
../test/affine-test.c:174:34: runtime error: left shift of 1 by 31 places cannot be represented in type 'int'
2019-10-15 16:31:33 -04:00
Jonathan Kew
d60b0af5e3 Avoid undefined behavior (left-shifting negative value) in pixman_int_to_fixed
Reported in https://bugzilla.mozilla.org/show_bug.cgi?id=1580352. Casting the argument to uint32_t should avoid invoking undefined behavior here. We'll still have *implementation-defined* behavior when casting the result back to pixman_fixed_t, but that's better than *undefined*.
2019-09-11 12:07:46 +00:00
Dylan Baker
afc6c935f1 meson: don't use link_with for library()
Meson doesn't do the expected thing when library() creates a static
library. Instead of combining the libraries together into a single
archive it effectively discards them, resulting in missing symbols.

To work around this we manually unpack the archives and shove the .o
files into the final library. This doesn't affect the shared library at
all, but makes the static library have the necessary symbols

Fixes #33
2019-09-09 16:06:18 -07:00
Jonathan Kew
c558647fdf Explicitly cast byte to uint32_t before left-shifting.
To avoid potential signed integer overflow (undefined behavior), as implicit integer promotion means the operand becomes a (signed) int.

(Issue originally reported at https://bugzilla.mozilla.org/show_bug.cgi?id=1577669)
2019-08-30 10:42:45 +00:00