Compare commits

...

278 Commits

Author SHA1 Message Date
Dylan Aïssi
b85678a8de debian/copyright: Convert to machine-readable format 2025-07-31 22:22:45 +02:00
Timo Aaltonen
7d26aad890 releasing package pixman version 0.44.0-3 2024-11-09 11:03:01 +02:00
Timo Aaltonen
07627e9f31 Replace timeout bump patch by using a multiplier option instead. Thanks, Aurelien Jarno! (Closes: #1086999) 2024-11-09 11:02:51 +02:00
Timo Aaltonen
dc43d37962 releasing package pixman version 0.44.0-2 2024-11-08 09:58:31 +02:00
Timo Aaltonen
c05da7d917 patches: Increase test timeout 120->240s. (Closes: #1086999) 2024-11-08 09:53:41 +02:00
Timo Aaltonen
e55fd151a2 releasing package pixman version 0.44.0-1 2024-11-07 16:48:34 +02:00
Timo Aaltonen
7d5149536f rules: Drop obsolete dbgsym-migration. 2024-11-07 15:54:27 +02:00
Timo Aaltonen
2ad078304f control: Migrate to pkgconf. 2024-11-07 15:53:40 +02:00
Timo Aaltonen
7cca9d2d9a symbols: Updated. 2024-11-07 15:45:25 +02:00
Timo Aaltonen
c8cb00a5ad control, rules: Build with meson. 2024-11-07 15:45:17 +02:00
Timo Aaltonen
b87363cd49 patches: Refresh patch. 2024-11-07 14:31:18 +02:00
Timo Aaltonen
2e58ff85bd version bump 2024-11-07 14:30:41 +02:00
Timo Aaltonen
31b00cc770 Merge branch 'upstream-unstable' into debian-unstable 2024-11-07 14:29:36 +02:00
Matt Turner
ae6646f159 Pre-release version bump to 0.44.0 2024-11-05 11:51:31 -05:00
Lance Arsenault
126d61e796 pixman: Add library destructor
Closes: https://gitlab.freedesktop.org/pixman/pixman/-/issues/111
2024-11-05 04:31:04 +00:00
f wasil
a987256be8 Fixed memory leak in tests 2024-11-05 03:39:54 +00:00
f wasil
0e424031bd RISC-V floating point operations 2024-10-30 03:39:37 +00:00
Changqing Li
643f098a39 pixman-combine-float.c: fix inlining failed error
Refer [1], always-inline is not suggested to be used if you have indirect
calls. so replace force_inline with inline to fix error like:
In function ‘combine_inner’,
    inlined from ‘combine_soft_light_ca_float’ at ../pixman/pixman-combine-float.c:655:511:
../pixman/pixman-combine-float.c:655:211: error: inlining failed in call to ‘always_inline’ ‘combine_soft_light_c’: function not considered for inlining

Test with gcc-9 and gcc-14, both works well

[1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115679

Signed-off-by: Changqing Li <changqing.li@windriver.com>
2024-10-30 01:34:41 +00:00
Marek Pikuła
90f9cf1726
ci: Disable coverage for arm-v5 and mipsel targets
Signed-off-by: Marek Pikuła <m.pikula@partner.samsung.com>
2024-10-21 16:49:50 +02:00
Marek Pikuła
bc2ec45d3b
ci: Add auto_cancel policy
Signed-off-by: Marek Pikuła <m.pikula@partner.samsung.com>
2024-10-21 16:49:41 +02:00
Marek Pikuła
de59d1a9fb
ci: Don't execute failing jobs
Signed-off-by: Marek Pikuła <m.pikula@partner.samsung.com>
2024-10-21 16:49:40 +02:00
Marek Pikuła
15336dc7cd
ci: Pin gcovr version to 7.x
Temporary version pin of gcovr due to errors in coverage report
generation when running with newly released version 8.x.

Signed-off-by: Marek Pikuła <m.pikula@partner.samsung.com>
2024-10-21 13:17:47 +02:00
Marek Pikuła
0476eda33a
ci: Remove MESON_TESTTHREADS workaround
https://github.com/mesonbuild/meson/pull/13604 got merged and released
with Meson 1.6.0, which we already use in the Docker images, so the
workaround can be dropped.

Signed-off-by: Marek Pikuła <m.pikula@partner.samsung.com>
2024-10-21 13:17:25 +02:00
Marek Pikuła
11e51bc72f
ci: Disable OpenMP for Win32 target
OpenMP introduces random stack overflow errors for 32-bit Windows
target.

Signed-off-by: Marek Pikuła <m.pikula@partner.samsung.com>
2024-10-14 16:12:44 +02:00
Marek Pikuła
277f485a9c
ci: Add missing ":failing" suffix for linux-ppc job
Signed-off-by: Marek Pikuła <m.pikula@partner.samsung.com>
2024-09-27 00:22:55 +02:00
Marek Pikuła
126b083142
ci: Add option to use different version of LLVM
Some targets require different version of LLVM, so now it's possible to
set it in the target's environment. Mind that the highest available
version depends on the base Debian image.

The change bumps LLVM version for all Linux targets:
- by default from 14 to 16,
- from 16 to 18 for riscv64 (based on Sid; for now, LLVM 19 doesn't have
  libomp packaged),
- mipsel stays at 14 as there seem to be some missing packages for
  higher versions.

Windows targets stay the same, as they use a different source of LLVM
(MinGW-compatible, which is currently version 18).

Signed-off-by: Marek Pikuła <m.pikula@partner.samsung.com>
2024-09-27 00:22:54 +02:00
Marek Pikuła
a3d297fa46
ci: riscv64: Verify if tests run on target without RVV
To ensure that the runtime discovery works correctly, and RVV code is
disabled for target without RVV extension.

Signed-off-by: Marek Pikuła <m.pikula@partner.samsung.com>
2024-09-26 23:33:52 +02:00
Marek Pikuła
9176847f1d
ci: riscv64: Don't force enable RVV globally
RVV compilation will be enabled for RVV implementation alone, similar to
other platforms. This prevents introducing autovectorized code in the
main library, thus making pixman compatible with RISC-V targets without
RVV.
2024-09-26 23:33:52 +02:00
Marek Pikuła
76b133f293
ci: Fix active target rule for Docker stage
If rule condition for selectively running Docker image builds was ill
formed. It resulted in build of all images even when not all targets
were selected with ACTIVE_TARGET_PATTERN variable.
2024-09-26 21:54:21 +02:00
Marek Pikuła
b7ac7cd122
ci: Fix Docker image source for MRs
If the MR doesn't modify the Docker context, the pipeline should use the
image from upstream.

Signed-off-by: Marek Pikuła <m.pikula@partner.samsung.com>
2024-09-25 20:20:08 +02:00
Marek Pikuła
ffa5645a2d
ci: Add support for Windows on ARM
It uses LLVM MinGW pre-built toolchain, and wine-arm64 base Docker image
from Linaro.

Signed-off-by: Marek Pikuła <m.pikula@partner.samsung.com>
2024-09-03 18:21:02 +02:00
Marek Pikuła
51dcfb8027
ci: Add support for LLVM for Windows targets
It uses LLVM MinGW project to get the precompiled LLVM toolchain for
cross-compilation.

Signed-off-by: Marek Pikuła <m.pikula@partner.samsung.com>
2024-09-03 18:21:01 +02:00
Marek Pikuła
c0ee08aab0
ci: Add LLVM support to the CI workflow
Add support for LLVM for all targets. Mind that in the current state,
some targets fail either build or test stage. For the time being, these
jobs are marked with `:failing` job name suffix.

Relevant issues:
- https://gitlab.freedesktop.org/pixman/pixman/-/issues/105
- https://gitlab.freedesktop.org/pixman/pixman/-/issues/106
- https://gitlab.freedesktop.org/pixman/pixman/-/issues/107
- https://gitlab.freedesktop.org/pixman/pixman/-/issues/108
- https://gitlab.freedesktop.org/pixman/pixman/-/issues/109
2024-09-03 18:21:00 +02:00
Marek Pikuła
44927bf1e1
ci: Unify build and test stage as job templates
This commit unifies codecov and pltcov build and test stages as single
parametrizable GitLab job templates. This cleans up the pipeline flow in
preparation for LLVM support in the pipeline.

Each target has now a Meson cross file, even when using a native
compiler, so that the job template can be better generalized. This also
allows to move architecture-specific build configuration to the cross
file instead of using the additional Meson flags in the job declaration.
2024-09-03 18:20:59 +02:00
Marek Pikuła
19b1a98e8d
ci: Unify Docker image as multi-stage build
This commit merges codecov and pltcov Dockerfiles into a single,
multi-stage Dockerfile. This results in more streamlined Docker image
builds with some common layers which can be reused by multiple images.

Also, by making a common Dockerfile, all common dependencies have the
same exact description, which decreases disparity between different
images for all the supported architectures. Mind that package version
disparity cannot be prevented 100%, as different base images may be used
for different architectures (e.g., Debian Sid for riscv64 instead of
Bookworm).

Signed-off-by: Marek Pikuła <m.pikula@partner.samsung.com>
2024-09-03 18:20:58 +02:00
Marek Pikuła
028213b588
ci: Unify target enable flag
It replaces CODE- and PLT- specific target enable variables. It is a
ground work for unification of codecov and pltcov flows.

Signed-off-by: Marek Pikuła <m.pikula@partner.samsung.com>
2024-09-03 18:20:57 +02:00
Marek Pikuła
05b5ecd934
ci: Use env files instead of awk script
It makes per-targe environment declaration more extensible, as it's
possible now to set custom env variables only for the selected target
for the entire pipeline workflow in a centralized way.

Signed-off-by: Marek Pikuła <m.pikula@partner.samsung.com>
2024-09-03 18:20:56 +02:00
Julia DeMille
726d77f6fe mmx: Fix compilation with clang-cl 2024-09-03 00:35:47 +00:00
Marek Pikuła
0cb4fbe324
ci: Fix Docker change detection
There was a missing wildcard for Docker directory
change detection, so basically this rule was not
checked correctly.

Signed-off-by: Marek Pikuła <m.pikula@partner.samsung.com>
2024-08-21 18:46:07 +02:00
Marek Pikuła
4047a553d9
ci: Add platform coverage targets
Platform coverage checks if the code builds and executes properly for
architectures that are not officially supported by Debian. They don't
contribute to general code coverage report but provide a valuable
insight if all supported platforms are working correctly.

Signed-off-by: Marek Pikuła <m.pikula@partner.samsung.com>
2024-08-20 18:05:44 +02:00
Marek Pikuła
cbf9d7e0d3
ci: Add architecture coverage Docker images
Add images providing an environment for architecture coverage tests.
There is a separate build for Linux and Windows, as the Windows image is
really large compared to Linux one. It decreases the execution time of
both targets, as the images needed to be pulled by runners are smaller.

Signed-off-by: Marek Pikuła <m.pikula@partner.samsung.com>
2024-08-16 20:15:30 +02:00
Marek Pikuła
c35e47bd88
ci: Increase granularity of Docker build selection
Now, it's possible to selectively disable Docker image builds. Before,
it was only possible to disable build/test jobs for a given
architecture.
2024-08-16 20:10:21 +02:00
Marek Pikuła
e7ef051a6d
ci: Build and test on the supported platforms
This commit introduces a build and test CI workflow, which tests the
correctness of execution for nearly all configurations supported by
pixman. The notable exception is ARM iWMMXt, which is omitted as it's
soon to be deprecated as mentioned in #98.

The build and test stage is separated, as a single build can be used to
test multiple configurations for a given platform (e.g., MMX, SSE2,
SSSE3 for x86).

Execution is performed using multi-arch Docker images built in the
`docker` stage. The important thing to note is that the runner needs to
have a relatively recent version of Docker and QEMU, and needs to have
the qemu-user-static+binfmt execution enabled.

Once all tests are complete, coverage reports are merged together in the
`summary` stage. Then the result can be used in a GitLab-native coverage
report summary.

Signed-off-by: Marek Pikuła <m.pikula@partner.samsung.com>
2024-08-16 20:04:49 +02:00
Marek Pikuła
2d35a8769c
mips: Add option to force MIPS CPU feature discovery
Used to force feature discovery in CI where /proc/cpuinfo is unreliable.
It can happen, e.g., if executed in qemu-user-static mode.

For such a build, MIPS-specific features need to be manually disabled by
using `PIXMAN_DISABLE` env variable.

Signed-off-by: Marek Pikuła <m.pikula@partner.samsung.com>
2024-08-16 20:03:29 +02:00
Marek Pikuła
15af6fd0bc
mips: Widen CPU family check for DSPr2
DSPr2 can be available for targets other than mips32. Some distros
(e.g., Debian) don't support mips32 but still support mipsel. Extending
the check enables use of such images for testing.

Signed-off-by: Marek Pikuła <m.pikula@partner.samsung.com>
2024-08-16 20:03:28 +02:00
Marek Pikuła
a7263190c2
ci: Add multiarch Docker image build
The image is used in CI pipeline to build and test on different
architectures.

This commit introduces more extensible GitLab CI scheme borrowed from
qemu project.

Signed-off-by: Marek Pikuła <m.pikula@partner.samsung.com>
2024-08-16 20:03:19 +02:00
Marek Pikuła
b753a6f49b
mips: Fix a typo in mips_dspr2_flags
Signed-off-by: Marek Pikuła <m.pikula@partner.samsung.com>
2024-08-14 14:13:07 +02:00
Even Rouault
6410ec79bd pixman-combine-float.c: fix typo in MAKE_NON_SEPARABLE_PDF_COMBINERS()
There's a copy&paste typo updating sc.g twice when there's a mask
2024-08-14 02:48:25 +00:00
Marco Trevisan
5b8e928139 pixman-region: Make translate a no-op when using 0 offsets
This avoids callers to have to optimize this codepath, in case this scenario happens.
And definitely it may happen when the function is not explicitly called.
2024-08-14 02:41:08 +00:00
Matt Turner
2e29b7c43d iwmmxt: Drop support
In all likelyhood unused for at least many years, and possibly ever.

Support is deprecated and will be removed in gcc-15. See deprecation
notice in https://gcc.gnu.org/gcc-13/changes.html

Closes: https://gitlab.freedesktop.org/pixman/pixman/-/issues/98
2024-08-13 13:51:36 -04:00
Peter Hutterer
e5f8efc4c7 ci: add workflow rules to allow for MR pipelines
See
https://gitlab.freedesktop.org/freedesktop/freedesktop/-/wikis/GitLab-CI#for-project-developers
2024-08-07 09:59:34 +10:00
Bill Roberts
7ed0f8d04d
aarch64: support PAC and BTI
Enable Pointer Authentication Codes (PAC) and Branch Target
Identification (BTI) support for ARM 64 targets.

PAC works by signing the LR with either an A key or B key and verifying
the return address. There are quite a few instructions capable of doing
this, however, the Linux ARM ABI is to use hint compatible instructions
that can be safely NOP'd on older hardware and can be assembled and
linked with older binutils. This limits the instruction set to paciasp,
pacibsp, autiasp and autibsp. Instructions prefixed with pac are for
signing and instructions prefixed with aut are for signing. Both
instructions are then followed with an a or b to indicate which signing
key they are using. The keys can be controlled using
-mbranch-protection=pac-ret for the A key and
-mbranch-protection=pac-ret+b-key for the B key.

BTI works by marking all call and jump positions with bti c and bti
j instructions. If execution control transfers to an instruction other
than a BTI instruction, the execution is killed via SIGILL. Note that
to remove one instruction, the aforementioned pac instructions will
also work as a BTI landing pad for bti c usages.

For BTI to work, all object files linked for a unit of execution,
whether an executable or a library must have the GNU Notes section of
the ELF file marked to indicate BTI support. This is so loader/linkers
can apply the proper permission bits (PROT_BRI) on the memory region.

PAC can also be annotated in the GNU ELF notes section, but it's not
required for enablement, as interleaved PAC and non-pac code works as
expected since it's the callee that performs all the checking. The
linker follows the same rules as BTI for discarding the PAC flag from
the GNU Notes section.

Testing was done under the following CFLAGS and CXXFLAGS for all
combinations:
1. -mbranch-protection=none
2. -mbranch-protection=standard
3. -mbranch-protection=pac-ret
4. -mbranch-protection=pac-ret+b-key
5. -mbranch-protection=bti

Signed-off-by: Bill Roberts <bill.roberts@arm.com>
2024-07-22 16:57:13 -05:00
Bill Roberts
3a32506877
arm: add include guards on header
Prevent double inclusion of header file.

Signed-off-by: Bill Roberts <bill.roberts@arm.com>
2024-07-22 16:57:13 -05:00
Mike Hommey
865e6ce00b pixman: Adjust arm assembly for binutils change
A change in the latest version of binutils broke building pixman for arm.

The binutils change:
https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=226749d5a6ff0d5c607d6428d6c81e1e7e7a994b

Closes: https://gitlab.freedesktop.org/pixman/pixman/-/issues/96
2024-07-12 15:55:33 -04:00
Matt Turner
b252d40714 Post-release version bump to 0.43.5 2024-02-29 11:19:46 -05:00
Matt Turner
54cad71674 Pre-release version bump to 0.43.4 2024-02-29 11:13:20 -05:00
Matt Turner
add7c8db45 pixman-arm: Use unified syntax
Allows us to use the same assembly without a bunch of #ifdef __clang__.
2024-02-29 10:47:07 -05:00
Makoto Kato
63ae6af9a6 pixman-arm: Fix build on clang/arm32
Closes: https://gitlab.freedesktop.org/pixman/pixman/-/issues/74
2024-02-29 10:47:00 -05:00
Matt Turner
033716e99a Revert "Allow to build pixman on clang/arm32"
This reverts merge request !78
2024-02-29 15:41:37 +00:00
Heiko Lewin
74130e84c5 Allow to build pixman on clang/arm32 2024-02-29 14:46:55 +00:00
Matt Turner
63332b4e72 pixman-x86: Move #include "cpuid.h" inside conditionals
Closes: https://gitlab.freedesktop.org/pixman/pixman/-/issues/93
Closes: https://gitlab.freedesktop.org/pixman/pixman/-/issues/94
2024-02-25 17:28:14 -05:00
Matt Turner
8c6d59a9f8 pixman-x86: Use cpuid.h header 2024-02-24 12:36:53 -05:00
Gayathri Berli
ac485a9b66 Revert the changes to fix the problem in big-endian architectures
This reverts commit b4a105d772.

There is an endianness issue in pixman-fast-path.c. In the function
bits_image_fetch_separable_convolution_affine we have this code:

#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

This will write out the pixels as BGRA on big endian systems but
obviously that's wrong. Pixel order should be ARGB on big endian systems
so we don't need any #ifdef for big endian here at all. Instead, the
code should be the same on little and big endian, i.e. it should be just
this line instead of the 5 lines above:

	buffer[k] = (satot << 24) | (srtot << 16) | (sgtot << 8) | (sbtot << 0);

Changing the code like this fixes the wrong colors that I get with
pixman on my PowerPC/s390x system.

Here is what cairo.h has to say (which is rooted in pixman):

 * @CAIRO_FORMAT_ARGB32: each pixel is a 32-bit quantity, with
 *   alpha in the upper 8 bits, then red, then green, then blue.
 *   The 32-bit quantities are stored native-endian. Pre-multiplied
 *   alpha is used. (That is, 50% transparent red is 0x80800000,
 *   not 0x80ff0000.) (Since 1.0)

Closes: https://gitlab.freedesktop.org/pixman/pixman/-/issues/78
Signed-off-by: Gayathri Berli <gayathri.berli@ibm.com>
2024-02-24 12:28:30 -05:00
Simon Ser
fdd7161097 Post-release version bump to 0.43.3 2024-01-28 13:32:42 +01:00
Simon Ser
91b8526c1e Pre-release version bump to 0.43.2 2024-01-28 13:26:31 +01:00
Simon Ser
e8bb34e302 Drop contrib/ci.sh
This is unused and outdated (Autotools is no longer supported).

Signed-off-by: Simon Ser <contact@emersion.fr>
2024-01-28 12:23:29 +00:00
Simon Ser
43773c69db Drop ChangeLog
This file is empty and unused.

Signed-off-by: Simon Ser <contact@emersion.fr>
2024-01-28 12:22:00 +00:00
Simon Ser
8c39ce2437 Drop automatic DEBUG define
We don't use the historical odd stable release numbering scheme
anymore.

Developers can still enable this debugging code via CFLAGS=-DDEBUG.

Signed-off-by: Simon Ser <contact@emersion.fr>
Closes: https://gitlab.freedesktop.org/pixman/pixman/-/issues/87
2024-01-27 13:15:28 +01:00
Simon Ser
8e4be8c2db Post-release version bump to 0.43.1
Signed-off-by: Simon Ser <contact@emersion.fr>
2024-01-04 11:48:38 +01:00
Simon Ser
6c2e4a0dd9 Pre-release version bump to 0.43.0
Signed-off-by: Simon Ser <contact@emersion.fr>
2024-01-04 11:01:05 +01:00
Matt Turner
396e1a76ed test: Use fabsl on float128 2024-01-03 21:40:12 -05:00
Matt Turner
7e76c96281 pixman-access: Mark __dummy__ variables with MAYBE_UNUSED 2024-01-03 21:24:46 -05:00
Matt Turner
af101d3c21 pixman-mmx: Don't redefine _MM_SHUFFLE 2024-01-03 21:24:46 -05:00
Matt Turner
20cc4ee0e9 pixman-sse2: Remove unused functions 2024-01-03 21:24:46 -05:00
Simon Ser
7883ab8d63 ci: upgrade to Fedora 39
Fedora 28 is super old.

Signed-off-by: Simon Ser <contact@emersion.fr>
2023-12-15 13:21:09 +01:00
Pavel Labath
86f9162332 Fix alignment problem in pixman-fast-path.c
The variable is accessed through uint32_t pointer, so it needs to be
aligned to avoid undefined behavior (crashes on architectures which
require aligned accesses).

Closes: https://gitlab.freedesktop.org/pixman/pixman/-/issues/84
2023-12-15 13:10:52 +01:00
Benjamin Gilbert
b4b789df5b meson: avoid linking with -pthread if we don't have pthreads
Meson always returns -pthread in dependency('threads') on non-MSVC
compilers.  Fix a link error when building on MinGW without winpthreads.
2023-11-08 18:43:10 +00:00
Sam James
08115a4217
pixman-bits-image: fix -Walloc-size
GCC 14 introduces a new -Walloc-size included in -Wextra which gives (when forced
to be an error):
```
../pixman/pixman-bits-image.c: In function ‘create_bits’:
../pixman/pixman-bits-image.c:1273:16: error: allocation of insufficient size ‘1’ for type ‘uint32_t’ {aka ‘unsigned int’} with size ‘4’ [-Werror=alloc-size]
 1273 |         return calloc (buf_size, 1);
      |                ^~~~~~~~~~~~~~~~~~~~
```

The calloc prototype is:
```
void *calloc(size_t nmemb, size_t size);
```

So, just swap the number of members and size arguments to match the prototype, as
we're initialising 1 element of size `buf_size`. GCC then sees we're not
doing anything wrong.

Signed-off-by: Sam James <sam@gentoo.org>
2023-11-07 22:31:05 +00:00
Havard Eidnes
47a1c3d330 vmx: Reimplement create_mask_32_128 and use it in vmx_fill
Based on suggestion from @siamashka.

This lets the compiler pick the vector instruction to use which is
usually the best idea.

Use create_mask_32_128() instead of create_mask_1x32_128() in
vmx_fill(), avoiding loading memory beyond the filler argument on the
stack.

Remove the now-unused create_mask_1x32_128(). This gets rid of some
(correct) warnings from the compiler about indexing beyond the variable
in question.
2023-08-30 12:14:40 -04:00
Havard Eidnes
634b8196d2 vmx: Simplify scaled_nearest_scanline_vmx_8888_8888_OVER
Since combine4() does not take vector variables as arguments, there's no
need to use a vector variable and casts back and forth to normal scalars
for the arguments.
2023-08-30 12:14:26 -04:00
Matt Turner
753f5e095e meson: Fix syntax 2023-08-30 11:58:04 -04:00
Simon Ser
7aeeb501ad Fix const warnings in pixman_image_set_clip_region()
Fixes the following warnings:

    pixman-image.c: In function 'pixman_image_set_clip_region':
    pixman-image.c:601:81: warning: passing argument 2 of 'pixman_region32_copy_from_region16' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
      601 |         if ((result = pixman_region32_copy_from_region16 (&common->clip_region, region)))
          |                                                                                 ^~~~~~
    In file included from pixman-image.c:32:
    pixman-private.h:859:56: note: expected 'pixman_region16_t *' {aka 'struct pixman_region16 *'} but argument is of type 'const pixman_region16_t *' {aka 'const struct pixman_region16 *'}
      859 |                                     pixman_region16_t *src);
          |                                     ~~~~~~~~~~~~~~~~~~~^~~
    pixman-utils.c:240:1: error: conflicting types for 'pixman_region16_copy_from_region32'; have 'pixman_bool_t(pixman_region16_t *, pixman_region32_t *)' {aka 'int(struct pixman_region16 *, struct pixman_region32 *)'}
      240 | pixman_region16_copy_from_region32 (pixman_region16_t *dst,
          | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    In file included from pixman-utils.c:31:
    pixman-private.h:862:1: note: previous declaration of 'pixman_region16_copy_from_region32' with type 'pixman_bool_t(pixman_region16_t *, const pixman_region32_t *)' {aka 'int(struct pixman_region16 *, const struct pixman_region32 *)'}
      862 | pixman_region16_copy_from_region32 (pixman_region16_t *dst,
          | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    pixman-utils.c:270:1: error: conflicting types for 'pixman_region32_copy_from_region16'; have 'pixman_bool_t(pixman_region32_t *, pixman_region16_t *)' {aka 'int(struct pixman_region32 *, struct pixman_region16 *)'}
      270 | pixman_region32_copy_from_region16 (pixman_region32_t *dst,
          | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    In file included from pixman-utils.c:31:
    pixman-private.h:858:1: note: previous declaration of 'pixman_region32_copy_from_region16' with type 'pixman_bool_t(pixman_region32_t *, const pixman_region16_t *)' {aka 'int(struct pixman_region32 *, const struct pixman_region16 *)'}
      858 | pixman_region32_copy_from_region16 (pixman_region32_t *dst,
          | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Simon Ser <contact@emersion.fr>
2023-08-30 15:49:50 +00:00
Matt Turner
7169c0404f Use more Markdown-friendly syntax 2023-08-30 11:15:00 -04:00
Matt Turner
f1072b07eb Remove generic build system information 2023-08-30 11:14:04 -04:00
Gauthier Östervall
2cf9ae1cea Update build instructions to meson and ninja 2023-08-30 11:12:41 -04:00
Dylan Baker
72c4245b2e delete win32 make files
meson can handle building for win32 (including using visual studio, and
mingw), and does a good deal more than these could. Since we're dropping
autotools, we might as well drop these too.
2023-08-30 10:54:46 -04:00
Dylan Baker
55eb680a1f autotools: remove autotools
At this point meson is pretty well tested and seems to pretty much work,
so we can consider dropping an extra build system.

This doesn't solve the problem that pixman's release scripts are part of
the autotools build system (as make targets). One solution might be to
use xorg's release.sh instead.
2023-08-30 10:51:27 -04:00
Matt Turner
593a970266 test: Revert to including pixman-private.h
This broke the Visual Studio builds in GTK's CI system.
2023-07-19 15:08:22 -04:00
Heiko Lewin
67490a8bc1
pixman-arma64: Adjustments to build with llvm integrated assembler
This enables building the aarch64 assembly with clang.
Changes:
1. Use `.func` or `.endfunc` only if available
2. Prefix macro arg names with `\` 
3. Use `\()` instead of `&`
4. Always use commas to separate macro arguments
5. Prefix asm symbols with an undderscore if necessary
2023-07-18 07:20:01 +02:00
Benjamin Gilbert
47d3fbe38f mmx: use xmmintrin.h if building with SSE2
As of mingw-w64 commit 463f00975, winnt.h includes emmintrin.h when
compiling with SSE2, causing redefinition errors for our copied MMX
intrinsics.  If the build is assuming SSE2 anyway, just use the system
header instead.
2023-07-09 01:56:40 +00:00
Simon Ser
55845c3dd3 Constify pixman_image_set_clip_region()
This function copies the region passed in.

Signed-off-by: Simon Ser <contact@emersion.fr>
2023-07-09 01:53:48 +00:00
Simon Ser
672f67db96 Add pixman_region{,32}_empty()
Inverse of pixman_region32_not_empty().

Most of the time, callers want to check whether a region is empty,
not whether a region is not empty. This results in code with
double-negatives such as !pixman_region32_not_empty(), which is
confusing to read.

Signed-off-by: Simon Ser <contact@emersion.fr>
2023-07-09 01:48:29 +00:00
Benjamin Gilbert
48d5df1f37 meson: don't dllexport when built as static library
If a static Pixman is linked with a dynamic library, Pixman shouldn't
export its own symbols into the latter's ABI.
2023-07-08 17:36:00 -04:00
Emanuel Schmidt
e4c878d179 Fixed missing dependency in libdemo
After the latest changes and separation of demo- and test-targets,
it was visible that a dependency towards `libtestutils_dep` was
missing in one of the demo-dependencies. This change will fix
this particular problem.
2023-02-17 18:52:14 +01:00
Emanuel Schmidt
ee145e53d1 Changed name of the config-header to "pixman-config.h" 2023-02-14 22:20:12 +01:00
Emanuel Schmidt
eb998d7b65 Separate meson build options for demos and tests 2023-02-08 20:56:05 +01:00
Emilio Pozuelo Monfort
a7a919b881 Release to sid 2022-11-11 13:42:32 +01:00
Emilio Pozuelo Monfort
a4e8d8901f Remove patch for CVE-2022-44638 included in 0.42.2 2022-11-08 13:24:10 +01:00
Emilio Pozuelo Monfort
590b8eb08f New upstream release 2022-11-08 13:11:47 +01:00
Emilio Pozuelo Monfort
dbe5c715e6 Merge branch 'upstream-unstable' into debian-unstable 2022-11-08 13:11:17 +01:00
Emilio Pozuelo Monfort
e71a54d0f0 Import 0.40.0-1.1 NMU
* Avoid integer overflow leading to out-of-bounds write (CVE-2022-44638)
  (Closes: #1023427)
2022-11-08 13:03:18 +01:00
Heiko Lewin
713077d0a3 Fix signed-unsigned semantics in reduce_32 2022-11-03 19:13:41 +00:00
Matt Turner
618e3d4283 Post-release version bump to 0.42.3 2022-11-03 09:53:12 -04:00
Claude Heiland-Allen
40d6c9b256 add r8g8b8 sRGB to test suite
Signed-off-by: Claude Heiland-Allen <claude@mathr.co.uk>
2022-11-03 12:51:47 +00:00
Claude Heiland-Allen
83ba024483 implement r8g8b8 sRGB (without alpha)
Signed-off-by: Claude Heiland-Allen <claude@mathr.co.uk>
2022-11-03 12:51:47 +00:00
Matt Turner
37216a3283 Pre-release version bump to 0.42.2 2022-11-02 13:25:48 -04:00
Matt Turner
a1f88e842e Avoid integer overflow leading to out-of-bounds write
Thanks to Maddie Stone and Google's Project Zero for discovering this
issue, providing a proof-of-concept, and a great analysis.

Closes: https://gitlab.freedesktop.org/pixman/pixman/-/issues/63
2022-11-02 13:25:48 -04:00
Matt Turner
c3bbb94b4c Revert "Fix signed-unsigned semantics in reduce_32"
This reverts commit aaf59b0338.

This commit regressed the scaling-test unit test, by apparently allowing
the compiler to emit fused multiply-add instructions in cases they
wouldn't have been allowed before. While using gcc's -ffp-contract=...
flag avoids the issue on amd64, it does not on at least aarch64 and
ppc64.

This is unfortunate, because the commit being reverted resolved
https://gitlab.freedesktop.org/pixman/pixman/-/issues/43 so we will
reintroduce this failure, but after more than a year without a fix for
the unit test, I think it's time to bite the bullet.

Fixes: https://gitlab.freedesktop.org/pixman/pixman/-/issues/49
2022-10-27 15:10:30 -04:00
Matt Turner
ca7bb8894e build: Add a64-neon-test.S to EXTRA_DIST
Fixes: https://gitlab.freedesktop.org/pixman/pixman/-/issues/66
2022-10-27 14:36:54 -04:00
Simon Ser
1a0d50ce70 meson: explicitly set C standard to gnu99
This explicitly indicates that GNU extensions (like asm) are used.
This fixes build errors when Pixman is used as a Meson subproject.

Signed-off-by: Simon Ser <contact@emersion.fr>
2022-10-27 18:21:37 +00:00
Simon Ser
0cf92877a9 meson: override pixman-1 dependency
This eases usage as a Meson subproject.

Signed-off-by: Simon Ser <contact@emersion.fr>
2022-10-27 18:17:26 +00:00
Thomas Klausner
4ee322c4e2 Makefile.am: increase shell portability
Use standard test(1) instead of bash's '[['.

Signed-off-by: Thomas Klausner <wiz@gatalith.at>
2022-10-18 17:48:49 +02:00
Thomas Klausner
b5b3243792 configure.ac: avoid unportable test(1) operator
"==" is only supported by bash, POSIX mandates "="

Signed-off-by: Thomas Klausner <wiz@gatalith.at>
2022-10-18 17:48:24 +02:00
Simon Ser
7df9e162c6 Post-release version bump to 0.42.1
Signed-off-by: Simon Ser <contact@emersion.fr>
2022-10-18 11:01:24 +02:00
Simon Ser
8d6d7f44f4 Pre-release version bump to 0.42.0
Signed-off-by: Simon Ser <contact@emersion.fr>
2022-10-18 09:44:04 +02:00
Benjamin Gilbert
421fc252ab meson: Add feature to disable compiler TLS support
When compiling with MinGW, use of the __thread attribute causes pixman
to gain a dependency on the winpthread DLL.  With Autotools, this could
be avoided by configuring with ac_cv_tls=none, causing pixman to fall
back to TlsSetValue() instead.

Add a Meson 'tls' option that can be 'disabled' to skip support for TLS
compiler attributes, or 'enabled' to require a working TLS attribute.
2022-10-18 01:02:43 +00:00
Alan Coopersmith
7989483929 configure.ac: allow x64 libraries on Solaris to run on non-SSSE3 machines
Override the x64 hardware capability autodetection by Solaris Studio
compilers for x64 libraries the same way we do for x86 libraries.

Also fix configure test for this override to work in out-of-tree builds.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2022-10-13 20:58:57 +00:00
Jocelyn Falempe
b4a105d772 Fix inverted colors on big endian system
bits_image_fetch_separable_convolution_affine() didn't take care
of big endian system

Signed-off-by: Jocelyn Falempe <jfalempe@redhat.com>
2022-06-29 11:00:04 +02:00
Alan Coopersmith
285b9a907c configure: replace bugzilla URL with gitlab issues
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2022-02-19 13:37:54 -08:00
Nirbheek Chauhan
adc07d4618 meson: Fix usage of pkgconfig.generate()
The library that the pkgconfig file is for should be the first
positional argument. The `libraries:` kwarg is for libraries that the
user must also link against, and which meson does not know about (and
hence cannot automatically add to the `Libs:` or `Requires:` section
in the .pc file).

Fixes:
```
subprojects/pixman/meson.build:564: DEPRECATION: Library pixman-1 was
passed to the "libraries" keyword argument of a previous call to
generate() method instead of first positional argument. Adding
pixman-1 to "Requires" field, but this is a deprecated behaviour that
will change in a future version of Meson. Please report the issue if
this warning cannot be avoided in your case.
```
2022-01-22 13:25:57 +05:30
Nirbheek Chauhan
3563dfe436 meson: Fix warning about extract_all_objects usage
We use this because of a meson bug that was fixed in 0.52:

https://mesonbuild.com/Release-notes-for-0-52-0.html#improved-support-for-static-libraries

Bump the requirement and remove the extract_all_objects workaround.
This gets rid of a meson warning:

WARNING: extract_all_objects called without setting recursive
keyword argument. Meson currently defaults to
non-recursive to maintain backward compatibility but
the default will be changed in the future.
2022-01-21 09:07:53 +00:00
Manuel Stoeckl
c6e1af995e demos: port to Gtk3
GTK2 has reached end of life, and GTK3 has been available for a
almost a decade.

Signed-off-by: Manuel Stoeckl <code@mstoeckl.com>
Reviewed-by: Simon Ser <contact@emersion.fr>
2022-01-12 23:19:39 -05:00
Mizuki Asakura
eadb82866b added aarch64 bilinear implementations (ver.4.1)
Since aarch64 has different neon syntax from aarch32 and has no
support for (older) arm-simd,
there are no SIMD accelerations for pixman on aarch64.

We need new implementations.

This patch also contains Ben Avions's series of patches for aarch32
and now the benchmark results are fine to aarch64.

Please find the result at the below ticket.

Added: https://bugs.freedesktop.org/show_bug.cgi?id=94758
Signed-off-by: Mizuki Asakura <ed6e117f@gmail.com>
2021-09-17 17:03:02 +00:00
Simon Ser
36001032b7 Constify region APIs
This allows callers to pass around const Pixman region in their
APIs, improving type safety and documentation.

Signed-off-by: Simon Ser <contact@emersion.fr>
2021-09-17 16:22:51 +00:00
Nirbheek Chauhan
bd4e7a9b9e tests: Fix undefined symbol build error on macOS
prng_state and prng_state_data are getting classified as a "Common
symbol" by the compiler due to the convoluted way in which it is
`#include`-ed in various test sources, and that's not read as a valid
symbol by the linker later.

Initializing the symbol clarifies it to the compiler that this
specific declaration is the canonical location for this variable, and
that it's not a "Common symbol".

Fixes https://gitlab.freedesktop.org/pixman/pixman/-/issues/42
2021-09-17 16:08:04 +00:00
Alex Richardson
e0d4403e78 Fix -Wincompatible-function-pointer-types warning
Adding const to the return type does nothing and means that the function
pointer types do not match exactly:

error: incompatible function pointer types passing 'const float (int, int)' to parameter of type 'dither_factor_t' (aka 'float (*)(int, int)')
2021-09-17 16:03:48 +00:00
Manuel Stoeckl
5f5e752f15 Fix masked pixel fetching with wide format
In __bits_image_fetch_affine_no_alpha and __bits_image_fetch_general,
when `wide` is true, the mask is actually an array of argb_t instead
of the array of uint32_t it was cast to, and the access to `mask[i]`
does not correctly detect when the pixel is nontrivial. The code now
uses a check appropriate for argb_t when `wide` is true.

One caveat: this new check only skips entries when the mask pixel data
is binary all zero; this misses cases like `-0.f` which would be caught
by the FLOAT_IS_ZERO macro. As the mask check only appears to be a
performance optimization to avoid loading inconsequential pixels, it
erring on the side of loading more pixels is safe.

Signed-off-by: Manuel Stoeckl <code@mstoeckl.com>
2021-08-09 21:43:58 -04:00
Heiko Lewin
aaf59b0338 Fix signed-unsigned semantics in reduce_32 2021-07-21 14:50:52 +00:00
pkubaj
4251202d9d Fix AltiVec detection on FreeBSD. 2021-05-07 15:58:56 +00:00
Jonathan Kew
e93eaff517 Avoid out-of-bounds read when accessing individual bytes from mask.
The important changes here are a handful of places where we replace

            memcpy(&m, mask++, sizeof(uint32_t));

or similar code with

            uint8_t m = *mask++;

because we're only supposed to be reading a single byte from *mask,
and accessing a 32-bit value may read out of bounds (besides that
it reads values we don't actually want; whether this matters would
depend exactly how the value in m is subsequently used).

I've also changed a bunch of other places to use this same pattern
(a local 8-bit variable) when reading individual bytes from the mask;
the code was inconsistent about this, sometimes casting the byte to
a uint32_t instead. This makes no actual difference, it just seemed
better to use a consistent pattern throughout the file.
2021-05-07 09:37:28 -04:00
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
Érico Rolim
d93ec57138 meson: update option descriptions.
- gtk is only used in demos
- libpng is only used in tests
- openmp is only used in tests (in the standard build)
2020-10-22 20:43:26 -03:00
Dylan Baker
9b49f4e087 meson: remove pixman dependency
AFAICT from the git history, what happened is that the gtk demos rely on
gtk being built with pixman support. pkg-config isn't really expressive
enough to have that information, so the solution that was come up with
was to search for pixman as well as gtk+ and hope that pixman being
installed was.

This isn't actually used anywhere in the meson build anyway, and it's
causing problems for projects that want to use pixman as a supproject
(there's a port of cairo underway that's hitting this), because it
confuses meson.
2020-06-18 14:21:09 -07:00
Tim-Philipp Müller
606f5c15b0 meson: add option to skip building of tests and demos
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
2020-06-02 02:30:39 +00:00
Tim-Philipp Müller
15e0668616 meson: add cpu-features-path option for Android
Add option to include cpu-features.[ch] from a given path
into the build for platforms that don't provide this out
of the box. This is needed on Android.

Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
2020-06-02 01:15:33 +01:00
Tim-Philipp Müller
0ba6cbe1ac Update README a little
- bugzilla -> gitlab
- convert links to https
- suggest issues and patches be filed via gitlab
2020-05-30 11:34:26 +01:00
Tom Stellard
c2fe1568ff Add -ftrapping-math to default cflags
This should resolve https://gitlab.freedesktop.org/pixman/pixman/-/issues/22
and make the tests pass with clang.

-ftrapping-math is already the default[1] for gcc, so this should not change
behavior when compiling with gcc.  However, clang defaults[2] to -fno-trapping-math,
so -ftrapping-math is needed to avoid floating-point expceptions when running the
combiner and stress tests.

The root causes of this issue is that that pixman-combine-float.c guards floating-point
division operations with a FLOAT_IS_ZERO check e.g.

if (FLOAT_IS_ZERO (sa))
	f = 1.0f;
else
	f = CLAMP (da / sa);

With -fno-trapping-math, the compiler assumes that division will never trap, so it may
re-order the division and the guard and execute the division first.  In most cases,
this would not be an issue, because floating-point exceptions are ignored.  However,
these tests call enable_divbyzero_exceptions() which causes the SIGFPE signal to
be sent to the program when a divide by zero exception is raised.

[1] https://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html
[2] https://clang.llvm.org/docs/UsersManual.html#controlling-floating-point-behavior
2020-05-11 22:33:49 +00:00
Michael Forney
3b1fefda7f Prevent empty top-level declaration
The expansion of PIXMAN_DEFINE_THREAD_LOCAL(...) may end in a
function definition, so the following semicolon is considered an
empty top-level declaration, which is not allowed in ISO C.

Reviewed-by: Matt Turner <mattst88@gmail.com>
2020-04-26 13:46:43 -07:00
Matt Turner
10a057e27f Post-release version bump to 0.40.1
Signed-off-by: Matt Turner <mattst88@gmail.com>
2020-04-19 15:01:30 -07: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
Christoph Reiter
fd5c0da579 meson: fix TLS support under mingw
GCC on Windows complains that "__declspec(thread)" doesn't work, but still
compiles it, so the meson check doesn't work. The warning printed by gcc:
"warning: 'thread' attribute directive ignored [-Wattributes]"

Pass -Werror=attributes to make the check fail instead.

This fixes the test suite (minus gtk tests) on Windows with mingw.
2019-06-10 16:42:59 +00:00
Christoph Reiter
4851d4e20f meson: allow building a static library
So that passing "-Ddefault_library=both" also creates a static lib.

Note that Libs.private in the .pc file will still be wrong because of
https://github.com/mesonbuild/meson/issues/3934 (it contains things like
-lpixman-mmx)
2019-06-10 16:38:39 +00:00
Christoph Reiter
be0d3e6994 meson: define SIZEOF_LONG and use -Wundef
meson builds defaulted to SIZEOF_LONG=0 in various places
2019-06-10 16:34:06 +00:00
Basile Clement
0ee0ad23de Don't use GNU extension for binary numbers
The dithering code (specifically `dither_factor_bayer_8`) uses a GNU
extension for binary notation, eg 0b001.  This is not supported by MSVC
(at least) and breaks the build on this platform [1].

This patches uses hexadecimal notation instead, fixing the build.

[1]: https://lists.freedesktop.org/archives/pixman/2019-June/004883.html

Reviewed-by: Matt Turner <mattst88@gmail.com>
2019-06-10 09:32:12 -07:00
Basile Clement
cb2ec4268f Ordered dithering with blue noise, v2
On some screens (typically low quality laptop screens), using Bayer
ordered dithering has been observed to cause color changes depending on
*where the gradient is rendered on the screen*, causing visible
flickering when moving an image on the screen.

To alleviate the issue, this patch adds support for ordered dithering
using a 64x64 matrix tuned from blue noise.  In addition to being devoid
of the positional dependency on screen, the blue noise matrix also
generates more pleasing and less discernable patterns.  As such, it is
now the method used for PIXMAN_DITHER_GOOD and PIXMAN_DITHER_BEST
dithering methods.

The 64x64 blue noise matrix has been generated using the provided
`pixman/dither/make-blue-noise.c` script, which uses the
void-and-cluster method.

Changes since v1 (thanks Bill):
 - Use uint16_t for the blue noise matrix for lower memory usage
 - Use bitwise computation for array index
2019-05-25 07:30:19 -07:00
Basile Clement
98b5ec74ca demos: Add a dithering demo
This adds a dither.c which provides a demo of the dithering feature.
This is based on the scale.c demo for scaling and provides a selection
of intermediate formats and dithering operators (currently, only
PIXMAN_DITHER_ORDERED_BAYER_8) to use.  Images are first blitted onto a
surface of the intermediate format with the requested dither setup, then
blitted back onto a a8r8g8b8 surface for display.
2019-05-25 07:30:11 -07:00
Basile Clement
37d2e681b3 test: Check the dithering path in tolerance-test
This adds support for testing dithered destinations in tolerance-test.
When dithering is enabled, the pixel checker allows for an additional
quantization error.
2019-05-25 07:30:02 -07:00
Basile Clement
ddcc41b999 Implement basic dithering for the wide pipeline, v3
This patch implements dithering in pixman.  A "dither" property is added
to BITS images, which is used to:

 - Force rendering to the image to go through the floating point
   pipeline.  Note that this is different from FAST_PATH_NARROW_FORMAT
   as it should not enable the floating point pipeline when reading from
   the image.

 - Enable dithering in dest_write_back_wide.  The dithering uses the
   destination format to determine noise amplitude.

This does not change pixman's behavior when dithering is disabled (the
default).

Additional types and functions are added to the public API:

 - The `pixman_dither_t` enum exposes the available dithering methods.
   Currently a single dithering method based on 8x8 Bayer matrices is
   implemented (PIXMAN_DITHER_ORDERED_BAYER_8).  The PIXMAN_DITHER_FAST,
   PIXMAN_DITHER_GOOD and PIXMAN_DITHER_BEST aliases are provided and
   should be used to benefit from future specializations.

 - The `pixman_image_set_dither` function allows to set the dithering
   method to use when rendering to a bits image.

 - The `pixman_image_set_dither_offset` function allows to set a
   vertical and horizontal offsets for the dither matrix.  This can be
   used after scrolling to ensure a consistent spatial positioning of
   the dither matrix.

Changes since previous version (v2):
 - linear_gradient_is_horizontal optimization is still compatible with
   the wide pipeline.  The code disabling it was a remnant of a previous
   patch which performed dithering directly inside linear_get_scanline,
   and thus needed to be called independently for each scanline.

Changes since v1:
 - Renamed PIXMAN_DITHER_BAYER_8 to PIXMAN_DITHER_ORDERED_BAYER_8
 - Disable dithering for channels with 32bpp or more (since they can
   represent exactly the wide values already).  This makes the patches
   compatible with the newly added floating point format.

Dithering is compatible with linear_gradient_is_horizontal
2019-05-25 07:29:55 -07:00
Fan Jinke
85bfa8b4f9 add Hygon Dhyana support to enable X86_MMX_EXTENSIONS feature
Signed-off-by: Fan Jinke <fanjinke@hygon.cn>
Signed-off-by: Matt Turner <mattst88@gmail.com>
2019-05-02 16:07:19 -07:00
Basile Clement
8256c235d9 Fix bilinear filter computation in wide pipeline
The recently introduced wide pipeline for filters has a typo which
causes it to improperly compute bilinear interpolation positions,
causing various glitches when enabled.

This patch uses the proper computation for bilinear interpolation in the
wide pipeline.  It also makes related `if` statements conformant to the
CODING_STYLE:

* If a substatement spans multiple lines, then there must be braces
  around it.

* If one substatement of an if statement has braces, then the other
  must too.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
2019-04-11 10:59:00 +02:00
Matt Turner
e21ebfb13f Post-release version bump to 0.38.5
Signed-off-by: Matt Turner <mattst88@gmail.com>
2019-04-10 10:25:18 -07:00
Matt Turner
e8df10eea9 Pre-release version bump to 0.38.4
Signed-off-by: Matt Turner <mattst88@gmail.com>
2019-04-10 10:17:47 -07:00
Matt Turner
23f036d461 Makefile.am: Ship Meson assembly test files in the tarball
These were forgotten in commit 0ea37df428 (meson: store ARM SIMD and
NEON tests as text files) and since autotools doesn't use them make
distcheck still succeeded.

Fixes #30

Signed-off-by: Matt Turner <mattst88@gmail.com>
2019-04-10 10:10:47 -07:00
Matt Turner
e7058fe49d Makefile.am: Update download links
Signed-off-by: Matt Turner <mattst88@gmail.com>
2019-04-07 13:43:57 -07:00
Matt Turner
8888e752bf Post-release version bump to 0.38.3
Signed-off-by: Matt Turner <mattst88@gmail.com>
2019-04-07 13:34:44 -07:00
Matt Turner
a7ffb3e617 Pre-release version bump to 0.38.2
Signed-off-by: Matt Turner <mattst88@gmail.com>
2019-04-07 13:13:30 -07:00
Matt Turner
4c4753c407 meson: Correct copy-and-paste mistake
Signed-off-by: Matt Turner <mattst88@gmail.com>
2019-04-07 12:31:40 -07:00
Niveditha Rau
72959837ab void function should not return a value
Signed-off-by: Matt Turner <mattst88@gmail.com>
2019-03-27 15:14:05 -07:00
Simon Richter
ef4fb03248 Windows: Support building with SHELL=cmd.exe
When GNU Make is not from msys, the startup cost for sh.exe is massive
compared to cmd.exe.

Signed-off-by: Matt Turner <mattst88@gmail.com>
2019-03-27 15:12:52 -07:00
Simon Richter
55d8f956c2 Windows: Show compiler invocation
Signed-off-by: Matt Turner <mattst88@gmail.com>
2019-03-27 15:12:52 -07:00
Dylan Baker
0ea37df428 meson: store ARM SIMD and NEON tests as text files
This is unfortunately required to make the tests work correctly, as
otherwise meson assumes that the files are C code not assembly. I've
opened https://github.com/mesonbuild/meson/issues/5151, to discuss
fixing the issue in meson upstream.

Fixes #29
2019-03-27 10:54:50 -07:00
Dylan Baker
2065a07e98 meson: simplify and fix mmx library compilation
This simplifies the logic and fixes the loongson-mmi implementation to
build correctly.
2019-03-27 10:54:50 -07:00
Dylan Baker
6e206cf7fc meson: Add proper include paths for the loongson check 2019-03-27 10:53:34 -07:00
Dylan Baker
9ed0576a73 meson: fix copy-n-paste error for arm simd assembly
mentioned in #29
2019-03-27 10:53:34 -07:00
Dylan Baker
d13f6a8b1d meson: fix typo which breaks loongson checks
mach -> march
2019-03-27 10:53:34 -07:00
Dylan Baker
e7ac62c3c7 meson: work around meson issue #5115
This issue causes openmp arguments to be injected into compilers that
can support openmp, even if they don't. This issue will be fixed in
0.51 (code already landed in mesonbuild#5116), for older versions lets
work around the issue.
2019-03-27 10:53:33 -07:00
Maarten Lankhorst
5d2cf8fc21 Bump version to 0.38.0
And update RELEASING for the new meson build system.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
2019-02-11 13:27:25 +01:00
Maarten Lankhorst
6240ad15c6 pixman: Use maximum precision for pixman-bits-image, v2.
pixman-bits-image's wide helpers first obtains the 8-bits image,
then converts it to float. This destroys all the precision that
the wide path was offering.

Fix this by making get_pixel() take a pointer instead of returning
a value. Floating point will fill in a argb_t, while the 8-bits path
will fill a 32-bits ARGB value. This also requires writing a floating
point bilinear interpolator. With this change pixman can use the full
floating point precision internally in all paths.

Changes since v1:
- Make accum and reduce an argument to convolution functions,
  to remove duplication.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Acked-by: Basile Clement <basile-pixman@clement.pm>
2019-02-11 12:48:57 +01:00
Basile Clement
a32fc4faf9 Implement floating point gradient computation, v2.
This patch modifies the gradient walker to be able to generate floating
point values directly in addition to a8r8g8b8 32 bit values.  This is
then used by the various gradient implementations to render in floating
point when asked to do so, instead of rendering to a8r8g8b8 and then
expanding to floating point as they were doing previously.

Changes since v1 (mlankhorst):
- Implement pixman_gradient_walker_pixel_32 without calling
  pixman_gradient_walker_pixel_float, to prevent performance degradation.
  Suggested by Adam Jackson.
- Fix whitespace errors.
- Remove unnecessary function prototypes in pixman-private.h

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
[mlankhorst: Add comment about pixman_contract_from_float,
             based on Basille's suggestion]
Acked-by: Basile Clement <basile-pixman@clement.pm>
2019-02-11 12:48:21 +01:00
Dylan Baker
b40d5495ec build: Add meson files to EXTRA_DIST
Reviewed-by: Matt Turner <mattst88@gmail.com>
2019-01-15 19:13:24 -08:00
Dylan Baker
16eacf19a3 editorconfig: use tabs for Makefiles
Reviewed-by: Matt Turner <mattst88@gmail.com>
2019-01-15 19:13:14 -08:00
Andreas Boll
60eec33554 Upload to unstable. 2018-12-12 22:02:53 +01:00
Andreas Boll
431e754de7 Bump standards version to 4.2.1. 2018-12-12 21:55:48 +01:00
Andreas Boll
8c5411a23b Bump debhelper compat to 11. 2018-12-12 21:55:28 +01:00
Andreas Boll
ea26aeb957 Set source format to 1.0. 2018-12-12 21:54:43 +01:00
Andreas Boll
da6e874f81 Use https URL in debian/copyright. 2018-12-12 21:53:40 +01:00
Andreas Boll
2d7f5e5831 Update Vcs-* URLs to point to salsa.debian.org. 2018-12-12 21:52:18 +01:00
Andreas Boll
c8e824af7b Update to my Debian address. 2018-12-12 21:51:21 +01:00
Andreas Boll
a26c93f936 Bump changelogs 2018-12-12 21:07:41 +01:00
Andreas Boll
51baef77fb Merge branch 'debian-unstable' into debian-unstable-new 2018-12-12 21:01:26 +01:00
Andreas Boll
0c08dcfc0c pixman 0.34.0 release
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQEcBAABAgAGBQJWrh2cAAoJEGUdTbirWueAfxAH/1sf8P0SHY1y9KBKCw0enM4Y
 60sZYAgTgLa5prITcPeTb11bw877WAF73bAVjzL+6pNkT+Xs1ytvckwmbDoKDRZi
 zlptf0vPCnPX95Fh2X2PSO/1G0EErNWbqP5dUtLJ8L4sEaAj5TtDC9r9BouXpFaR
 qdipAmC1dVQNsbheBUinnfIjQ7H7i0NXXoUADFoP+X9V3WW95Hjkbwyoa4IUeYsY
 lPLVKfMRTZfQLksAAViDDpAhQxIrwMYQYApuMlbYXvX3tsW6zZCTeDfjqwRfxkdX
 Nnsz3lKBGvbS2ZJQBx2Xp9YC7+eu12IlxFA8cn3Exa96VngPJK5bR8Qn1ZJlUH8=
 =hex7
 -----END PGP SIGNATURE-----

Merge tag 'pixman-0.34.0' into debian-unstable-new

pixman 0.34.0 release
2018-12-12 21:01:18 +01:00
Maarten Lankhorst
146fa64351 Merge remote-tracking branch 'origin/master'
And bump meson version to 37.1 as well. Seems my push to upstream failed.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
2018-12-07 14:20:44 +01:00
Maarten Lankhorst
0202f0d89d Post release version bump to 37.1
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
2018-12-07 13:44:38 +01:00
Dylan Baker
eb0dfaa0c6 gitlab-ci: Add meson build to pipeline test 2018-11-29 16:57:01 +00:00
Dylan Baker
199a3bd275 meson: Add a meson build system
This commit adds a meson build system for pixman. It carries the usual
improvements of meson, better clean build time, much better incremental
build times, while being simpler and easier to understand.

This takes advantage of some features from the most recent versions of
meson: the builtin openmp dependency and the feature option type.

There are a couple of things that I've done a bit differently than the
autotools build system, I've built a libdemos which is the utilities
from the demos folder, and I've linked the demos with libtestutils from
tetsts, otherwise I expect that most things will be the same.

I've tested so far cross compiling from x86_64 -> x86, x86_64 ->
Aarch64, and Linux to Windows via mingw, as well as native x86_64 Linux
builds which all work. I've also built with mingw nativly, there are
some test failures there. An MSVC build can be generated, but fails.

v2: - set WORDS_BIGENDIAN in the config for big endian systems.
2018-11-29 16:57:01 +00:00
Dylan Baker
761f36c3c8 Add .editorconfig file
This sets the style for meson (which uses the upstream style, 2 space
indent with no tabs), and sets the tab_width to 8 per the CODING_STYLE
document.
2018-11-29 16:57:01 +00:00
Maarten Lankhorst
0313f35ab9 Bump version to 0.36.0
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
2018-11-21 12:40:26 +01:00
Maarten Lankhorst
8a5d44c420 pixman: Update git repository to the one at gitlab.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
2018-11-21 12:39:33 +01:00
Maarten Lankhorst
489fa0df11 pixman: Add tests for (a)rgb floating point formats.
Add some basic tests to ensure that the newly added formats work as
intended.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2018-11-06 14:25:49 +01:00
Maarten Lankhorst
a4b8a26d2b pixman: Add support for argb/xrgb float formats, v5.
Pixman is already using the floating point formats internally, expose
this capability in case someone wants to support higher bit per
component formats.

This is useful for igt which depends on cairo to do the rendering.
It can use it to convert floats internally to planar Y'CbCr formats,
or to F16.

We add a new type PIXMAN_TYPE_RGBA_FLOAT for this format, which is an
all float array of R, G, B, and A. Formats that use mixed float/int
RGBA aren't supported, and will probably need their own type.

Changes since v1:
- Use RGBA 128 bits and RGB 96 bits memory layouts, to better match the opengl format.
Changes since v2:
- Add asserts in accessor and for strides to force alignment.
- Move test changes to their own commit.
Changes since v3:
- Define 32bpc as PIXMAN_FORMAT_PACKED_C32
- Rename pixman accessors from rgb*_float_float to rgb*f_float
Changes since v4:
- Create a new PIXMAN_FORMAT_BYTE for fitting up to 64 bits per component.
  (based on Siarhei Siamashka's suggestion)
- Use new format type PIXMAN_TYPE_RGBA_FLOAT

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> #v4
[mlankhorst: Fix missing braces in PIXMAN_FORMAT_RESHIFT macro]
2018-11-06 14:24:05 +01:00
Siarhei Siamashka
018bf2f230 test: Fix stride calculation in stress-test
Currently the number of bits per pixel is used instead of the
number of bytes per pixel when calculating image strides. This
does not cause any real problems, but the gaps between scanlines
are excessively large.

This patch actually converts bits to bytes and rounds up the result
to the nearest byte boundary.

Signed-off-by: Siarhei Siamashka <siarhei.siamashka@gmail.com>
Reviewed-by: soren.sandmann@gmail.com
2018-07-06 14:44:22 -04:00
Vladimir Smirnov
bd2b49185b test: Adjust for clang's removal of __builtin_shuffle
__builtin_shuffle was removed in clang 5.0.

Build log says:
test/utils-prng.c:207:27: error: use of unknown builtin '__builtin_shuffle' [-Wimplicit-function-declaration]
            randdata.vb = __builtin_shuffle (randdata.vb, bswap_shufflemask);
                          ^
test/utils-prng.c:207:25: error: assigning to 'uint8x16' (vector of 16 'uint8_t' values) from incompatible type 'int'
            randdata.vb = __builtin_shuffle (randdata.vb, bswap_shufflemask);
                        ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2 errors generated

Link to original discussion:
http://lists.llvm.org/pipermail/cfe-dev/2017-August/055140.html

It's possible to build pixman if attached patch is applied. Basically
patch adds check for __builtin_shuffle support and in case there is
none, falls back to clang-specific __builtin_shufflevector that do the
same but have different API.

Bugzilla: https://bugs.gentoo.org/646360
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104886
Tested-by: Philip Chimento <philip.chimento@gmail.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2018-06-05 12:35:07 -04:00
Adam Jackson
a75c69f122 Merge branch 'ci' into 'master'
ci: Add .gitlab-ci.yml

See merge request pixman/pixman!1
2018-06-05 16:33:50 +00:00
Adam Jackson
9034d0cc32 ci: Add .gitlab-ci.yml
Just builds on Fedora 28 for x86_64 at the moment, but it's a start.
Credit to Daniel Stone for eliminating the nested docker image.

Signed-off-by: Adam Jackson <ajax@redhat.com>
2018-06-05 12:13:35 -04:00
Dan Horák
ddf42d627c vmx: Fix vector loads on ppc64le
Use vector intrinsic for loading possibly unaligned data instead of a
typecast.

Bugzilla: https://bugzilla.redhat.com/1572540
Signed-off-by: Dan Horák <dan@danny.cz>
Signed-off-by: Adam Jackson <ajax@redhat.com>
Tested-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Siarhei Siamashka <siarhei.siamashka@gmail.com>
2018-05-14 16:31:49 -04:00
Behdad Esfahbod
8b95e0e460 Promote unsigned short to unsigned int explicitly
...to avoid default promotion to signed int, which causes undefined
behaviour in the shift expression.
2018-01-09 10:26:29 +01:00
Andreas Boll
31381b7057 Upload to unstable. 2017-12-17 13:34:07 +01:00
Andreas Boll
f0178c049c Bump standards version to 4.1.2. 2017-12-17 13:19:45 +01:00
Andreas Boll
9684e88c21 Stop passing --disable-silent-rules to configure, debhelper does it now. 2017-12-17 13:19:23 +01:00
Andreas Boll
397047255e Switch to dbsym package. 2017-12-17 13:18:03 +01:00
Andreas Boll
34c1784503 Declare Multi-Arch: same for libpixman-1-dev (Closes: #884166). 2017-12-17 13:17:44 +01:00
Julien Cristau
87934b6b4f Upload to unstable 2016-09-24 13:25:26 +02:00
Julien Cristau
4daa9a4c6b Use https URL in debian/watch. 2016-09-24 13:23:41 +02:00
Søren Sandmann Pedersen
85467ec308 Revert "demos/scale: Added pulldown to choose PIXMAN_FILTER_* value"
This reverts commit 375f5ec5c5.

This patch was accidentally pushed.
2016-09-03 15:09:12 -04:00
Bill Spitzak
17c4ce2e39 pixman-filter: Made Gaussian a bit wider
Expanded the size slightly (from ~4.25 to 5) to make the cutoff less
noticable.  Previouly the value at the cutoff was
gaussian_filter(sqrt(2)*3/2) = 0.00626 which is larger than the
difference between 8-bit pixels (1/255 = 0.003921). New cutoff is
gaussian_filter(2.5) = 0.001089 which is smaller.

v11: added some math to commit message
v14: left SIGMA in there
Signed-off-by: Bill Spitzak <spitzak@gmail.com>
Acked-by: Oded Gabbay <oded.gabbay@gmail.com>
Reviewed-by: Søren Sandmann <soren.sandmann@gmail.com>
2016-09-03 14:53:07 -04:00
Bill Spitzak
d286078b28 pixman-filter: Nested polynomial for cubic
v11: Restored range checks

Signed-off-by: Bill Spitzak <spitzak@gmail.com>
Reviewed-by: Oded Gabbay <oded.gabbay@gmail.com>
2016-09-03 14:53:07 -04:00
Søren Sandmann Pedersen
133142449b pixman-filter: Fix several issues related to normalization
There are a few bugs in the current normalization code

(1) The normalization is based on the sum of the *floating point*
    values generated by integral(). But in order to get the sum to be
    close to pixman_fixed_1, the sum of the rounded fixed point values
    should be used.

(2) The multiplications in the normalization loops often round the
    same way, so the residual error can fairly large.

(3) The residual error is added to the sample located at index
    (width - width / 2), which is not the midpoint for odd widths (and
    for width 1 is in fact outside the array).

This patch fixes these issues by (1) using the sum of the fixed point
values as the total to divide by, (2) doing error diffusion in the
normalization loop, and (3) putting any residual error (which is now
guaranteed to be less than pixman_fixed_e) at the first sample, which
is the only one that didn't get any error diffused into it.

Signed-off-by: Søren Sandmann <soren.sandmann@gmail.com>
2016-09-03 14:53:06 -04:00
Søren Sandmann Pedersen
3b46fce6fe pixman-filter: Speed up BOX/BOX filter
The convolution of two BOX filters is simply the length of the
interval where both are non-zero, so we can simply return width from
the integral() function because the integration region has already
been restricted to be such that both functions are non-zero on it.

This is both faster and more accurate than doing numerical integration.

This patch is based on one by Bill Spitzak

    https://lists.freedesktop.org/archives/pixman/2016-March/004446.html

with these changes:

- Rebased to not assume any changes in the arguments to integral().

- Dropped the multiplication by scale

- Added more details in the commit message.

Signed-off-by: Søren Sandmann <soren.sandmann@gmail.com>
Reviewed-by: Bill Spitzak <spitzak@gmail.com>
2016-09-02 00:40:12 -04:00
Bill Spitzak
8855b3a2a2 pixman-filter: integral splitting is only needed for triangle filter
Only the triangle is discontinuous at 0. The other filters resemble a
cubic closely enough that Simpsons integration works without
splitting.

Changes by Søren: Rebase without the changes to the integral function,
update comment to match the new code.

Signed-off-by: Bill Spitzak <spitzak@gmail.com>
Signed-off-by: Søren Sandmann <soren.sandmann@gmail.com>
Reviewed-by: Søren Sandmann <soren.sandmann@gmail.com>
2016-09-02 00:40:12 -04:00
Bill Spitzak
6ae281fbb7 pixman-filter: Correct Simpsons integration
Simpsons uses cubic curve fitting, with 3 samples defining each
cubic. This makes the weights of the samples be in a pattern of
1,4,2,4,2...4,1, and then dividing the result by 3.

The previous code was using weights of 1,2,0,6,0,6...,2,1.

With this fix the integration is accurate enough that the number of
samples could be reduced a lot. Multiples of 12 seem to work best.

v7: Merged with patch to reduce from 128 samples to 16
v9: Changed samples from 16 to 12
v10: Fixed rebase error that made it not compile
v11: minor whitespace change
v14: more whitespace changes

Signed-off-by: Bill Spitzak <spitzak@gmail.com>
Reviewed-by: Oded Gabbay <oded.gabbay@gmail.com>
Reviewed-by: Søren Sandmann <soren.sandmann@gmail.com>
2016-09-02 00:40:12 -04:00
Bill Spitzak
6acaf2bcb1 pixman-filter: reduce amount of malloc/free/memcpy to generate filter
Rearranged so that the entire block of memory for the filter pair
is allocated first, and then filled in. Previous version allocated
and freed two temporary buffers for each filter and did an extra
memcpy.

v8: small refactor to remove the filter_width function

v10: Restored filter_width function but with arguments changed to
     match later patches

v11: Removed unused arg and pointer from filter_width function
     Whitespace fixes.

Signed-off-by: Bill Spitzak <spitzak@gmail.com>
Reviewed-by: Oded Gabbay <oded.gabbay@gmail.com>
Acked-by: Søren Sandmann <soren.sandmann@gmail.com>
2016-09-02 00:40:12 -04:00
Bill Spitzak
d0e6c9f4f6 pixman-image: Added enable-gnuplot config to view filters in gnuplot
If enable-gnuplot is configured, then you can pipe the output of a
pixman-using program to gnuplot and get a continuously-updated plot of
the horizontal filter. This works well with demos/scale to test the
filter generation.

The plot is all the different subposition filters shuffled
together. This is misleading in a few cases:

  IMPULSE.BOX - goes up and down as the subfilters have different
                numbers of non-zero samples

  IMPULSE.TRIANGLE - somewhat crooked for the same reason

  1-wide filters - looks triangular, but a 1-wide box would be more
                   accurate

Changes by Søren: Rewrote the pixman-filter.c part to
     - make it generate correct coordinates
     - add a comment on how coordinates are generated
     - in rounding.txt, add a ceil() variant of the first-sample
       formula
     - make the gnuplot output slightly prettier

v7: First time this ability was included

v8: Use config option
    Moved code to the filter generator
    Modified scale demo to not call filter generator a second time.

v10: Only print if successful generation of plots
     Use #ifdef, not #if

v11: small whitespace fixes
v12: output range from -width/2 to width/2 and include y==0, to avoid misleading plots
     for subsample_bits==0 and for box filters which may have no small values.

Signed-off-by: Bill Spitzak <spitzak@gmail.com>
2016-09-02 00:40:11 -04:00
Bill Spitzak
375f5ec5c5 demos/scale: Added pulldown to choose PIXMAN_FILTER_* value
This is very useful for comparing the results of SEPARABLE_CONVOLUTION
with BILINEAR and NEAREST.

v14: Removed good/best items
v15: Skip filter generation so gnuplot output continues showing previous value

Signed-off-by: Bill Spitzak <spitzak@gmail.com>
Reviewed-by: Oded Gabbay <oded.gabbay@gmail.com>
2016-09-02 00:40:11 -04:00
Bill Spitzak
afee2adc1e demos/scale: Default to locked axis
Signed-off-by: Bill Spitzak <spitzak@gmail.com>
Reviewed-by: Søren Sandmann <soren.sandmann@gmail.com>
2016-09-02 00:40:11 -04:00
Bill Spitzak
1e1af34d3b demos/scale: fix blank subsamples spin box
It now shows the initial value of 4 when the demo is started

Signed-off-by: Bill Spitzak <spitzak@gmail.com>
Reviewed-by: Søren Sandmann <soren.sandmann@gmail.com>
2016-09-02 00:40:11 -04:00
Bill Spitzak
99b574109d demos/scale: Compute filter size using boundary of xformed ellipse
Instead of using the boundary of xformed rectangle, use the boundary
of xformed ellipse. This is much more accurate and less blurry. In
particular the filtering does not change as the image is rotated.

Signed-off-by: Bill Spitzak <spitzak@gmail.com>
Reviewed-by: Oded Gabbay <oded.gabbay@gmail.com>
Reviewed-by: Soren Sandmann <soren.sandmann@gmail.com>
2016-09-02 00:40:11 -04:00
Søren Sandmann Pedersen
b9ead7ddf7 More general BILINEAR=>NEAREST reduction
Generalize and simplify the code that reduces BILINEAR to NEAREST so
that the reduction happens for all affine transformations where
t00...t12 are integers and (t00 + t01) and (t10 + t11) are both
odd. This is a sufficient condition for the resulting transformed
coordinates to be exactly at the center of a pixel so that BILINEAR
becomes identical to NEAREST.

V2: Address some comments by Bill Spitzak

Signed-off-by: Søren Sandmann <soren.sandmann@gmail.com>
Reviewed-by: Bill Spitzak <spitzak@gmail.com>
2016-09-02 00:40:11 -04:00
Søren Sandmann Pedersen
7612369013 Add new test of filter reduction from BILINEAR to NEAREST
This new test tests a bunch of bilinear downscalings, where many have
a transformation such that the BILINEAR filter can be reduced to
NEAREST (and many don't).

A CRC32 is computed for all the resulting images and compared to a
known-good value for both 4-bit and 7-bit interpolation.

V2: Remove leftover comment, some minor formatting fixes, use a
timestamp as the PRNG seed.

Signed-off-by: Søren Sandmann <soren.sandmann@gmail.com>
Reviewed-by: Bill Spitzak <spitzak@gmail.com>
2016-09-02 00:40:11 -04:00
Søren Sandmann Pedersen
eb4a832ec2 pixman-fast-path.c: Pick NEAREST affine fast paths before BILINEAR ones
When a BILINEAR filter is reduced to NEAREST, it is possible for both
types of fast paths to run; in this case, the NEAREST ones should be
preferred as that is the simpler filter.

Signed-off-by: Soren Sandmann <soren.sandmann@gmail.com>
Reviewed-by: Bill Spitzak <spitzak@gmail.com>
2016-09-02 00:40:11 -04:00
Julien Cristau
0f4e087031 Bump changelogs 2016-05-13 12:50:41 +02:00
Julien Cristau
5672fa0f82 pixman 0.34.0 release
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQEcBAABAgAGBQJWrh2cAAoJEGUdTbirWueAfxAH/1sf8P0SHY1y9KBKCw0enM4Y
 60sZYAgTgLa5prITcPeTb11bw877WAF73bAVjzL+6pNkT+Xs1ytvckwmbDoKDRZi
 zlptf0vPCnPX95Fh2X2PSO/1G0EErNWbqP5dUtLJ8L4sEaAj5TtDC9r9BouXpFaR
 qdipAmC1dVQNsbheBUinnfIjQ7H7i0NXXoUADFoP+X9V3WW95Hjkbwyoa4IUeYsY
 lPLVKfMRTZfQLksAAViDDpAhQxIrwMYQYApuMlbYXvX3tsW6zZCTeDfjqwRfxkdX
 Nnsz3lKBGvbS2ZJQBx2Xp9YC7+eu12IlxFA8cn3Exa96VngPJK5bR8Qn1ZJlUH8=
 =hex7
 -----END PGP SIGNATURE-----

Merge tag 'pixman-0.34.0' into debian-unstable

pixman 0.34.0 release
2016-05-13 12:49:33 +02:00
Oded Gabbay
1727aa4ab6 Pre-release version bump to 0.34.0
Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
2016-01-31 16:39:23 +02:00
Thomas Petazzoni
7c6066b700 pixman-private: include <float.h> only in C code
<float.h> is included unconditionally by pixman-private.h, which in
turn gets included by assembler files. Unfortunately, with certain C
libraries (like the musl C library), <float.h> cannot be included in
assembler files:

  CCLD     libpixman-arm-simd.la
/home/test/buildroot/output/host/usr/arm-buildroot-linux-musleabihf/sysroot/usr/include/float.h: Assembler messages:
/home/test/buildroot/output/host/usr/arm-buildroot-linux-musleabihf/sysroot/usr/include/float.h:8: Error: bad instruction `int __flt_rounds(void)'
/home/test/buildroot/output/host/usr/arm-buildroot-linux-musleabihf/sysroot/usr/include/float.h: Assembler messages:
/home/test/buildroot/output/host/usr/arm-buildroot-linux-musleabihf/sysroot/usr/include/float.h:8: Error: bad instruction `int __flt_rounds(void)'

It turns out however that <float.h> is not needed by assembly files,
so we move its inclusion within the #ifndef __ASSEMBLER__ condition,
which solves the problem.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Reviewed-by: Siarhei Siamashka <siarhei.siamashka@gmail.com>
2016-01-31 16:15:26 +02:00
Andrea Canciani
342cbf1644 build: Distinguish SKIP and FAIL on Win32
The `check` target in test/Makefile.win32 assumed that any non-0 exit
code from the tests was an error, but the testsuite is currently using
77 as a SKIP exit code (based on the convention used in autotools).

Fixes fence-image-self-test and cover-test (now reported as SKIP).

Signed-off-by: Andrea Canciani <ranma42@gmail.com>
Acked-by: Oded Gabbay <oded.gabbay@gmail.com>
2015-12-30 14:06:40 +01:00
Simon Richter
af0689716a build: Use del instead of rm on cmd.exe shells
The `rm` command is not usually available when running on Win32 in a
`cmd.exe` shell. Instead the shell provides the `del` builtin, which
has somewhat more limited wildcars expansion and error handling.

This makes all of the Makefile targets work on Win32 both using
`cmd.exe` and using the MSYS environment.

Signed-off-by: Simon Richter <Simon.Richter@hogyros.de>
Signed-off-by: Andrea Canciani <ranma42@gmail.com>
Acked-by: Oded Gabbay <oded.gabbay@gmail.com>
2015-12-23 21:24:17 +01:00
Andrea Canciani
93b876c110 build: Do not use mkdir -p on Windows
When the build is performed using `cmd.exe` as shell, the `mkdir`
command does not support the `-p` flag. The ability to create multiple
netsted folder is not used, hence it can be easily replaced by only
creating the directory if it does not exist.

This makes the build work on the `cmd.exe` shell, except for the
`clean` targets.

Signed-off-by: Andrea Canciani <ranma42@gmail.com>
Acked-by: Oded Gabbay <oded.gabbay@gmail.com>
2015-12-23 21:24:06 +01:00
Andrea Canciani
cc35d01980 build: Avoid phony pixman target in test/Makefile.win32
Instead of explicitly depending on "pixman" for the "all" and "check"
targets, rely on the dependency to the .lib file

Signed-off-by: Andrea Canciani <ranma42@gmail.com>
Reviewed-by: Oded Gabbay <oded.gabbay@gmail.com>
2015-12-23 21:23:57 +01:00
Andrea Canciani
ceb49cbda9 build: Remove use of BUILT_SOURCES from Makefile.win32
Since 3d81d89c29 BUILT_SOURCES is not
used anymore, but it was unintentionally left in Win32 Makefiles.

Signed-off-by: Andrea Canciani <ranma42@gmail.com>
Reviewed-by: Oded Gabbay <oded.gabbay@gmail.com>
2015-12-23 21:23:46 +01:00
Oded Gabbay
ba1868a854 Post 0.34 branch creation version bump to 0.35.1
Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
2015-12-23 10:46:40 +02:00
Oded Gabbay
0e72e78086 Post-release version bump to 0.33.7
Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
2015-12-22 15:55:32 +02:00
188 changed files with 15000 additions and 29139 deletions

11
.editorconfig Normal file
View File

@ -0,0 +1,11 @@
# To use this config on you editor, follow the instructions at:
# http://editorconfig.org
root = true
[*]
tab_width = 8
[meson.build,meson_options.txt]
indent_style = space
indent_size = 2

1
.gitignore vendored
View File

@ -32,6 +32,7 @@ demos/clip-in
demos/linear-gradient
demos/quad2quad
demos/scale
demos/dither
pixman/pixman-srgb.c
pixman/pixman-version.h
test/*-test

View File

@ -0,0 +1,80 @@
# Docker build stage
#
# It builds a multi-arch image for all required architectures. Each image can be
# later easily used with properly configured Docker (which uses binfmt and QEMU
# underneath).
docker:
stage: docker
image: quay.io/buildah/stable
rules:
- if: "$CI_PIPELINE_SOURCE == 'merge_request_event' && $TARGET =~ $ACTIVE_TARGET_PATTERN"
changes:
paths:
- .gitlab-ci.d/01-docker.yml
- .gitlab-ci.d/01-docker/**/*
variables:
DOCKER_TAG: $CI_COMMIT_REF_SLUG
DOCKER_IMAGE_NAME: ${CI_REGISTRY_IMAGE}/pixman:${DOCKER_TAG}
- if: "$CI_PIPELINE_SOURCE == 'schedule' && $TARGET =~ $ACTIVE_TARGET_PATTERN"
- if: "$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $TARGET =~ $ACTIVE_TARGET_PATTERN"
- if: "$CI_COMMIT_TAG && $TARGET =~ $ACTIVE_TARGET_PATTERN"
variables:
# Use vfs with buildah. Docker offers overlayfs as a default, but Buildah
# cannot stack overlayfs on top of another overlayfs filesystem.
STORAGE_DRIVER: vfs
# Write all image metadata in the docker format, not the standard OCI
# format. Newer versions of docker can handle the OCI format, but older
# versions, like the one shipped with Fedora 30, cannot handle the format.
BUILDAH_FORMAT: docker
BUILDAH_ISOLATION: chroot
CACHE_IMAGE: ${CI_REGISTRY_IMAGE}/cache
CACHE_ARGS: --cache-from ${CACHE_IMAGE} --cache-to ${CACHE_IMAGE}
before_script:
# Login to the target registry.
- echo "${CI_REGISTRY_PASSWORD}" |
buildah login -u "${CI_REGISTRY_USER}" --password-stdin ${CI_REGISTRY}
# Docker Hub login is optional, and can be used to circumvent image pull
# quota for anonymous pulls for base images.
- echo "${DOCKERHUB_PASSWORD}" |
buildah login -u "${DOCKERHUB_USER}" --password-stdin docker.io ||
echo "Failed to login to Docker Hub."
parallel:
matrix:
- TARGET:
- linux-386
- linux-amd64
- linux-arm-v5
- linux-arm-v7
- linux-arm64-v8
- linux-mips
- linux-mips64el
- linux-mipsel
- linux-ppc
- linux-ppc64
- linux-ppc64le
- linux-riscv64
- windows-686
- windows-amd64
- windows-arm64-v8
script:
# Prepare environment.
- ${LOAD_TARGET_ENV}
- FULL_IMAGE_NAME=${DOCKER_IMAGE_NAME}-${TARGET}
# Build and push the image.
- buildah bud
--tag ${FULL_IMAGE_NAME}
--layers ${CACHE_ARGS}
--target ${TARGET}
--platform=${DOCKER_PLATFORM}
--build-arg BASE_IMAGE=${BASE_IMAGE}
--build-arg BASE_IMAGE_TAG=${BASE_IMAGE_TAG}
--build-arg LLVM_VERSION=${LLVM_VERSION}
-f Dockerfile .gitlab-ci.d/01-docker/
- buildah images
- buildah push ${FULL_IMAGE_NAME}

View File

@ -0,0 +1,150 @@
ARG BASE_IMAGE=docker.io/debian
ARG BASE_IMAGE_TAG=bookworm-slim
FROM ${BASE_IMAGE}:${BASE_IMAGE_TAG} AS base
LABEL org.opencontainers.image.title="Pixman build environment for platform coverage" \
org.opencontainers.image.authors="Marek Pikuła <m.pikula@partner.samsung.com>"
ARG DEBIAN_FRONTEND=noninteractive
ENV APT_UPDATE="apt-get update" \
APT_INSTALL="apt-get install -y --no-install-recommends" \
APT_CLEANUP="rm -rf /var/lib/apt/lists/* /var/cache/apt/archives/*"
ARG GCOVR_VERSION="~=7.2"
ARG MESON_VERSION="~=1.6"
RUN ${APT_UPDATE} \
&& ${APT_INSTALL} \
# Build dependencies.
build-essential \
ninja-build \
pkg-config \
qemu-user \
# pipx dependencies.
python3-argcomplete \
python3-packaging \
python3-pip \
python3-platformdirs \
python3-userpath \
python3-venv \
# gcovr dependencies.
libxml2-dev \
libxslt-dev \
python3-dev \
&& ${APT_CLEANUP} \
# Install pipx using pip to have a more recent version of pipx, which
# supports the `--global` flag.
&& pip install pipx --break-system-packages \
# Install a recent version of meson and gcovr using pipx to have the same
# version across all variants regardless of base.
&& pipx install --global \
gcovr${GCOVR_VERSION} \
meson${MESON_VERSION} \
&& gcovr --version \
&& echo Meson version: \
&& meson --version
FROM base AS llvm-base
# LLVM 16 is the highest available in Bookworm. Preferably, we should use the
# same version for all platforms, but it's not possible at the moment.
ARG LLVM_VERSION=16
RUN ${APT_UPDATE} \
&& ${APT_INSTALL} \
clang-${LLVM_VERSION} \
libclang-rt-${LLVM_VERSION}-dev \
lld-${LLVM_VERSION} \
llvm-${LLVM_VERSION} \
&& ${APT_CLEANUP} \
&& ln -f /usr/bin/clang-${LLVM_VERSION} /usr/bin/clang \
&& ln -f /usr/bin/lld-${LLVM_VERSION} /usr/bin/lld \
&& ln -f /usr/bin/llvm-ar-${LLVM_VERSION} /usr/bin/llvm-ar \
&& ln -f /usr/bin/llvm-strip-${LLVM_VERSION} /usr/bin/llvm-strip
FROM llvm-base AS native-base
ARG LLVM_VERSION=16
RUN ${APT_UPDATE} \
&& ${APT_INSTALL} \
# Runtime library dependencies.
libglib2.0-dev \
libgtk-3-dev \
libpng-dev \
# Install libomp-dev if available (OpenMP support for LLVM). It's done only
# for the native images, as OpenMP support in cross-build environment is
# tricky for LLVM.
&& (${APT_INSTALL} libomp-${LLVM_VERSION}-dev \
|| echo "OpenMP not available on this platform.") \
&& ${APT_CLEANUP}
# The following targets differ in BASE_IMAGE.
FROM native-base AS linux-386
FROM native-base AS linux-amd64
FROM native-base AS linux-arm-v5
FROM native-base AS linux-arm-v7
FROM native-base AS linux-arm64-v8
FROM native-base AS linux-mips64el
FROM native-base AS linux-mipsel
FROM native-base AS linux-ppc64le
FROM native-base AS linux-riscv64
# The following targets should have a common BASE_IMAGE.
FROM llvm-base AS linux-mips
RUN ${APT_UPDATE} \
&& ${APT_INSTALL} gcc-multilib-mips-linux-gnu \
&& ${APT_CLEANUP}
FROM llvm-base AS linux-ppc
RUN ${APT_UPDATE} \
&& ${APT_INSTALL} gcc-multilib-powerpc-linux-gnu \
&& ${APT_CLEANUP}
FROM llvm-base AS linux-ppc64
RUN ${APT_UPDATE} \
&& ${APT_INSTALL} gcc-multilib-powerpc64-linux-gnu \
&& ${APT_CLEANUP}
# We use a common image for Windows i686 and amd64, as it doesn't make sense to
# make them separate in terms of build time and image size. After two runs they
# should use the same cache layers, so in the end it makes the collective image
# size smaller.
FROM base AS windows-base
ARG LLVM_MINGW_RELEASE=20240619
ARG LLVM_MINGW_VARIANT=llvm-mingw-${LLVM_MINGW_RELEASE}-msvcrt-ubuntu-20.04-x86_64
RUN ${APT_UPDATE} \
&& ${APT_INSTALL} wget \
&& ${APT_CLEANUP} \
&& cd /opt \
&& wget https://github.com/mstorsjo/llvm-mingw/releases/download/${LLVM_MINGW_RELEASE}/${LLVM_MINGW_VARIANT}.tar.xz \
&& tar -xf ${LLVM_MINGW_VARIANT}.tar.xz \
&& rm -f ${LLVM_MINGW_VARIANT}.tar.xz
ENV PATH=${PATH}:/opt/${LLVM_MINGW_VARIANT}/bin
FROM windows-base AS windows-x86-base
RUN dpkg --add-architecture i386 \
&& ${APT_UPDATE} \
&& ${APT_INSTALL} \
gcc-mingw-w64-i686 \
gcc-mingw-w64-x86-64 \
mingw-w64-tools \
procps \
wine \
wine32 \
wine64 \
&& ${APT_CLEANUP} \
# Inspired by https://code.videolan.org/videolan/docker-images
&& wine wineboot --init \
&& while pgrep wineserver > /dev/null; do \
echo "waiting ..."; \
sleep 1; \
done \
&& rm -rf /tmp/wine-*
FROM windows-x86-base AS windows-686
FROM windows-x86-base AS windows-amd64
# aarch64 image requires linaro/wine-arm64 as a base.
FROM windows-base AS windows-arm64-v8
RUN wine-arm64 wineboot --init \
&& while pgrep wineserver > /dev/null; do \
echo "waiting ..."; \
sleep 1; \
done \
&& rm -rf /tmp/wine-*

View File

@ -0,0 +1,4 @@
DOCKER_PLATFORM=linux/386
BASE_IMAGE=docker.io/i386/debian
BASE_IMAGE_TAG=bookworm-slim
LLVM_VERSION=16

View File

@ -0,0 +1,4 @@
DOCKER_PLATFORM=linux/amd64
BASE_IMAGE=docker.io/amd64/debian
BASE_IMAGE_TAG=bookworm-slim
LLVM_VERSION=16

View File

@ -0,0 +1,4 @@
DOCKER_PLATFORM=linux/arm/v5
BASE_IMAGE=docker.io/arm32v5/debian
BASE_IMAGE_TAG=bookworm-slim
LLVM_VERSION=16

View File

@ -0,0 +1,4 @@
DOCKER_PLATFORM=linux/arm/v7
BASE_IMAGE=docker.io/arm32v7/debian
BASE_IMAGE_TAG=bookworm-slim
LLVM_VERSION=16

View File

@ -0,0 +1,4 @@
DOCKER_PLATFORM=linux/arm64/v8
BASE_IMAGE=docker.io/arm64v8/debian
BASE_IMAGE_TAG=bookworm-slim
LLVM_VERSION=16

View File

@ -0,0 +1,4 @@
DOCKER_PLATFORM=linux/amd64
BASE_IMAGE=docker.io/amd64/debian
BASE_IMAGE_TAG=bookworm-slim
LLVM_VERSION=16

View File

@ -0,0 +1,4 @@
DOCKER_PLATFORM=linux/mips64el
BASE_IMAGE=docker.io/mips64le/debian
BASE_IMAGE_TAG=bookworm-slim
LLVM_VERSION=16

View File

@ -0,0 +1,4 @@
DOCKER_PLATFORM=linux/mipsel
BASE_IMAGE=docker.io/serenitycode/debian-debootstrap
BASE_IMAGE_TAG=mipsel-bookworm-slim
LLVM_VERSION=14

View File

@ -0,0 +1 @@
linux-amd64.env

View File

@ -0,0 +1 @@
linux-amd64.env

View File

@ -0,0 +1,4 @@
DOCKER_PLATFORM=linux/ppc64le
BASE_IMAGE=docker.io/ppc64le/debian
BASE_IMAGE_TAG=bookworm-slim
LLVM_VERSION=16

View File

@ -0,0 +1,4 @@
DOCKER_PLATFORM=linux/riscv64
BASE_IMAGE=docker.io/riscv64/debian
BASE_IMAGE_TAG=sid-slim
LLVM_VERSION=18

View File

@ -0,0 +1 @@
linux-amd64.env

View File

@ -0,0 +1 @@
linux-amd64.env

View File

@ -0,0 +1,3 @@
DOCKER_PLATFORM=linux/amd64
BASE_IMAGE=docker.io/linaro/wine-arm64
BASE_IMAGE_TAG=latest

107
.gitlab-ci.d/02-build.yml Normal file
View File

@ -0,0 +1,107 @@
# Build stage
#
# This stage builds pixman with enabled coverage for all supported
# architectures.
#
# Some targets don't support atomic profile update, so to decrease the number of
# gcov errors, they need to be built without OpenMP (single threaded) by adding
# `-Dopenmp=disabled` Meson argument.
variables:
# Used in test stage as well.
BUILD_DIR: build-${TOOLCHAIN}
# Applicable to all build targets.
include:
- local: .gitlab-ci.d/templates/build.yml
inputs:
target: linux-386
- local: .gitlab-ci.d/templates/build.yml
inputs:
target: linux-amd64
- local: .gitlab-ci.d/templates/build.yml
inputs:
target: linux-arm-v5
qemu_cpu: arm1136
# Disable coverage, as the tests take too long to run with a single thread.
enable_gnu_coverage: false
- local: .gitlab-ci.d/templates/build.yml
inputs:
target: linux-arm-v7
qemu_cpu: max
- local: .gitlab-ci.d/templates/build.yml
inputs:
target: linux-arm64-v8
qemu_cpu: max
- local: .gitlab-ci.d/templates/build.yml
inputs:
target: linux-mips
toolchain: [gnu]
qemu_cpu: 74Kf
enable_gnu_coverage: false
# TODO: Merge with the one above once the following issue is resolved:
# https://gitlab.freedesktop.org/pixman/pixman/-/issues/105).
- local: .gitlab-ci.d/templates/build.yml
inputs:
target: linux-mips
toolchain: [llvm]
qemu_cpu: 74Kf
job_name_prefix: "."
job_name_suffix: ":failing"
allow_failure: true
retry: 0
- local: .gitlab-ci.d/templates/build.yml
inputs:
target: linux-mips64el
qemu_cpu: Loongson-3A4000
- local: .gitlab-ci.d/templates/build.yml
inputs:
target: linux-mipsel
toolchain: [gnu]
qemu_cpu: 74Kf
# Disable coverage, as the tests take too long to run with a single thread.
enable_gnu_coverage: false
# TODO: Merge with the one above once the following issue is resolved:
# https://gitlab.freedesktop.org/pixman/pixman/-/issues/105).
- local: .gitlab-ci.d/templates/build.yml
inputs:
target: linux-mipsel
toolchain: [llvm]
qemu_cpu: 74Kf
job_name_prefix: "."
job_name_suffix: ":failing"
allow_failure: true
retry: 0
- local: .gitlab-ci.d/templates/build.yml
inputs:
target: linux-ppc
qemu_cpu: g4
enable_gnu_coverage: false
- local: .gitlab-ci.d/templates/build.yml
inputs:
target: linux-ppc64
qemu_cpu: ppc64
enable_gnu_coverage: false
- local: .gitlab-ci.d/templates/build.yml
inputs:
target: linux-ppc64le
qemu_cpu: power10
- local: .gitlab-ci.d/templates/build.yml
inputs:
target: linux-riscv64
qemu_cpu: rv64
- local: .gitlab-ci.d/templates/build.yml
inputs:
target: windows-686
enable_gnu_coverage: false
- local: .gitlab-ci.d/templates/build.yml
inputs:
target: windows-amd64
enable_gnu_coverage: false
- local: .gitlab-ci.d/templates/build.yml
inputs:
target: windows-arm64-v8
toolchain: [llvm] # GNU toolchain doesn't seem to support Windows on ARM.
qemu_cpu: max
enable_gnu_coverage: false

175
.gitlab-ci.d/03-test.yml Normal file
View File

@ -0,0 +1,175 @@
# Test stage
#
# This stage executes the test suite for pixman for all architectures in
# different configurations. Build and test is split, as some architectures can
# have different QEMU configuration or have multiple supported pixman backends,
# which are executed as job matrix.
#
# Mind that `PIXMAN_ENABLE` variable in matrix runs does nothing, but it looks
# better in CI to indicate what is actually being tested.
#
# Some emulated targets are really slow or cannot be run in multithreaded mode
# (mipsel, arm-v5). Thus coverage reporting is disabled for them.
variables:
# Used in summary stage as well.
COVERAGE_BASE_DIR: coverage
COVERAGE_OUT: ${COVERAGE_BASE_DIR}/${CI_JOB_ID}
TEST_NAME: "" # Allow to specify a set of tests to run with run variables.
include:
- local: .gitlab-ci.d/templates/test.yml
inputs:
target: linux-386
toolchain: [gnu]
pixman_disable:
- "sse2 ssse3" # Testing "mmx"
- "mmx ssse3" # Testing "sse2"
- "mmx sse2" # Testing "ssse3"
# TODO: Merge up after resolving
# https://gitlab.freedesktop.org/pixman/pixman/-/issues/106
- local: .gitlab-ci.d/templates/test.yml
inputs:
target: linux-386
toolchain: [llvm]
pixman_disable:
# Same as above.
- "sse2 ssse3"
- "mmx ssse3"
- "mmx sse2"
job_name_prefix: "."
job_name_suffix: ":failing"
allow_failure: true
retry: 0
- local: .gitlab-ci.d/templates/test.yml
inputs:
target: linux-amd64
pixman_disable:
- ""
- "fast"
- "wholeops"
- local: .gitlab-ci.d/templates/test.yml
inputs:
target: linux-arm-v5
toolchain: [gnu]
qemu_cpu: [arm1136]
pixman_disable: ["arm-neon"] # Test only arm-simd.
timeout: 3h
test_timeout_multiplier: 40
# TODO: Merge up after resolving
# https://gitlab.freedesktop.org/pixman/pixman/-/issues/107
- local: .gitlab-ci.d/templates/test.yml
inputs:
target: linux-arm-v5
toolchain: [llvm]
qemu_cpu: [arm1136]
pixman_disable: ["arm-neon"] # Test only arm-simd.
timeout: 3h
test_timeout_multiplier: 40
job_name_prefix: "."
job_name_suffix: ":failing"
allow_failure: true
retry: 0
- local: .gitlab-ci.d/templates/test.yml
inputs:
target: linux-arm-v7
qemu_cpu: [max]
- local: .gitlab-ci.d/templates/test.yml
inputs:
target: linux-arm64-v8
qemu_cpu: [max]
- local: .gitlab-ci.d/templates/test.yml
inputs:
target: linux-mips
toolchain: [gnu] # TODO: Add llvm once the build is fixed.
qemu_cpu: [74Kf]
job_name_prefix: "."
job_name_suffix: ":failing"
allow_failure: true # Some tests seem to fail.
retry: 0
- local: .gitlab-ci.d/templates/test.yml
inputs:
target: linux-mips64el
toolchain: [gnu]
qemu_cpu: [Loongson-3A4000]
# TODO: Merge up after resolving
# https://gitlab.freedesktop.org/pixman/pixman/-/issues/108
- local: .gitlab-ci.d/templates/test.yml
inputs:
target: linux-mips64el
toolchain: [llvm]
qemu_cpu: [Loongson-3A4000]
job_name_prefix: "."
job_name_suffix: ":failing"
allow_failure: true
retry: 0
- local: .gitlab-ci.d/templates/test.yml
inputs:
target: linux-mipsel
toolchain: [gnu] # TODO: Add llvm once the build is fixed.
qemu_cpu: [74Kf]
timeout: 2h
- local: .gitlab-ci.d/templates/test.yml
inputs:
target: linux-ppc
qemu_cpu: [g4]
job_name_prefix: "."
job_name_suffix: ":failing"
allow_failure: true # SIGILL for some tests
retry: 0
- local: .gitlab-ci.d/templates/test.yml
inputs:
target: linux-ppc64
qemu_cpu: [ppc64]
job_name_prefix: "."
job_name_suffix: ":failing"
allow_failure: true # SIGSEGV for some tests
retry: 0
- local: .gitlab-ci.d/templates/test.yml
inputs:
target: linux-ppc64le
toolchain: [gnu]
qemu_cpu: [power10]
# TODO: Merge up after resolving
# https://gitlab.freedesktop.org/pixman/pixman/-/issues/109
- local: .gitlab-ci.d/templates/test.yml
inputs:
target: linux-ppc64le
toolchain: [llvm]
qemu_cpu: [power10]
job_name_prefix: "."
job_name_suffix: ":failing"
allow_failure: true
retry: 0
- local: .gitlab-ci.d/templates/test.yml
inputs:
target: linux-riscv64
qemu_cpu:
# Test on target without RVV (verify no autovectorization).
- rv64,v=false
# Test correctness for different VLENs.
- rv64,v=true,vext_spec=v1.0,vlen=128,elen=64
- rv64,v=true,vext_spec=v1.0,vlen=256,elen=64
- rv64,v=true,vext_spec=v1.0,vlen=512,elen=64
- rv64,v=true,vext_spec=v1.0,vlen=1024,elen=64
- local: .gitlab-ci.d/templates/test.yml
inputs:
target: windows-686
pixman_disable:
# The same as for linux-386.
- "sse2 ssse3"
- "mmx ssse3"
- "mmx sse2"
- local: .gitlab-ci.d/templates/test.yml
inputs:
target: windows-amd64
pixman_disable:
# The same as for linux-amd64.
- ""
- "fast"
- "wholeops"
- local: .gitlab-ci.d/templates/test.yml
inputs:
target: windows-arm64-v8
toolchain: [llvm]
qemu_cpu: [max]

View File

@ -0,0 +1,47 @@
# Summary stage
#
# This stage takes coverage reports from test runs for all architectures, and
# merges it into a single report, with GitLab visualization. There is also an
# HTML report generated as a separate artifact.
summary:
extends: .target:all
stage: summary
variables:
TARGET: linux-amd64
COVERAGE_SUMMARY_DIR: ${COVERAGE_BASE_DIR}/summary
needs:
- job: test:linux-386
optional: true
- job: test:linux-amd64
optional: true
- job: test:linux-arm-v7
optional: true
- job: test:linux-arm64-v8
optional: true
- job: test:linux-mips64el
optional: true
- job: test:linux-ppc64le
optional: true
- job: test:linux-riscv64
optional: true
script:
- echo "Input coverage reports:" && ls ${COVERAGE_BASE_DIR}/*.json || (echo "No coverage reports available." && exit)
- |
args=( )
for f in ${COVERAGE_BASE_DIR}/*.json; do
args+=( "-a" "$f" )
done
- mkdir -p ${COVERAGE_SUMMARY_DIR}
- gcovr "${args[@]}"
--cobertura-pretty --cobertura ${COVERAGE_SUMMARY_DIR}/coverage.xml
--html-details ${COVERAGE_SUMMARY_DIR}/coverage.html
--txt --print-summary
coverage: '/^TOTAL.*\s+(\d+\%)$/'
artifacts:
reports:
coverage_report:
coverage_format: cobertura
path: ${COVERAGE_SUMMARY_DIR}/coverage.xml
paths:
- ${COVERAGE_SUMMARY_DIR}/

View File

@ -0,0 +1 @@
native-gnu.meson

View File

@ -0,0 +1 @@
native-llvm.meson

View File

@ -0,0 +1 @@
native-gnu.meson

View File

@ -0,0 +1 @@
native-llvm.meson

View File

@ -0,0 +1 @@
native-gnu-noopenmp.meson

View File

@ -0,0 +1 @@
native-llvm-noopenmp.meson

View File

@ -0,0 +1 @@
native-gnu.meson

View File

@ -0,0 +1 @@
native-llvm.meson

View File

@ -0,0 +1 @@
native-gnu.meson

View File

@ -0,0 +1 @@
native-llvm.meson

View File

@ -0,0 +1,11 @@
[binaries]
c = ['mips-linux-gnu-gcc', '-DCI_HAS_ALL_MIPS_CPU_FEATURES']
ar = 'mips-linux-gnu-ar'
strip = 'mips-linux-gnu-strip'
exe_wrapper = ['qemu-mips', '-L', '/usr/mips-linux-gnu/']
[host_machine]
system = 'linux'
cpu_family = 'mips32'
cpu = 'mips32'
endian = 'big'

View File

@ -0,0 +1,14 @@
[binaries]
c = ['clang', '-target', 'mips-linux-gnu', '-fPIC', '-DCI_HAS_ALL_MIPS_CPU_FEATURES']
ar = 'llvm-ar'
strip = 'llvm-strip'
exe_wrapper = ['qemu-mips', '-L', '/usr/mips-linux-gnu/']
[built-in options]
c_link_args = ['-target', 'mips-linux-gnu', '-fuse-ld=lld']
[host_machine]
system = 'linux'
cpu_family = 'mips32'
cpu = 'mips32'
endian = 'big'

View File

@ -0,0 +1,8 @@
[binaries]
c = ['gcc', '-DCI_HAS_ALL_MIPS_CPU_FEATURES']
ar = 'ar'
strip = 'strip'
pkg-config = 'pkg-config'
[project options]
mips-dspr2 = 'disabled'

View File

@ -0,0 +1,8 @@
[binaries]
c = ['clang', '-DCI_HAS_ALL_MIPS_CPU_FEATURES']
ar = 'llvm-ar'
strip = 'llvm-strip'
pkg-config = 'pkg-config'
[project options]
mips-dspr2 = 'disabled'

View File

@ -0,0 +1 @@
native-gnu-noopenmp.meson

View File

@ -0,0 +1 @@
native-llvm-noopenmp.meson

View File

@ -0,0 +1,11 @@
[binaries]
c = 'powerpc-linux-gnu-gcc'
ar = 'powerpc-linux-gnu-ar'
strip = 'powerpc-linux-gnu-strip'
exe_wrapper = ['qemu-ppc', '-L', '/usr/powerpc-linux-gnu']
[host_machine]
system = 'linux'
cpu_family = 'ppc'
cpu = 'ppc'
endian = 'big'

View File

@ -0,0 +1,15 @@
[binaries]
c = ['clang', '-target', 'powerpc-linux-gnu']
ar = 'llvm-ar'
strip = 'llvm-strip'
exe_wrapper = ['qemu-ppc', '-L', '/usr/powerpc-linux-gnu/']
[built-in options]
# We cannot use LLD, as it doesn't support big-endian PPC.
c_link_args = ['-target', 'powerpc-linux-gnu']
[host_machine]
system = 'linux'
cpu_family = 'ppc'
cpu = 'ppc'
endian = 'big'

View File

@ -0,0 +1,11 @@
[binaries]
c = 'powerpc64-linux-gnu-gcc'
ar = 'powerpc64-linux-gnu-ar'
strip = 'powerpc64-linux-gnu-strip'
exe_wrapper = ['qemu-ppc64', '-L', '/usr/powerpc64-linux-gnu/']
[host_machine]
system = 'linux'
cpu_family = 'ppc64'
cpu = 'ppc64'
endian = 'big'

View File

@ -0,0 +1,15 @@
[binaries]
c = ['clang', '-target', 'powerpc64-linux-gnu']
ar = 'llvm-ar'
strip = 'llvm-strip'
exe_wrapper = ['qemu-ppc64', '-L', '/usr/powerpc64-linux-gnu/']
[built-in options]
# We cannot use LLD, as it doesn't support big-endian PPC.
c_link_args = ['-target', 'powerpc64-linux-gnu']
[host_machine]
system = 'linux'
cpu_family = 'ppc64'
cpu = 'ppc64'
endian = 'big'

View File

@ -0,0 +1 @@
native-gnu.meson

View File

@ -0,0 +1 @@
native-llvm.meson

View File

@ -0,0 +1 @@
native-gnu.meson

View File

@ -0,0 +1 @@
native-llvm.meson

View File

@ -0,0 +1,8 @@
[binaries]
c = ['gcc', '-DCI_HAS_ALL_MIPS_CPU_FEATURES']
ar = 'ar'
strip = 'strip'
pkg-config = 'pkg-config'
[project options]
openmp = 'disabled'

View File

@ -0,0 +1,5 @@
[binaries]
c = 'gcc'
ar = 'ar'
strip = 'strip'
pkg-config = 'pkg-config'

View File

@ -0,0 +1,8 @@
[binaries]
c = ['clang', '-DCI_HAS_ALL_MIPS_CPU_FEATURES']
ar = 'llvm-ar'
strip = 'llvm-strip'
pkg-config = 'pkg-config'
[project options]
openmp = 'disabled'

View File

@ -0,0 +1,5 @@
[binaries]
c = 'clang'
ar = 'llvm-ar'
strip = 'llvm-strip'
pkg-config = 'pkg-config'

View File

@ -0,0 +1,18 @@
[binaries]
c = 'i686-w64-mingw32-gcc'
ar = 'i686-w64-mingw32-ar'
strip = 'i686-w64-mingw32-strip'
windres = 'i686-w64-mingw32-windres'
exe_wrapper = 'wine'
[built-in options]
c_link_args = ['-static-libgcc']
[host_machine]
system = 'windows'
cpu_family = 'x86'
cpu = 'i686'
endian = 'little'
[project options]
openmp = 'disabled'

View File

@ -0,0 +1,18 @@
[binaries]
c = 'i686-w64-mingw32-clang'
ar = 'i686-w64-mingw32-llvm-ar'
strip = 'i686-w64-mingw32-strip'
windres = 'i686-w64-mingw32-windres'
exe_wrapper = 'wine'
[built-in options]
c_link_args = ['-static']
[project options]
openmp = 'disabled'
[host_machine]
system = 'windows'
cpu_family = 'x86'
cpu = 'i686'
endian = 'little'

View File

@ -0,0 +1,15 @@
[binaries]
c = 'x86_64-w64-mingw32-gcc'
ar = 'x86_64-w64-mingw32-ar'
strip = 'x86_64-w64-mingw32-strip'
windres = 'x86_64-w64-mingw32-windres'
exe_wrapper = 'wine'
[built-in options]
c_link_args = ['-static-libgcc']
[host_machine]
system = 'windows'
cpu_family = 'x86_64'
cpu = 'x86_64'
endian = 'little'

View File

@ -0,0 +1,20 @@
[binaries]
c = 'x86_64-w64-mingw32-clang'
ar = 'x86_64-w64-mingw32-llvm-ar'
strip = 'x86_64-w64-mingw32-strip'
windres = 'x86_64-w64-mingw32-windres'
exe_wrapper = 'wine'
[built-in options]
# Static linking is a workaround around `libwinpthread-1` not being discovered correctly.
c_link_args = ['-static']
[project options]
# OpenMP is disabled as it is not being discovered correctly during tests.
openmp = 'disabled'
[host_machine]
system = 'windows'
cpu_family = 'x86_64'
cpu = 'x86_64'
endian = 'little'

View File

@ -0,0 +1,18 @@
[binaries]
c = 'aarch64-w64-mingw32-clang'
ar = 'aarch64-w64-mingw32-llvm-ar'
strip = 'aarch64-w64-mingw32-strip'
windres = 'aarch64-w64-mingw32-windres'
exe_wrapper = 'wine-arm64'
[built-in options]
c_link_args = ['-static']
[project options]
openmp = 'disabled'
[host_machine]
system = 'windows'
cpu_family = 'aarch64'
cpu = 'aarch64'
endian = 'little'

View File

@ -0,0 +1,65 @@
# This file contains the set of jobs run by the pixman project:
# https://gitlab.freedesktop.org/pixman/pixman/-/pipelines
stages:
- docker
- build
- test
- summary
variables:
# Make it possible to change RUNNER_TAG from GitLab variables. The default
# `kvm` tag has been tested with FDO infrastructure.
RUNNER_TAG: kvm
# Docker image global configuration.
DOCKER_TAG: latest
DOCKER_IMAGE_NAME: registry.freedesktop.org/pixman/pixman/pixman:${DOCKER_TAG}
# Execute to load a target-specific environment.
LOAD_TARGET_ENV: source .gitlab-ci.d/01-docker/target-env/${TARGET}.env
# Enable/disable specific targets for code and platform coverage targets.
ACTIVE_TARGET_PATTERN: '/linux-386|linux-amd64|linux-arm-v5|linux-arm-v7|linux-arm64-v8|linux-mips|linux-mips64el|linux-mipsel|linux-ppc|linux-ppc64|linux-ppc64le|linux-riscv64|windows-686|windows-amd64|windows-arm64-v8/i'
workflow:
rules:
# Use modified Docker image if building in MR and Docker image is affected
# by the MR.
- if: $CI_PIPELINE_SOURCE == 'merge_request_event'
changes:
paths:
- .gitlab-ci.d/01-docker.yml
- .gitlab-ci.d/01-docker/**/*
variables:
DOCKER_TAG: $CI_COMMIT_REF_SLUG
DOCKER_IMAGE_NAME: ${CI_REGISTRY_IMAGE}/pixman:${DOCKER_TAG}
# A standard set of GitLab CI triggers (i.e., MR, schedule, default branch,
# and tag).
- if: $CI_PIPELINE_SOURCE == 'merge_request_event'
- if: $CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS
when: never
- if: $CI_PIPELINE_SOURCE == 'schedule'
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
- if: $CI_COMMIT_BRANCH
- if: $CI_COMMIT_TAG
auto_cancel:
on_new_commit: conservative
on_job_failure: all
default:
tags:
- $RUNNER_TAG
# Retry in case the runner is misconfigured for multi-arch builds or some
# random unexpected runner error occurs (it happened during testing).
retry: 1
include:
- local: "/.gitlab-ci.d/templates/targets.yml"
- local: "/.gitlab-ci.d/01-docker.yml"
- local: "/.gitlab-ci.d/02-build.yml"
- local: "/.gitlab-ci.d/03-test.yml"
- local: "/.gitlab-ci.d/04-summary.yml"

View File

@ -0,0 +1,80 @@
spec:
inputs:
target:
description:
Build target in form of "OS-ARCH" pair (e.g., linux-amd64). Mostly the
same as platform string for Docker but with a hyphen instead of slash.
toolchain:
description:
An array of toolchains to test with. Each toolchain should have an
appropriate Meson cross file.
type: array
default: [gnu, llvm]
qemu_cpu:
description:
QEMU_CPU environmental variable used by Docker (which uses QEMU
underneath). It is not used by x86 targets, as they are executed
natively on the host.
default: ""
enable_gnu_coverage:
description:
Enable coverage build flags. It can be later used to compile a coverage
report for all the jobs. Should be enabled only for native build
environments as they have all the optional dependencies, and are the
most reliable and uniform (so disable for cross environments).
type: boolean
default: true
job_name_prefix:
description:
Additional prefix for the job name. Can be used to disable a job with a
"." prefix.
default: ""
job_name_suffix:
description:
Additional suffix for the job name. Can be used to prevent job
duplication for jobs for the same target.
default: ""
allow_failure:
description:
Set the `allow_failure` flag for jobs that are expected to fail.
Remember to set `retry` argument to 0 to prevent unnecessary retries.
type: boolean
default: false
retry:
description:
Set the `retry` flag for a job. Usually used together with
`allow_failure`.
type: number
default: 1
---
"$[[ inputs.job_name_prefix ]]build:$[[ inputs.target ]]$[[ inputs.job_name_suffix ]]":
extends: .target:all
stage: build
allow_failure: $[[ inputs.allow_failure ]]
retry: $[[ inputs.retry ]]
needs:
- job: docker
optional: true
parallel:
matrix:
- TARGET: $[[ inputs.target ]]
variables:
TARGET: $[[ inputs.target ]]
QEMU_CPU: $[[ inputs.qemu_cpu ]]
parallel:
matrix:
- TOOLCHAIN: $[[ inputs.toolchain ]]
script:
- |
if [ "$[[ inputs.enable_gnu_coverage ]]" == "true" ] && [ "${TOOLCHAIN}" == "gnu" ]; then
COV_C_ARGS=-fprofile-update=atomic
COV_MESON_BUILD_ARGS=-Db_coverage=true
fi
- meson setup ${BUILD_DIR}
--cross-file .gitlab-ci.d/meson-cross/${TARGET}-${TOOLCHAIN}.meson
-Dc_args="${COV_C_ARGS}" ${COV_MESON_BUILD_ARGS}
- meson compile -C ${BUILD_DIR}
artifacts:
paths:
- ${BUILD_DIR}/

View File

@ -0,0 +1,9 @@
# General target templates.
.target:all:
image:
name: $DOCKER_IMAGE_NAME-$TARGET
rules:
- if: "$TARGET =~ $ACTIVE_TARGET_PATTERN"
before_script:
- ${LOAD_TARGET_ENV}

View File

@ -0,0 +1,112 @@
spec:
inputs:
target:
description:
Build target in form of "OS-ARCH" pair (e.g., linux-amd64). Mostly the
same as platform string for Docker but with a hyphen instead of slash.
toolchain:
description:
An array of toolchains to test with. Each toolchain should have an
appropriate Meson cross file.
type: array
default: [gnu, llvm]
qemu_cpu:
description:
An array of QEMU_CPU environmental variables used as a job matrix
variable, and in turn by Docker (which uses QEMU underneath). It is not
used by x86 targets, as they are executed natively on the host.
type: array
default: [""]
pixman_disable:
description:
An array of PIXMAN_DISABLE targets used as a job matrix variable.
type: array
default: [""]
timeout:
description:
GitLab job timeout property. May need to be increased for slow
targets.
default: 1h
test_timeout_multiplier:
description:
Test timeout multiplier flag used for Meson test execution. May need to
be increased for slow targets.
type: number
default: 20
meson_testthreads:
description:
Sets MESON_TESTTHREADS environmental variable. For some platforms, the
tests should be executed one by one (without multithreading) to prevent
gcovr errors.
type: number
default: 0
gcovr_flags:
description:
Additional flags passed to gcovr tool.
default: ""
job_name_prefix:
description:
Additional prefix for the job name. Can be used to disable a job with a
"." prefix.
default: ""
job_name_suffix:
description:
Additional suffix for the job name. Can be used to prevent job
duplication for jobs for the same target.
default: ""
allow_failure:
description:
Set the `allow_failure` flag for jobs that are expected to fail.
Remember to set `retry` argument to 0 to prevent unnecessary retries.
type: boolean
default: false
retry:
description:
Set the `retry` flag for a job. Usually used together with
`allow_failure`.
type: number
default: 1
---
"$[[ inputs.job_name_prefix ]]test:$[[ inputs.target ]]$[[ inputs.job_name_suffix ]]":
extends: .target:all
stage: test
allow_failure: $[[ inputs.allow_failure ]]
retry: $[[ inputs.retry ]]
timeout: $[[ inputs.timeout ]]
needs:
- job: docker
optional: true
parallel:
matrix:
- TARGET: $[[ inputs.target ]]
- job: build:$[[ inputs.target ]]
parallel:
matrix:
- TOOLCHAIN: $[[ inputs.toolchain ]]
variables:
TARGET: $[[ inputs.target ]]
TEST_TIMEOUT_MULTIPLIER: $[[ inputs.test_timeout_multiplier ]]
GCOVR_FLAGS: $[[ inputs.gcovr_flags ]]
MESON_ARGS: -t ${TEST_TIMEOUT_MULTIPLIER} --no-rebuild -v ${TEST_NAME}
MESON_TESTTHREADS: $[[ inputs.meson_testthreads ]]
parallel:
matrix:
- TOOLCHAIN: $[[ inputs.toolchain ]]
PIXMAN_DISABLE: $[[ inputs.pixman_disable ]]
QEMU_CPU: $[[ inputs.qemu_cpu ]]
script:
- meson test -C ${BUILD_DIR} ${MESON_ARGS}
after_script:
- mkdir -p ${COVERAGE_OUT}
- gcovr ${GCOVR_FLAGS} -r ./ ${BUILD_DIR} -e ./subprojects
--json ${COVERAGE_OUT}.json
--html-details ${COVERAGE_OUT}/coverage.html
--print-summary || echo "No coverage data available."
artifacts:
paths:
- ${BUILD_DIR}/meson-logs/testlog.txt
- ${COVERAGE_BASE_DIR}/
reports:
junit:
- ${BUILD_DIR}/meson-logs/testlog.junit.xml

16
.gitlab-ci.yml Normal file
View File

@ -0,0 +1,16 @@
#
# This is the GitLab CI configuration file for the mainstream pixman project:
# https://gitlab.freedesktop.org/pixman/pixman/-/pipelines
#
# !!! DO NOT ADD ANY NEW CONFIGURATION TO THIS FILE !!!
#
# Only documentation or comments is accepted.
#
# To use a different set of jobs than the mainstream project, you need to set
# the location of your custom yml file at "custom CI/CD configuration path", on
# your GitLab CI namespace:
# https://docs.gitlab.com/ee/ci/pipelines/settings.html#custom-cicd-configuration-path
#
include:
- local: '/.gitlab-ci.d/pixman-project.yml'

25114
ChangeLog

File diff suppressed because it is too large Load Diff

View File

@ -1,137 +0,0 @@
SUBDIRS = pixman demos test
pkgconfigdir=$(libdir)/pkgconfig
pkgconfig_DATA=pixman-1.pc
$(pkgconfig_DATA): pixman-1.pc.in
snapshot:
distdir="$(distdir)-`date '+%Y%m%d'`"; \
test -d "$(srcdir)/.git" && distdir=$$distdir-`cd "$(srcdir)" && git rev-parse HEAD | cut -c 1-6`; \
$(MAKE) $(AM_MAKEFLAGS) distdir="$$distdir" dist
GPGKEY=3892336E
USERNAME=$$USER
RELEASE_OR_SNAPSHOT = $$(if test "x$(PIXMAN_VERSION_MINOR)" = "x$$(echo "$(PIXMAN_VERSION_MINOR)/2*2" | bc)" ; then echo release; else echo snapshot; fi)
RELEASE_CAIRO_HOST = $(USERNAME)@cairographics.org
RELEASE_CAIRO_DIR = /srv/cairo.freedesktop.org/www/$(RELEASE_OR_SNAPSHOT)s
RELEASE_CAIRO_URL = http://cairographics.org/$(RELEASE_OR_SNAPSHOT)s
RELEASE_XORG_URL = http://xorg.freedesktop.org/archive/individual/lib
RELEASE_XORG_HOST = $(USERNAME)@xorg.freedesktop.org
RELEASE_XORG_DIR = /srv/xorg.freedesktop.org/archive/individual/lib
RELEASE_ANNOUNCE_LIST = cairo-announce@cairographics.org, xorg-announce@lists.freedesktop.org, pixman@lists.freedesktop.org
EXTRA_DIST = \
Makefile.win32 \
Makefile.win32.common
tar_gz = $(PACKAGE)-$(VERSION).tar.gz
tar_bz2 = $(PACKAGE)-$(VERSION).tar.bz2
sha1_tgz = $(tar_gz).sha1
md5_tgz = $(tar_gz).md5
sha1_tbz2 = $(tar_bz2).sha1
md5_tbz2 = $(tar_bz2).md5
gpg_file = $(sha1_tgz).asc
$(sha1_tgz): $(tar_gz)
sha1sum $^ > $@
$(md5_tgz): $(tar_gz)
md5sum $^ > $@
$(sha1_tbz2): $(tar_bz2)
sha1sum $^ > $@
$(md5_tbz2): $(tar_bz2)
md5sum $^ > $@
$(gpg_file): $(sha1_tgz)
@echo "Please enter your GPG password to sign the checksum."
gpg --armor --sign $^
HASHFILES = $(sha1_tgz) $(sha1_tbz2) $(md5_tgz) $(md5_tbz2)
release-verify-newer:
@echo -n "Checking that no $(VERSION) release already exists at $(RELEASE_XORG_HOST)..."
@ssh $(RELEASE_XORG_HOST) test ! -e $(RELEASE_XORG_DIR)/$(tar_gz) \
|| (echo "Ouch." && echo "Found: $(RELEASE_XORG_HOST):$(RELEASE_XORG_DIR)/$(tar_gz)" \
&& echo "Refusing to try to generate a new release of the same name." \
&& false)
@ssh $(RELEASE_CAIRO_HOST) test ! -e $(RELEASE_CAIRO_DIR)/$(tar_gz) \
|| (echo "Ouch." && echo "Found: $(RELEASE_CAIRO_HOST):$(RELEASE_CAIRO_DIR)/$(tar_gz)" \
&& echo "Refusing to try to generate a new release of the same name." \
&& false)
@echo "Good."
release-remove-old:
$(RM) $(tar_gz) $(tar_bz2) $(HASHFILES) $(gpg_file)
ensure-prev:
@if [[ "$(PREV)" == "" ]]; then \
echo "" && \
echo "You must set the PREV variable on the make command line to" && \
echo "the last version." && \
echo "" && \
echo "For example:" && \
echo " make PREV=0.7.3" && \
echo "" && \
false; \
fi
release-check: ensure-prev release-verify-newer release-remove-old distcheck
release-tag:
git tag -u $(GPGKEY) -m "$(PACKAGE) $(VERSION) release" $(PACKAGE)-$(VERSION)
release-upload: release-check $(tar_gz) $(tar_bz2) $(sha1_tgz) $(sha1_tbz2) $(md5_tgz) $(gpg_file)
scp $(tar_gz) $(sha1_tgz) $(gpg_file) $(RELEASE_CAIRO_HOST):$(RELEASE_CAIRO_DIR)
scp $(tar_gz) $(tar_bz2) $(RELEASE_XORG_HOST):$(RELEASE_XORG_DIR)
ssh $(RELEASE_CAIRO_HOST) "rm -f $(RELEASE_CAIRO_DIR)/LATEST-$(PACKAGE)-[0-9]* && ln -s $(tar_gz) $(RELEASE_CAIRO_DIR)/LATEST-$(PACKAGE)-$(VERSION)"
RELEASE_TYPE = $$(if test "x$(PIXMAN_VERSION_MINOR)" = "x$$(echo "$(PIXMAN_VERSION_MINOR)/2*2" | bc)" ; then echo "stable release in the" ; else echo "development snapshot leading up to a stable"; fi)
release-publish-message: $(HASHFILES) ensure-prev
@echo "Please follow the instructions in RELEASING to push stuff out and"
@echo "send out the announcement mails. Here is the excerpt you need:"
@echo ""
@echo "Lists: $(RELEASE_ANNOUNCE_LIST)"
@echo "Subject: [ANNOUNCE] $(PACKAGE) release $(VERSION) now available"
@echo "============================== CUT HERE =============================="
@echo "A new $(PACKAGE) release $(VERSION) is now available. This is a $(RELEASE_TYPE)"
@echo ""
@echo "tar.gz:"
@echo " $(RELEASE_CAIRO_URL)/$(tar_gz)"
@echo " $(RELEASE_XORG_URL)/$(tar_gz)"
@echo ""
@echo "tar.bz2:"
@echo " $(RELEASE_XORG_URL)/$(tar_bz2)"
@echo ""
@echo "Hashes:"
@echo -n " MD5: "
@cat $(md5_tgz)
@echo -n " MD5: "
@cat $(md5_tbz2)
@echo -n " SHA1: "
@cat $(sha1_tgz)
@echo -n " SHA1: "
@cat $(sha1_tbz2)
@echo ""
@echo "GPG signature:"
@echo " $(RELEASE_CAIRO_URL)/$(gpg_file)"
@echo " (signed by`gpg --list-keys $(GPGKEY) | grep uid | cut -b4- | tr -s " "`)"
@echo ""
@echo "Git:"
@echo " git://git.freedesktop.org/git/pixman"
@echo " tag: $(PACKAGE)-$(VERSION)"
@echo ""
@echo "Log:"
@git log --no-merges "$(PACKAGE)-$(PREV)".."$(PACKAGE)-$(VERSION)" | git shortlog | awk '{ printf "\t"; print ; }' | cut -b1-80
@echo "============================== CUT HERE =============================="
@echo ""
release-publish: release-upload release-tag release-publish-message
.PHONY: release-upload release-publish release-publish-message release-tag

View File

@ -1,25 +0,0 @@
default: all
top_srcdir = .
include $(top_srcdir)/Makefile.win32.common
all: pixman test
pixman:
@$(MAKE) -C pixman -f Makefile.win32
test:
@$(MAKE) -C test -f Makefile.win32
clean_r:
@$(MAKE) -C pixman -f Makefile.win32 clean
@$(MAKE) -C test -f Makefile.win32 clean
check:
@$(MAKE) -C test -f Makefile.win32 check
clean: clean_r
.PHONY: all pixman test clean check

View File

@ -1,56 +0,0 @@
LIBRARY = pixman-1
CC = cl
LD = link
AR = lib
PERL = perl
ifeq ($(top_builddir),)
top_builddir = $(top_srcdir)
endif
CFG_VAR = $(CFG)
ifeq ($(CFG_VAR),)
CFG_VAR = release
endif
ifeq ($(CFG_VAR),debug)
CFG_CFLAGS = -MDd -Od -Zi
CFG_LDFLAGS = -DEBUG
else
CFG_CFLAGS = -MD -O2
CFG_LDFLAGS =
endif
# Package definitions, to be used instead of those provided in config.h
PKG_CFLAGS = -DPACKAGE=$(LIBRARY) -DPACKAGE_VERSION="" -DPACKAGE_BUGREPORT=""
BASE_CFLAGS = -nologo -I. -I$(top_srcdir) -I$(top_srcdir)/pixman
PIXMAN_CFLAGS = $(BASE_CFLAGS) $(PKG_CFLAGS) $(CFG_CFLAGS) $(CFLAGS)
PIXMAN_LDFLAGS = -nologo $(CFG_LDFLAGS) $(LDFLAGS)
PIXMAN_ARFLAGS = -nologo $(LDFLAGS)
inform:
ifneq ($(CFG),release)
ifneq ($(CFG),debug)
ifneq ($(CFG),)
@echo "Invalid specified configuration option: "$(CFG)"."
@echo
@echo "Possible choices for configuration are 'release' and 'debug'"
@exit 1
endif
@echo "Using default RELEASE configuration... (use CFG=release or CFG=debug)"
endif
endif
$(CFG_VAR)/%.obj: %.c $(libpixman_headers)
@mkdir -p $(CFG_VAR)
@$(CC) -c $(PIXMAN_CFLAGS) -Fo"$@" $<
clean: inform
@$(RM) $(CFG_VAR)/*.{exe,ilk,lib,obj,pdb} $(BUILT_SOURCES) || exit 0
.PHONY: inform clean

80
README
View File

@ -1,14 +1,20 @@
Pixman
======
Pixman is a library that provides low-level pixel manipulation
features such as image compositing and trapezoid rasterization.
Questions, bug reports and patches should be directed to the pixman
mailing list:
Questions should be directed to the pixman mailing list:
http://lists.freedesktop.org/mailman/listinfo/pixman
https://lists.freedesktop.org/mailman/listinfo/pixman
You can also file bugs at
https://bugs.freedesktop.org/enter_bug.cgi?product=pixman
https://gitlab.freedesktop.org/pixman/pixman/-/issues/new
or submit improvements in form of a Merge Request via
https://gitlab.freedesktop.org/pixman/pixman/-/merge_requests
For real time discussions about pixman, feel free to join the IRC
channels #cairo and #xorg-devel on the FreeNode IRC network.
@ -21,54 +27,66 @@ In order to contribute to pixman, you will need a working knowledge of
the git version control system. For a quick getting started guide,
there is the "Everyday Git With 20 Commands Or So guide"
http://www.kernel.org/pub/software/scm/git/docs/everyday.html
https://www.kernel.org/pub/software/scm/git/docs/everyday.html
from the Git homepage. For more in depth git documentation, see the
resources on the Git community documentation page:
http://git-scm.com/documentation
https://git-scm.com/documentation
Pixman uses the infrastructure from the freedesktop.org umbrella
project. For instructions about how to use the git service on
freedesktop.org, see:
http://www.freedesktop.org/wiki/Infrastructure/git/Developers
https://www.freedesktop.org/wiki/Infrastructure/git/Developers
The Pixman master repository can be found at:
git://anongit.freedesktop.org/git/pixman
and browsed on the web here:
http://cgit.freedesktop.org/pixman/
https://gitlab.freedesktop.org/pixman/pixman
Sending patches
---------------
The general workflow for sending patches is to first make sure that
git can send mail on your system. Then,
Patches should be submitted in form of Merge Requests via Gitlab.
- create a branch off of master in your local git repository
You will first need to create a fork of the main pixman repository at
- make your changes as one or more commits
https://gitlab.freedesktop.org/pixman/pixman
- use the
via the Fork button on the top right. Once that is done you can add your
personal repository as a remote to your local pixman development git checkout:
git send-email
git remote add my-gitlab git@gitlab.freedesktop.org:YOURUSERNAME/pixman.git
command to send the patch series to pixman@lists.freedesktop.org.
git fetch my-gitlab
Make sure to have added ssh keys to your gitlab profile at
https://gitlab.freedesktop.org/profile/keys
Once that is set up, the general workflow for sending patches is to create a
new local branch with your improvements and once it's ready push it to your
personal pixman fork:
git checkout -b fix-some-bug
...
git push my-gitlab
The output of the `git push` command will include a link that allows you to
create a Merge Request against the official pixman repository.
Whenever you make changes to your branch (add new commits or fix up commits)
you push them back to your personal pixman fork:
git push -f my-gitlab
If there is an open Merge Request Gitlab will automatically pick up the
changes from your branch and pixman developers can review them anew.
In order for your patches to be accepted, please consider the
following guidelines:
- This link:
http://www.kernel.org/pub/software/scm/git/docs/user-manual.html#patch-series
describes how what a good patch series is, and to create one with
git.
- At each point in the series, pixman should compile and the test
suite should pass.
@ -79,7 +97,7 @@ following guidelines:
You can run the test suite with
make check
meson test -C builddir
It will take around two minutes to run on a modern PC.
@ -101,7 +119,7 @@ following guidelines:
- If review comments were incorporated, a brief version
history describing what those changes were.
- For big patch series, send an introductory email with an overall
- For big patch series, write an introductory post with an overall
description of the patch series, including benchmarks and
motivation. Each commit message should still be descriptive and
include enough information to understand why this particular commit
@ -111,6 +129,6 @@ Pixman has high standards for code quality and so almost everybody
should expect to have the first versions of their patches rejected.
If you think that the reviewers are wrong about something, or that the
guidelines above are wrong, feel free to discuss the issue on the
list. The purpose of the guidelines and code review is to ensure high
code quality; it is not an exercise in compliance.
guidelines above are wrong, feel free to discuss the issue. The purpose
of the guidelines and code review is to ensure high code quality; it is
not an exercise in compliance.

View File

@ -10,12 +10,11 @@ Here are the steps to follow to create a new pixman release:
git log master...origin (no output; note: *3* dots)
2) Increment pixman_(major|minor|micro) in configure.ac according to
the directions in that file.
2) Increment the version in meson.build.
3) Make sure that new version works, including
- make distcheck passes
- meson test passes
- the X server still works with the new pixman version
installed

5
a64-neon-test.S Normal file
View File

@ -0,0 +1,5 @@
.text
.arch armv8-a
.altmacro
prfm pldl2strm, [x0]
xtn v0.8b, v0.8h

10
arm-simd-test.S Normal file
View File

@ -0,0 +1,10 @@
.text
.arch armv6
.object_arch armv4
.arm
.altmacro
#ifndef __ARM_EABI__
#error EABI is required (to be sure that calling conventions are compatible)
#endif
pld [r0]
uqadd8 r0, r0, r0

View File

@ -1,14 +0,0 @@
#! /bin/sh
srcdir=`dirname $0`
test -z "$srcdir" && srcdir=.
ORIGDIR=`pwd`
cd $srcdir
autoreconf -v --install || exit 1
cd $ORIGDIR || exit $?
if test -z "$NOCONFIGURE"; then
$srcdir/configure "$@"
fi

File diff suppressed because it is too large Load Diff

85
debian/changelog vendored
View File

@ -1,3 +1,88 @@
pixman (0.44.0-4) UNRELEASED; urgency=medium
* Team upload.
* debian/copyright: Convert to machine-readable format
-- Dylan Aïssi <daissi@debian.org> Thu, 31 Jul 2025 22:16:23 +0200
pixman (0.44.0-3) unstable; urgency=medium
* Replace timeout bump patch by using a multiplier option instead.
Thanks, Aurelien Jarno! (Closes: #1086999)
-- Timo Aaltonen <tjaalton@debian.org> Sat, 09 Nov 2024 11:02:55 +0200
pixman (0.44.0-2) unstable; urgency=medium
* patches: Increase test timeout 120->240s. (Closes: #1086999)
-- Timo Aaltonen <tjaalton@debian.org> Fri, 08 Nov 2024 09:58:04 +0200
pixman (0.44.0-1) unstable; urgency=medium
* New upstream release.
* patches: Refresh patch.
* control, rules: Build with meson.
* symbols: Updated.
* control: Migrate to pkgconf.
* rules: Drop obsolete dbgsym-migration.
-- Timo Aaltonen <tjaalton@debian.org> Thu, 07 Nov 2024 16:48:29 +0200
pixman (0.42.2-1) unstable; urgency=medium
* New upstream release.
* d/p/Avoid-integer-overflow-leading-to-out-of-bounds-writ.diff:
- Removed, fixed upstream.
-- Emilio Pozuelo Monfort <pochu@debian.org> Fri, 11 Nov 2022 13:42:25 +0100
pixman (0.40.0-1.1) unstable; urgency=medium
* Non-maintainer upload.
* Avoid integer overflow leading to out-of-bounds write (CVE-2022-44638)
(Closes: #1023427)
-- Salvatore Bonaccorso <carnil@debian.org> Thu, 03 Nov 2022 23:07:46 +0100
pixman (0.40.0-1) unstable; urgency=medium
* New upstream release. (Closes: #958298, #832579, #838650)
* control, rules: Migrate to debhelper-compat, bump to 13.
* symbols: Updated, bump shlibs.
-- Timo Aaltonen <tjaalton@debian.org> Thu, 03 Dec 2020 15:28:13 +0200
pixman (0.36.0-1) unstable; urgency=medium
* New upstream release.
* Update to my Debian address.
* Update Vcs-* URLs to point to salsa.debian.org.
* Use https URL in debian/copyright.
* Set source format to 1.0.
* Bump debhelper compat to 11.
* Bump standards version to 4.2.1.
-- Andreas Boll <aboll@debian.org> Wed, 12 Dec 2018 22:02:44 +0100
pixman (0.34.0-2) unstable; urgency=medium
* Declare Multi-Arch: same for libpixman-1-dev (Closes: #884166).
* Switch to dbsym package.
* Stop passing --disable-silent-rules to configure, debhelper does it
now.
* Bump standards version to 4.1.2.
-- Andreas Boll <andreas.boll.dev@gmail.com> Sun, 17 Dec 2017 13:33:55 +0100
pixman (0.34.0-1) unstable; urgency=medium
* Team upload.
* New upstream release (no actual changes)
* Use https URL in debian/watch.
-- Julien Cristau <jcristau@debian.org> Sat, 24 Sep 2016 13:25:16 +0200
pixman (0.33.6-1) unstable; urgency=medium
* New upstream release candidate.

1
debian/compat vendored
View File

@ -1 +0,0 @@
9

27
debian/control vendored
View File

@ -2,15 +2,15 @@ Source: pixman
Section: devel
Priority: optional
Maintainer: Debian X Strike Force <debian-x@lists.debian.org>
Uploaders: Andreas Boll <andreas.boll.dev@gmail.com>
Uploaders: Andreas Boll <aboll@debian.org>
Build-Depends:
debhelper (>= 9),
dh-autoreconf,
pkg-config,
debhelper-compat (= 13),
meson,
pkgconf,
quilt,
Standards-Version: 3.9.6
Vcs-Git: https://anonscm.debian.org/git/pkg-xorg/lib/pixman.git
Vcs-Browser: https://anonscm.debian.org/cgit/pkg-xorg/lib/pixman.git
Standards-Version: 4.2.1
Vcs-Git: https://salsa.debian.org/xorg-team/lib/pixman.git
Vcs-Browser: https://salsa.debian.org/xorg-team/lib/pixman
Homepage: http://pixman.org/
Package: libpixman-1-0
@ -38,24 +38,13 @@ Description: pixel-manipulation library for X and cairo
This package contains a minimal set of libraries needed for the Debian
installer. Do not install it on a normal system.
Package: libpixman-1-0-dbg
Section: debug
Priority: extra
Architecture: any
Depends:
libpixman-1-0 (= ${binary:Version}),
${misc:Depends},
Multi-Arch: same
Description: pixel-manipulation library for X and cairo (debugging symbols)
Debugging symbols for the Cairo/X pixel manipulation library. This is
needed to debug programs linked against libpixman0.
Package: libpixman-1-dev
Section: libdevel
Architecture: any
Depends:
libpixman-1-0 (= ${binary:Version}),
${misc:Depends},
Multi-Arch: same
Description: pixel-manipulation library for X and cairo (development files)
Development libraries, header files and documentation needed by
programs that want to compile with the Cairo/X pixman library.

89
debian/copyright vendored
View File

@ -1,47 +1,48 @@
This package was downloaded from
http://xorg.freedesktop.org/releases/individual/lib/
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: pixman
Source: https://gitlab.freedesktop.org/pixman/pixman
License: Expat
Debian packaging by Julien Cristau <jcristau@debian.org>, 18 May 2007.
Files: *
Copyright: 1987-1998 The Open Group
1987-1989 Digital Equipment Corporation
1999-2008 Keith Packard
2000 SuSE, Inc.
2000 Keith Packard, member of The XFree86 Project, Inc.
2004-2010 Red Hat, Inc.
2004 Nicholas Miell
2005 Lars Knoll & Zack Rusin, Trolltech
2005 Trolltech AS
2007 Luca Barbato
2008 Aaron Plattner, NVIDIA Corporation
2008 Rodrigo Kumpera
2008 André Tupinambá
2008 Mozilla Corporation
2008 Frederic Plourde
2009, Oracle and/or its affiliates. All rights reserved.
2009-2010 Nokia Corporation
License: Expat
The following is the MIT license, agreed upon by most contributors.
Copyright holders of new code should use this license statement where
possible. They may also add themselves to the list below.
Files: debian/*
Copyright: 2007 Julien Cristau <jcristau@debian.org>
License: Expat
/*
* Copyright 1987, 1988, 1989, 1998 The Open Group
* Copyright 1987, 1988, 1989 Digital Equipment Corporation
* Copyright 1999, 2004, 2008 Keith Packard
* Copyright 2000 SuSE, Inc.
* Copyright 2000 Keith Packard, member of The XFree86 Project, Inc.
* Copyright 2004, 2005, 2007, 2008, 2009, 2010 Red Hat, Inc.
* Copyright 2004 Nicholas Miell
* Copyright 2005 Lars Knoll & Zack Rusin, Trolltech
* Copyright 2005 Trolltech AS
* Copyright 2007 Luca Barbato
* Copyright 2008 Aaron Plattner, NVIDIA Corporation
* Copyright 2008 Rodrigo Kumpera
* Copyright 2008 André Tupinambá
* Copyright 2008 Mozilla Corporation
* Copyright 2008 Frederic Plourde
* Copyright 2009, Oracle and/or its affiliates. All rights reserved.
* Copyright 2009, 2010 Nokia Corporation
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice (including the next
* paragraph) shall be included in all copies or substantial portions of the
* Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*/
License: Expat
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
.
The above copyright notice and this permission notice (including the next
paragraph) shall be included in all copies or substantial portions of the
Software.
.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.

View File

@ -64,6 +64,8 @@ libpixman-1.so.0 libpixman-1-0 #MINVER#
pixman_image_set_clip_region@Base 0
pixman_image_set_component_alpha@Base 0
pixman_image_set_destroy_function@Base 0.15.12
pixman_image_set_dither@Base 0.40.0
pixman_image_set_dither_offset@Base 0.40.0
pixman_image_set_filter@Base 0.30.0
pixman_image_set_has_client_clip@Base 0
pixman_image_set_indexed@Base 0
@ -78,6 +80,7 @@ libpixman-1.so.0 libpixman-1-0 #MINVER#
pixman_region32_contains_point@Base 0.11.2
pixman_region32_contains_rectangle@Base 0.11.2
pixman_region32_copy@Base 0.11.2
pixman_region32_empty@Base 0.44.0
pixman_region32_equal@Base 0.11.2
pixman_region32_extents@Base 0.11.2
pixman_region32_fini@Base 0.11.2
@ -102,6 +105,7 @@ libpixman-1.so.0 libpixman-1-0 #MINVER#
pixman_region_contains_point@Base 0
pixman_region_contains_rectangle@Base 0
pixman_region_copy@Base 0
pixman_region_empty@Base 0.44.0
pixman_region_equal@Base 0
pixman_region_extents@Base 0
pixman_region_fini@Base 0

View File

@ -1,4 +1,3 @@
usr/lib/*/libpixman-1.so
usr/lib/*/libpixman-1.a
usr/lib/*/pkgconfig
usr/include/pixman-1

View File

@ -1,10 +1,8 @@
Index: pixman/test/alpha-loop.c
===================================================================
--- pixman.orig/test/alpha-loop.c 2013-07-26 14:26:43.905457549 +0200
+++ pixman/test/alpha-loop.c 2013-08-03 10:21:53.498601016 +0200
@@ -21,7 +21,7 @@
pixman_image_t *d = pixman_image_create_bits (PIXMAN_a8r8g8b8, WIDTH, HEIGHT, dest, WIDTH * 4);
pixman_image_t *s = pixman_image_create_bits (PIXMAN_a2r10g10b10, WIDTH, HEIGHT, src, WIDTH * 4);
--- a/test/alpha-loop.c
+++ b/test/alpha-loop.c
@@ -22,7 +22,7 @@ main (int argc, char **argv)
d = pixman_image_create_bits (PIXMAN_a8r8g8b8, WIDTH, HEIGHT, dest, WIDTH * 4);
s = pixman_image_create_bits (PIXMAN_a2r10g10b10, WIDTH, HEIGHT, src, WIDTH * 4);
- fail_after (5, "Infinite loop detected: 5 seconds without progress\n");
+ fail_after (50, "Infinite loop detected: 50 seconds without progress\n");

18
debian/rules vendored
View File

@ -1,7 +1,7 @@
#!/usr/bin/make -f
PACKAGE = libpixman-1-0
SHLIBS = 0.25.2
SHLIBS = 0.40.0
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
@ -9,9 +9,8 @@ export DEB_BUILD_MAINT_OPTIONS = hardening=+all
override_dh_auto_configure:
# also avoid loongson2f optimizations on mipsel, see 0.26.0-3
# changelog entry:
LS_CFLAGS=" " dh_auto_configure -- --disable-gtk \
--disable-silent-rules \
--disable-arm-iwmmxt
LS_CFLAGS=" " dh_auto_configure -- \
-Dgtk=disabled
# Install in debian/tmp to retain control through dh_install:
override_dh_auto_install:
@ -20,19 +19,14 @@ override_dh_auto_install:
# Kill *.la files, and forget no-one:
override_dh_install:
find debian/tmp -name '*.la' -delete
dh_install --fail-missing
# Debug package:
override_dh_strip:
dh_strip -p$(PACKAGE) --dbg-package=$(PACKAGE)-dbg
dh_strip -N$(PACKAGE)
dh_install
# Shlibs:
override_dh_makeshlibs:
dh_makeshlibs -p$(PACKAGE) --add-udeb $(PACKAGE)-udeb -V"$(PACKAGE) (>= $(SHLIBS))" -- -c4
override_dh_auto_test:
dh_auto_test -- VERBOSE=1
dh_auto_test -- --verbose --timeout-multiplier 3
%:
dh $@ --with quilt,autoreconf --builddirectory=build/ --parallel
dh $@ --with quilt --builddirectory=build/

1
debian/source/format vendored Normal file
View File

@ -0,0 +1 @@
1.0

2
debian/watch vendored
View File

@ -1,3 +1,3 @@
#git=git://anongit.freedesktop.org/pixman
version=3
http://xorg.freedesktop.org/releases/individual/lib/ pixman-(.*)\.tar\.gz
https://xorg.freedesktop.org/releases/individual/lib/ pixman-(.*)\.tar\.gz

View File

@ -1,52 +0,0 @@
EXTRA_DIST = parrot.c parrot.jpg scale.ui
if HAVE_GTK
AM_CFLAGS = $(OPENMP_CFLAGS)
AM_LDFLAGS = $(OPENMP_CFLAGS)
LDADD = $(top_builddir)/pixman/libpixman-1.la -lm $(GTK_LIBS) $(PNG_LIBS)
AM_CPPFLAGS = -I$(top_srcdir)/pixman -I$(top_builddir)/pixman $(GTK_CFLAGS) $(PNG_CFLAGS)
GTK_UTILS = gtk-utils.c gtk-utils.h ../test/utils.c ../test/utils.h \
../test/utils-prng.c ../test/utils-prng.h
DEMOS = \
clip-test \
clip-in \
composite-test \
gradient-test \
radial-test \
linear-gradient \
conical-test \
alpha-test \
screen-test \
convolution-test \
trap-test \
tri-test \
quad2quad \
checkerboard \
srgb-trap-test \
srgb-test \
scale
gradient_test_SOURCES = gradient-test.c $(GTK_UTILS)
alpha_test_SOURCES = alpha-test.c $(GTK_UTILS)
composite_test_SOURCES = composite-test.c $(GTK_UTILS)
clip_test_SOURCES = clip-test.c $(GTK_UTILS)
clip_in_SOURCES = clip-in.c $(GTK_UTILS)
trap_test_SOURCES = trap-test.c $(GTK_UTILS)
screen_test_SOURCES = screen-test.c $(GTK_UTILS)
convolution_test_SOURCES = convolution-test.c $(GTK_UTILS)
radial_test_SOURCES = radial-test.c $(GTK_UTILS)
linear_gradient_SOURCES = linear-gradient.c $(GTK_UTILS)
conical_test_SOURCES = conical-test.c $(GTK_UTILS)
tri_test_SOURCES = tri-test.c $(GTK_UTILS)
checkerboard_SOURCES = checkerboard.c $(GTK_UTILS)
srgb_test_SOURCES = srgb-test.c $(GTK_UTILS)
srgb_trap_test_SOURCES = srgb-trap-test.c $(GTK_UTILS)
scale_SOURCES = scale.c $(GTK_UTILS)
noinst_PROGRAMS = $(DEMOS)
endif

View File

@ -1,4 +1,4 @@
#include "../test/utils.h"
#include "utils.h"
#include "gtk-utils.h"
#define SIZE 128

277
demos/dither.c Normal file
View File

@ -0,0 +1,277 @@
/*
* Copyright 2012, Red Hat, Inc.
* Copyright 2012, Soren Sandmann
* Copyright 2018, Basile Clement
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice (including the next
* paragraph) shall be included in all copies or substantial portions of the
* Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*/
#ifdef HAVE_CONFIG_H
#include "pixman-config.h"
#endif
#include <math.h>
#include <gtk/gtk.h>
#include <stdlib.h>
#include "utils.h"
#include "gtk-utils.h"
#define WIDTH 1024
#define HEIGHT 640
typedef struct
{
GtkBuilder * builder;
pixman_image_t * original;
pixman_format_code_t format;
pixman_dither_t dither;
int width;
int height;
} app_t;
static GtkWidget *
get_widget (app_t *app, const char *name)
{
GtkWidget *widget = GTK_WIDGET (gtk_builder_get_object (app->builder, name));
if (!widget)
g_error ("Widget %s not found\n", name);
return widget;
}
typedef struct
{
char name [20];
int value;
} named_int_t;
static const named_int_t formats[] =
{
{ "a8r8g8b8", PIXMAN_a8r8g8b8 },
{ "rgb", PIXMAN_rgb_float },
{ "sRGB", PIXMAN_a8r8g8b8_sRGB },
{ "r5g6b5", PIXMAN_r5g6b5 },
{ "a4r4g4b4", PIXMAN_a4r4g4b4 },
{ "a2r2g2b2", PIXMAN_a2r2g2b2 },
{ "r3g3b2", PIXMAN_r3g3b2 },
{ "r1g2b1", PIXMAN_r1g2b1 },
{ "a1r1g1b1", PIXMAN_a1r1g1b1 },
};
static const named_int_t dithers[] =
{
{ "None", PIXMAN_REPEAT_NONE },
{ "Bayer 8x8", PIXMAN_DITHER_ORDERED_BAYER_8 },
{ "Blue noise 64x64", PIXMAN_DITHER_ORDERED_BLUE_NOISE_64 },
};
static int
get_value (app_t *app, const named_int_t table[], const char *box_name)
{
GtkComboBox *box = GTK_COMBO_BOX (get_widget (app, box_name));
return table[gtk_combo_box_get_active (box)].value;
}
static void
rescale (GtkWidget *may_be_null, app_t *app)
{
app->dither = get_value (app, dithers, "dithering_combo_box");
app->format = get_value (app, formats, "target_format_combo_box");
gtk_widget_set_size_request (
get_widget (app, "drawing_area"), app->width + 0.5, app->height + 0.5);
gtk_widget_queue_draw (
get_widget (app, "drawing_area"));
}
static gboolean
on_draw (GtkWidget *widget, cairo_t *cr, gpointer user_data)
{
app_t *app = user_data;
GdkRectangle area;
cairo_surface_t *surface;
pixman_image_t *tmp, *final;
uint32_t *pixels;
gdk_cairo_get_clip_rectangle(cr, &area);
tmp = pixman_image_create_bits (
app->format, area.width, area.height, NULL, 0);
pixman_image_set_dither (tmp, app->dither);
pixman_image_composite (
PIXMAN_OP_SRC,
app->original, NULL, tmp,
area.x, area.y, 0, 0, 0, 0,
app->width - area.x,
app->height - area.y);
pixels = calloc (1, area.width * area.height * 4);
final = pixman_image_create_bits (
PIXMAN_a8r8g8b8, area.width, area.height, pixels, area.width * 4);
pixman_image_composite (
PIXMAN_OP_SRC,
tmp, NULL, final,
area.x, area.y, 0, 0, 0, 0,
app->width - area.x,
app->height - area.y);
surface = cairo_image_surface_create_for_data (
(uint8_t *)pixels, CAIRO_FORMAT_ARGB32,
area.width, area.height, area.width * 4);
cairo_set_source_surface (cr, surface, area.x, area.y);
cairo_paint (cr);
cairo_surface_destroy (surface);
free (pixels);
pixman_image_unref (final);
pixman_image_unref (tmp);
return TRUE;
}
static void
set_up_combo_box (app_t *app, const char *box_name,
int n_entries, const named_int_t table[])
{
GtkWidget *widget = get_widget (app, box_name);
GtkListStore *model;
GtkCellRenderer *cell;
int i;
model = gtk_list_store_new (1, G_TYPE_STRING);
cell = gtk_cell_renderer_text_new ();
gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (widget), cell, TRUE);
gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (widget), cell,
"text", 0,
NULL);
gtk_combo_box_set_model (GTK_COMBO_BOX (widget), GTK_TREE_MODEL (model));
for (i = 0; i < n_entries; ++i)
{
const named_int_t *info = &(table[i]);
GtkTreeIter iter;
gtk_list_store_append (model, &iter);
gtk_list_store_set (model, &iter, 0, info->name, -1);
}
gtk_combo_box_set_active (GTK_COMBO_BOX (widget), 0);
g_signal_connect (widget, "changed", G_CALLBACK (rescale), app);
}
static app_t *
app_new (pixman_image_t *original)
{
GtkWidget *widget;
app_t *app = g_malloc (sizeof *app);
GError *err = NULL;
app->builder = gtk_builder_new ();
app->original = original;
if (original->type == BITS)
{
app->width = pixman_image_get_width (original);
app->height = pixman_image_get_height (original);
}
else
{
app->width = WIDTH;
app->height = HEIGHT;
}
if (!gtk_builder_add_from_file (app->builder, "dither.ui", &err))
g_error ("Could not read file dither.ui: %s", err->message);
widget = get_widget (app, "drawing_area");
g_signal_connect (widget, "draw", G_CALLBACK (on_draw), app);
set_up_combo_box (app, "target_format_combo_box",
G_N_ELEMENTS (formats), formats);
set_up_combo_box (app, "dithering_combo_box",
G_N_ELEMENTS (dithers), dithers);
app->dither = get_value (app, dithers, "dithering_combo_box");
app->format = get_value (app, formats, "target_format_combo_box");
rescale (NULL, app);
return app;
}
int
main (int argc, char **argv)
{
GtkWidget *window;
pixman_image_t *image;
app_t *app;
gtk_init (&argc, &argv);
if (argc < 2)
{
pixman_gradient_stop_t stops[] = {
/* These colors make it very obvious that dithering
* is useful even for 8-bit gradients
*/
{ 0x00000, { 0x1b1b, 0x5d5d, 0x7c7c, 0xffff } },
{ 0x10000, { 0x3838, 0x3232, 0x1010, 0xffff } },
};
pixman_point_fixed_t p1, p2;
p1.x = p1.y = 0x0000;
p2.x = WIDTH << 16;
p2.y = HEIGHT << 16;
if (!(image = pixman_image_create_linear_gradient (
&p1, &p2, stops, ARRAY_LENGTH (stops))))
{
printf ("Could not create gradient\n");
return -1;
}
}
else if (!(image = pixman_image_from_file (argv[1], PIXMAN_a8r8g8b8)))
{
printf ("Could not load image \"%s\"\n", argv[1]);
return -1;
}
app = app_new (image);
window = get_widget (app, "main");
g_signal_connect (window, "delete_event", G_CALLBACK (gtk_main_quit), NULL);
gtk_window_set_default_size (GTK_WINDOW (window), 1024, 768);
gtk_widget_show_all (window);
gtk_main ();
return 0;
}

147
demos/dither.ui Normal file
View File

@ -0,0 +1,147 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<requires lib="gtk+" version="2.12"/>
<object class="GtkWindow" id="main">
<property name="can_focus">False</property>
<child>
<placeholder/>
</child>
<child>
<object class="GtkHBox" id="u">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="spacing">12</property>
<child>
<object class="GtkScrolledWindow" id="scrolledwindow1">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="shadow_type">in</property>
<child>
<object class="GtkViewport" id="viewport1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<object class="GtkDrawingArea" id="drawing_area">
<property name="visible">True</property>
<property name="can_focus">False</property>
</object>
</child>
</object>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkVBox" id="box1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="spacing">12</property>
<child>
<object class="GtkVBox" id="box6">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<object class="GtkTable" id="grid1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="n_rows">2</property>
<property name="n_columns">2</property>
<property name="column_spacing">8</property>
<property name="row_spacing">6</property>
<child>
<object class="GtkLabel" id="label4">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">&lt;b&gt;Target format:&lt;/b&gt;</property>
<property name="use_markup">True</property>
<property name="xalign">1</property>
</object>
</child>
<child>
<object class="GtkLabel" id="label5">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">&lt;b&gt;Dithering:&lt;/b&gt;</property>
<property name="use_markup">True</property>
<property name="xalign">1</property>
</object>
<packing>
<property name="top_attach">1</property>
</packing>
</child>
<child>
<object class="GtkComboBox" id="target_format_combo_box">
<property name="visible">True</property>
<property name="can_focus">False</property>
</object>
<packing>
<property name="left_attach">1</property>
</packing>
</child>
<child>
<object class="GtkComboBox" id="dithering_combo_box">
<property name="visible">True</property>
<property name="can_focus">False</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="padding">6</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
</child>
</object>
<object class="GtkAdjustment" id="rotate_adjustment">
<property name="lower">-180</property>
<property name="upper">190</property>
<property name="step_increment">1</property>
<property name="page_increment">10</property>
<property name="page_size">10</property>
</object>
<object class="GtkAdjustment" id="scale_x_adjustment">
<property name="lower">-32</property>
<property name="upper">42</property>
<property name="step_increment">1</property>
<property name="page_increment">10</property>
<property name="page_size">10</property>
</object>
<object class="GtkAdjustment" id="scale_y_adjustment">
<property name="lower">-32</property>
<property name="upper">42</property>
<property name="step_increment">1</property>
<property name="page_increment">10</property>
<property name="page_size">10</property>
</object>
<object class="GtkAdjustment" id="subsample_adjustment">
<property name="upper">12</property>
<property name="value">4</property>
<property name="step_increment">1</property>
<property name="page_increment">1</property>
</object>
</interface>

View File

@ -1,6 +1,8 @@
#include <gtk/gtk.h>
#include <config.h>
#include "../test/utils.h"
#ifdef HAVE_CONFIG_H
#include <pixman-config.h>
#endif
#include "utils.h"
#include "gtk-utils.h"
pixman_image_t *
@ -93,15 +95,14 @@ pixbuf_from_argb32 (uint32_t *bits,
}
static gboolean
on_expose (GtkWidget *widget, GdkEventExpose *expose, gpointer data)
on_draw (GtkWidget *widget, cairo_t *cr, gpointer user_data)
{
pixman_image_t *pimage = data;
pixman_image_t *pimage = user_data;
int width = pixman_image_get_width (pimage);
int height = pixman_image_get_height (pimage);
int stride = pixman_image_get_stride (pimage);
cairo_surface_t *cimage;
cairo_format_t format;
cairo_t *cr;
if (pixman_image_get_format (pimage) == PIXMAN_x8r8g8b8)
format = CAIRO_FORMAT_RGB24;
@ -111,14 +112,11 @@ on_expose (GtkWidget *widget, GdkEventExpose *expose, gpointer data)
cimage = cairo_image_surface_create_for_data (
(uint8_t *)pixman_image_get_data (pimage),
format, width, height, stride);
cr = gdk_cairo_create (widget->window);
cairo_rectangle (cr, 0, 0, width, height);
cairo_set_source_surface (cr, cimage, 0, 0);
cairo_fill (cr);
cairo_destroy (cr);
cairo_surface_destroy (cimage);
return TRUE;
@ -170,7 +168,7 @@ show_image (pixman_image_t *image)
break;
}
g_signal_connect (window, "expose_event", G_CALLBACK (on_expose), copy);
g_signal_connect (window, "draw", G_CALLBACK (on_draw), copy);
g_signal_connect (window, "delete_event", G_CALLBACK (gtk_main_quit), NULL);
gtk_widget_show (window);

View File

@ -1,4 +1,4 @@
#include "../test/utils.h"
#include "utils.h"
#include "gtk-utils.h"
#define WIDTH 1024

66
demos/meson.build Normal file
View File

@ -0,0 +1,66 @@
# Copyright © 2018 Intel Corporation
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
extra_demo_cflags = []
if cc.get_argument_syntax() == 'msvc'
extra_demo_cflags = ['-D_USE_MATH_DEFINES']
endif
demos = [
'gradient-test',
'alpha-test',
'composite-test',
'clip-test',
'trap-test',
'screen-test',
'convolution-test',
'radial-test',
'linear-gradient',
'conical-test',
'tri-test',
'checkerboard',
'srgb-test',
'srgb-trap-test',
'scale',
'dither',
]
if dep_gtk.found()
libdemo = static_library(
'demo',
['gtk-utils.c', config_h, version_h],
dependencies : [libtestutils_dep, dep_gtk, dep_glib, dep_png, dep_m, dep_openmp],
include_directories : inc_pixman,
)
if dep_gtk.found()
foreach d : demos
executable(
d,
[d + '.c', config_h, version_h],
c_args : extra_demo_cflags,
link_with : [libdemo],
dependencies : [idep_pixman, libtestutils_dep, dep_glib, dep_gtk, dep_openmp, dep_png],
)
endforeach
endif
endif

View File

@ -1,4 +1,4 @@
#include "../test/utils.h"
#include "utils.h"
#include "gtk-utils.h"
#define NUM_GRADIENTS 9

View File

@ -24,7 +24,7 @@
* Author: Soren Sandmann <soren.sandmann@gmail.com>
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#include "pixman-config.h"
#endif
#include <math.h>
#include <gtk/gtk.h>
@ -55,50 +55,70 @@ get_widget (app_t *app, const char *name)
return widget;
}
static double
min4 (double a, double b, double c, double d)
{
double m1, m2;
m1 = MIN (a, b);
m2 = MIN (c, d);
return MIN (m1, m2);
}
static double
max4 (double a, double b, double c, double d)
{
double m1, m2;
m1 = MAX (a, b);
m2 = MAX (c, d);
return MAX (m1, m2);
}
/* Figure out the boundary of a diameter=1 circle transformed into an ellipse
* by trans. Proof that this is the correct calculation:
*
* Transform x,y to u,v by this matrix calculation:
*
* |u| |a c| |x|
* |v| = |b d|*|y|
*
* Horizontal component:
*
* u = ax+cy (1)
*
* For each x,y on a radius-1 circle (p is angle to the point):
*
* x^2+y^2 = 1
* x = cos(p)
* y = sin(p)
* dx/dp = -sin(p) = -y
* dy/dp = cos(p) = x
*
* Figure out derivative of (1) relative to p:
*
* du/dp = a(dx/dp) + c(dy/dp)
* = -ay + cx
*
* The min and max u are when du/dp is zero:
*
* -ay + cx = 0
* cx = ay
* c = ay/x (2)
* y = cx/a (3)
*
* Substitute (2) into (1) and simplify:
*
* u = ax + ay^2/x
* = a(x^2+y^2)/x
* = a/x (because x^2+y^2 = 1)
* x = a/u (4)
*
* Substitute (4) into (3) and simplify:
*
* y = c(a/u)/a
* y = c/u (5)
*
* Square (4) and (5) and add:
*
* x^2+y^2 = (a^2+c^2)/u^2
*
* But x^2+y^2 is 1:
*
* 1 = (a^2+c^2)/u^2
* u^2 = a^2+c^2
* u = hypot(a,c)
*
* Similarily the max/min of v is at:
*
* v = hypot(b,d)
*
*/
static void
compute_extents (pixman_f_transform_t *trans, double *sx, double *sy)
{
double min_x, max_x, min_y, max_y;
pixman_f_vector_t v[4] =
{
{ { 1, 1, 1 } },
{ { -1, 1, 1 } },
{ { -1, -1, 1 } },
{ { 1, -1, 1 } },
};
pixman_f_transform_point (trans, &v[0]);
pixman_f_transform_point (trans, &v[1]);
pixman_f_transform_point (trans, &v[2]);
pixman_f_transform_point (trans, &v[3]);
min_x = min4 (v[0].v[0], v[1].v[0], v[2].v[0], v[3].v[0]);
max_x = max4 (v[0].v[0], v[1].v[0], v[2].v[0], v[3].v[0]);
min_y = min4 (v[0].v[1], v[1].v[1], v[2].v[1], v[3].v[1]);
max_y = max4 (v[0].v[1], v[1].v[1], v[2].v[1], v[3].v[1]);
*sx = (max_x - min_x) / 2.0;
*sy = (max_y - min_y) / 2.0;
*sx = hypot (trans->m[0][0], trans->m[0][1]) / trans->m[2][2];
*sy = hypot (trans->m[1][0], trans->m[1][1]) / trans->m[2][2];
}
typedef struct
@ -258,39 +278,37 @@ rescale (GtkWidget *may_be_null, app_t *app)
}
static gboolean
on_expose (GtkWidget *da, GdkEvent *event, gpointer data)
on_draw (GtkWidget *widget, cairo_t *cr, gpointer user_data)
{
app_t *app = data;
GdkRectangle *area = &event->expose.area;
app_t *app = user_data;
GdkRectangle area;
cairo_surface_t *surface;
pixman_image_t *tmp;
cairo_t *cr;
uint32_t *pixels;
pixels = calloc (1, area->width * area->height * 4);
tmp = pixman_image_create_bits (
PIXMAN_a8r8g8b8, area->width, area->height, pixels, area->width * 4);
gdk_cairo_get_clip_rectangle(cr, &area);
if (area->x < app->scaled_width && area->y < app->scaled_height)
pixels = calloc (1, area.width * area.height * 4);
tmp = pixman_image_create_bits (
PIXMAN_a8r8g8b8, area.width, area.height, pixels, area.width * 4);
if (area.x < app->scaled_width && area.y < app->scaled_height)
{
pixman_image_composite (
PIXMAN_OP_SRC,
app->original, NULL, tmp,
area->x, area->y, 0, 0, 0, 0,
app->scaled_width - area->x, app->scaled_height - area->y);
area.x, area.y, 0, 0, 0, 0,
app->scaled_width - area.x, app->scaled_height - area.y);
}
surface = cairo_image_surface_create_for_data (
(uint8_t *)pixels, CAIRO_FORMAT_ARGB32,
area->width, area->height, area->width * 4);
area.width, area.height, area.width * 4);
cr = gdk_cairo_create (da->window);
cairo_set_source_surface (cr, surface, area->x, area->y);
cairo_set_source_surface (cr, surface, area.x, area.y);
cairo_paint (cr);
cairo_destroy (cr);
cairo_surface_destroy (surface);
free (pixels);
pixman_image_unref (tmp);
@ -380,7 +398,7 @@ app_new (pixman_image_t *original)
gtk_scale_add_mark (GTK_SCALE (widget), 0.0, GTK_POS_LEFT, NULL);
widget = get_widget (app, "drawing_area");
g_signal_connect (widget, "expose_event", G_CALLBACK (on_expose), app);
g_signal_connect (widget, "draw", G_CALLBACK (on_draw), app);
set_up_filter_box (app, "reconstruct_x_combo_box");
set_up_filter_box (app, "reconstruct_y_combo_box");

View File

@ -177,6 +177,7 @@
id="lock_checkbutton">
<property name="label" translatable="yes">Lock X and Y Dimensions</property>
<property name="xalign">0.0</property>
<property name="active">True</property>
</object>
<packing>
<property name="expand">False</property>
@ -301,6 +302,7 @@
<object class="GtkSpinButton" id="subsample_spin_button">
<property name="visible">True</property>
<property name="adjustment">subsample_adjustment</property>
<property name="value">4</property>
</object>
<packing>
<property name="left_attach">1</property>

View File

@ -1,7 +1,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "../test/utils.h"
#include "utils.h"
#include "gtk-utils.h"
int

609
meson.build Normal file
View File

@ -0,0 +1,609 @@
# Copyright © 2018 Intel Corporation
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
project(
'pixman',
['c'],
version : '0.44.0',
license : 'MIT',
meson_version : '>= 0.52.0',
default_options : ['c_std=gnu99', 'buildtype=debugoptimized'],
)
config = configuration_data()
cc = meson.get_compiler('c')
null_dep = dependency('', required : false)
add_project_arguments(
cc.get_supported_arguments([
'-Wdeclaration-after-statement',
'-fno-strict-aliasing',
'-fvisibility=hidden',
'-Wundef',
# -ftrapping-math is the default for gcc, but -fno-trapping-math is the
# default for clang. The FLOAT_IS_ZERO macro is used to guard against
# floating-point exceptions, however with -fno-trapping-math, the compiler
# can reorder floating-point operations so that they occur before the guard.
# Note, this function is ignored in clang < 10.0.0.
'-ftrapping-math'
]),
language : ['c']
)
# GCC and Clang both ignore -Wno options that they don't recognize, so test for
# -W<opt>, then add -Wno-<opt> if it's ignored
foreach opt : ['unused-local-typedefs']
if cc.has_argument('-W' + opt)
add_project_arguments(['-Wno-' + opt], language : ['c'])
endif
endforeach
use_loongson_mmi = get_option('loongson-mmi')
have_loongson_mmi = false
loongson_mmi_flags = ['-mloongson-mmi']
if not use_loongson_mmi.disabled()
if host_machine.cpu_family() == 'mips64' and cc.compiles('''
#ifndef __mips_loongson_vector_rev
#error "Loongson Multimedia Instructions are only available on Loongson"
#endif
#if defined(__GNUC__) && (__GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 4))
#error "Need GCC >= 4.4 for Loongson MMI compilation"
#endif
#include "pixman/loongson-mmintrin.h"
int main () {
union {
__m64 v;
char c[8];
} a = { .c = {1, 2, 3, 4, 5, 6, 7, 8} };
int b = 4;
__m64 c = _mm_srli_pi16 (a.v, b);
return 0;
}''',
args : loongson_mmi_flags,
include_directories : include_directories('.'),
name : 'Loongson MMI Intrinsic Support')
have_loongson_mmi = true
endif
endif
if have_loongson_mmi
config.set10('USE_LOONGSON_MMI', true)
elif use_loongson_mmi.enabled()
error('Loongson MMI Support unavailable, but required')
endif
use_mmx = get_option('mmx')
have_mmx = false
mmx_flags = []
if cc.get_id() == 'msvc'
mmx_flags = ['/w14710', '/w14714', '/wd4244']
elif cc.get_id() == 'sun'
mmx_flags = ['-xarch=sse']
else
mmx_flags = ['-mmmx', '-Winline']
endif
if not use_mmx.disabled()
if host_machine.cpu_family() == 'x86_64' or cc.get_id() == 'msvc'
have_mmx = true
elif host_machine.cpu_family() == 'x86' and cc.compiles('''
#include <mmintrin.h>
#include <stdint.h>
/* Check support for block expressions */
#define _mm_shuffle_pi16(A, N) \
({ \
__m64 ret; \
\
/* Some versions of clang will choke on K */ \
asm ("pshufw %2, %1, %0\n\t" \
: "=y" (ret) \
: "y" (A), "K" ((const int8_t)N) \
); \
\
ret; \
})
int main () {
__m64 v = _mm_cvtsi32_si64 (1);
__m64 w;
w = _mm_shuffle_pi16(v, 5);
/* Some versions of clang will choke on this */
asm ("pmulhuw %1, %0\n\t"
: "+y" (w)
: "y" (v)
);
return _mm_cvtsi64_si32 (v);
}''',
args : mmx_flags,
name : 'MMX Intrinsic Support')
have_mmx = true
endif
endif
if have_mmx
# Inline assembly do not work on X64 MSVC, so we use
# compatibility intrinsics there
if cc.get_id() != 'msvc' or host_machine.cpu_family() != 'x86_64'
config.set10('USE_X86_MMX', true)
endif
elif use_mmx.enabled()
error('MMX Support unavailable, but required')
endif
use_sse2 = get_option('sse2')
have_sse2 = false
sse2_flags = []
if cc.get_id() == 'sun'
sse2_flags = ['-xarch=sse2']
elif cc.get_id() != 'msvc'
sse2_flags = ['-msse2', '-Winline']
endif
if not use_sse2.disabled()
if host_machine.cpu_family() == 'x86'
if cc.compiles('''
#if defined(__GNUC__) && (__GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 2))
# if !defined(__amd64__) && !defined(__x86_64__)
# error "Need GCC >= 4.2 for SSE2 intrinsics on x86"
# endif
#endif
#include <mmintrin.h>
#include <xmmintrin.h>
#include <emmintrin.h>
int param;
int main () {
__m128i a = _mm_set1_epi32 (param), b = _mm_set1_epi32 (param + 1), c;
c = _mm_xor_si128 (a, b);
return _mm_cvtsi128_si32(c);
}''',
args : sse2_flags,
name : 'SSE2 Intrinsic Support')
have_sse2 = true
endif
elif host_machine.cpu_family() == 'x86_64'
have_sse2 = true
endif
endif
if have_sse2
config.set10('USE_SSE2', true)
elif use_sse2.enabled()
error('sse2 Support unavailable, but required')
endif
use_ssse3 = get_option('ssse3')
have_ssse3 = false
ssse3_flags = []
if cc.get_id() != 'msvc'
ssse3_flags = ['-mssse3', '-Winline']
endif
# x64 pre-2010 MSVC compilers crashes when building the ssse3 code
if not use_ssse3.disabled() and not (cc.get_id() == 'msvc' and cc.version().version_compare('<16') and host_machine.cpu_family() == 'x86_64')
if host_machine.cpu_family().startswith('x86')
if cc.compiles('''
#include <mmintrin.h>
#include <xmmintrin.h>
#include <emmintrin.h>
int param;
int main () {
__m128i a = _mm_set1_epi32 (param), b = _mm_set1_epi32 (param + 1), c;
c = _mm_xor_si128 (a, b);
return _mm_cvtsi128_si32(c);
}''',
args : ssse3_flags,
name : 'SSSE3 Intrinsic Support')
have_ssse3 = true
endif
endif
endif
if have_ssse3
config.set10('USE_SSSE3', true)
elif use_ssse3.enabled()
error('ssse3 Support unavailable, but required')
endif
use_vmx = get_option('vmx')
have_vmx = false
vmx_flags = ['-maltivec', '-mabi=altivec']
if not use_vmx.disabled()
if host_machine.cpu_family().startswith('ppc')
if cc.compiles('''
#include <altivec.h>
int main () {
vector unsigned int v = vec_splat_u32 (1);
v = vec_sub (v, v);
return 0;
}''',
args : vmx_flags,
name : 'VMX/Altivec Intrinsic Support')
have_vmx = true
endif
endif
endif
if cc.compiles('''
__asm__ (
".func meson_test"
".endfunc"
);''',
name : 'test for ASM .func directive')
config.set('ASM_HAVE_FUNC_DIRECTIVE', 1)
endif
if cc.compiles('''
__asm__ (
".syntax unified\n"
);''',
name : 'test for ASM .syntax unified directive')
config.set('ASM_HAVE_SYNTAX_UNIFIED', 1)
endif
if cc.links('''
#include <stdint.h>
__asm__ (
" .global _testlabel\n"
"_testlabel:\n"
);
int testlabel();
int main(int argc, char* argv[]) {
return testlabel();
}''',
name : 'test for ASM leading underscore')
config.set('ASM_LEADING_UNDERSCORE', 1)
endif
if have_vmx
config.set10('USE_VMX', true)
elif use_vmx.enabled()
error('vmx Support unavailable, but required')
endif
use_armv6_simd = get_option('arm-simd')
have_armv6_simd = false
if not use_armv6_simd.disabled()
if host_machine.cpu_family() == 'arm'
if cc.compiles(files('arm-simd-test.S'), name : 'ARMv6 SIMD Intrinsic Support')
have_armv6_simd = true
endif
endif
endif
if have_armv6_simd
config.set10('USE_ARM_SIMD', true)
elif use_armv6_simd.enabled()
error('ARMv6 SIMD Support unavailable, but required')
endif
use_neon = get_option('neon')
have_neon = false
if not use_neon.disabled()
if host_machine.cpu_family() == 'arm'
if cc.compiles(files('neon-test.S'), name : 'NEON Intrinsic Support')
have_neon = true
endif
endif
endif
if have_neon
config.set10('USE_ARM_NEON', true)
elif use_neon.enabled()
error('NEON Support unavailable, but required')
endif
use_a64neon = get_option('a64-neon')
have_a64neon = false
if not use_a64neon.disabled()
if host_machine.cpu_family() == 'aarch64'
if cc.compiles(files('a64-neon-test.S'), name : 'NEON A64 Intrinsic Support')
have_a64neon = true
endif
endif
endif
if have_a64neon
config.set10('USE_ARM_A64_NEON', true)
elif use_a64neon.enabled()
error('A64 NEON Support unavailable, but required')
endif
use_mips_dspr2 = get_option('mips-dspr2')
have_mips_dspr2 = false
mips_dspr2_flags = ['-mdspr2']
if not use_mips_dspr2.disabled()
if host_machine.cpu_family().startswith('mips')
if cc.compiles('''
#if !(defined(__mips__) && __mips_isa_rev >= 2)
#error MIPS DSPr2 is currently only available on MIPS32r2 platforms.
#endif
int
main ()
{
int c = 0, a = 0, b = 0;
__asm__ __volatile__ (
"precr.qb.ph %[c], %[a], %[b] \n\t"
: [c] "=r" (c)
: [a] "r" (a), [b] "r" (b)
);
return c;
}''',
args : mips_dspr2_flags,
name : 'DSPr2 Intrinsic Support')
have_mips_dspr2 = true
endif
endif
endif
if have_mips_dspr2
config.set10('USE_MIPS_DSPR2', true)
elif use_mips_dspr2.enabled()
error('MIPS DSPr2 Support unavailable, but required')
endif
use_rvv = get_option('rvv')
have_rvv = false
rvv_flags = ['-march=rv64gcv']
if not use_rvv.disabled()
if host_machine.cpu_family() == 'riscv64'
if cc.compiles('''
#include <riscv_vector.h>
int main() { vfloat32m1_t tmp; return 0; }
''',
args : rvv_flags,
name : 'RISC-V Vector Intrinsic Support')
have_rvv = true
endif
endif
endif
if have_rvv
config.set10('USE_RVV', true)
elif use_rvv.enabled()
error('RISC-V Vector Support unavailable, but required')
endif
use_gnu_asm = get_option('gnu-inline-asm')
if not use_gnu_asm.disabled()
if cc.compiles('''
int main () {
/* Most modern architectures have a NOP instruction, so this is a fairly generic test. */
asm volatile ( "\tnop\n" : : : "cc", "memory" );
return 0;
}
''',
name : 'GNU Inline ASM support.')
config.set10('USE_GCC_INLINE_ASM', true)
elif use_gnu_asm.enabled()
error('GNU inline assembly support missing but required.')
endif
endif
if get_option('timers')
config.set('PIXMAN_TIMERS', 1)
endif
if get_option('gnuplot')
config.set('PIXMAN_GNUPLOT', 1)
endif
if cc.get_id() != 'msvc'
dep_openmp = dependency('openmp', required : get_option('openmp'))
if dep_openmp.found()
config.set10('USE_OPENMP', true)
elif meson.version().version_compare('<0.51.0')
# In versions of meson before 0.51 the openmp dependency can still
# inject arguments in the the auto case when it is not found, the
# detection does work correctly in that case however, so we just
# replace dep_openmp with null_dep to work around this.
dep_openmp = null_dep
endif
else
# the MSVC implementation of openmp is not compliant enough for our
# uses here, so we disable it here.
# Please see: https://stackoverflow.com/questions/12560243/using-threadprivate-directive-in-visual-studio
dep_openmp = null_dep
endif
dep_gtk = dependency('gtk+-3.0', required : get_option('gtk').enabled() and get_option('demos').enabled())
dep_glib = dependency('glib-2.0', required : get_option('gtk').enabled() and get_option('demos').enabled())
dep_png = null_dep
if not get_option('libpng').disabled()
dep_png = dependency('libpng', required : false)
# We need to look for the right library to link to for libpng,
# when looking for libpng manually
foreach png_ver : [ '16', '15', '14', '13', '12', '10' ]
if not dep_png.found()
dep_png = cc.find_library('libpng@0@'.format(png_ver), has_headers : ['png.h'], required : false)
endif
endforeach
if get_option('libpng').enabled() and not dep_png.found()
error('libpng support requested but libpng library not found')
endif
endif
if dep_png.found()
config.set('HAVE_LIBPNG', 1)
endif
dep_m = cc.find_library('m', required : false)
dep_threads = dependency('threads')
# MSVC-style compilers do not come with pthreads, so we must link
# to it explicitly, currently pthreads-win32 is supported
pthreads_found = false
if dep_threads.found() and cc.has_header('pthread.h')
if cc.get_argument_syntax() == 'msvc'
pthread_lib = null_dep
foreach pthread_type : ['VC3', 'VSE3', 'VCE3', 'VC2', 'VSE2', 'VCE2']
if not pthread_lib.found()
pthread_lib = cc.find_library('pthread@0@'.format(pthread_type), required : false)
endif
endforeach
if pthread_lib.found()
pthreads_found = true
dep_threads = pthread_lib
endif
else
pthreads_found = true
endif
else
# Avoid linking with -pthread if we don't actually have pthreads
dep_threads = null_dep
endif
if pthreads_found
config.set('HAVE_PTHREADS', 1)
endif
funcs = ['sigaction', 'alarm', 'mprotect', 'getpagesize', 'mmap', 'getisax', 'gettimeofday']
# mingw claimes to have posix_memalign, but it doesn't
if host_machine.system() != 'windows'
funcs += 'posix_memalign'
endif
foreach f : funcs
if cc.has_function(f)
config.set('HAVE_@0@'.format(f.to_upper()), 1)
endif
endforeach
# This is only used in one test, that defines _GNU_SOURCE
if cc.has_function('feenableexcept',
prefix : '#define _GNU_SOURCE\n#include <fenv.h>',
dependencies : dep_m)
config.set('HAVE_FEENABLEEXCEPT', 1)
endif
if cc.has_header_symbol('fenv.h', 'FE_DIVBYZERO')
config.set('HAVE_FEDIVBYZERO', 1)
endif
foreach h : ['sys/mman.h', 'fenv.h', 'unistd.h']
if cc.check_header(h)
config.set('HAVE_@0@'.format(h.underscorify().to_upper()), 1)
endif
endforeach
use_tls = get_option('tls')
have_tls = ''
if not use_tls.disabled()
# gcc on Windows only warns that __declspec(thread) isn't supported,
# passing -Werror=attributes makes it fail.
if (host_machine.system() == 'windows' and
cc.compiles('int __declspec(thread) foo;',
args : cc.get_supported_arguments(['-Werror=attributes']),
name : 'TLS via __declspec(thread)'))
have_tls = '__declspec(thread)'
elif cc.compiles('int __thread foo;', name : 'TLS via __thread')
have_tls = '__thread'
endif
endif
if have_tls != ''
config.set('TLS', have_tls)
elif use_tls.enabled()
error('Compiler TLS Support unavailable, but required')
endif
if cc.links('''
static int x = 1;
static void __attribute__((constructor)) constructor_function () { x = 0; }
int main (void) { return x; }
''',
name : '__attribute__((constructor))')
config.set('TOOLCHAIN_SUPPORTS_ATTRIBUTE_CONSTRUCTOR', 1)
endif
if cc.links('''
static int x = 1;
static void __attribute__((destructor)) destructor_function () { x = 0; }
int main (void) { return x; }
''',
name : '__attribute__((destructor))')
config.set('TOOLCHAIN_SUPPORTS_ATTRIBUTE_DESTRUCTOR', 1)
endif
if cc.links(
' __float128 a = 1.0Q, b = 2.0Q; int main (void) { return a + b; }',
name : 'Has float128 support')
config.set('HAVE_FLOAT128', 1)
endif
if cc.has_function('clz')
config.set('HAVE_BUILTIN_CLZ', 1)
endif
if cc.links('''
unsigned int __attribute__ ((vector_size(16))) e, a, b;
int main (void) { e = a - ((b << 27) + (b >> (32 - 27))) + 1; return e[0]; }
''',
name : 'Support for GCC vector extensions')
config.set('HAVE_GCC_VECTOR_EXTENSIONS', 1)
endif
if host_machine.endian() == 'big'
config.set('WORDS_BIGENDIAN', 1)
endif
config.set('SIZEOF_LONG', cc.sizeof('long'))
# Required to make pixman-private.h
config.set('PACKAGE', 'foo')
version_conf = configuration_data()
split = meson.project_version().split('.')
version_conf.set('PIXMAN_VERSION_MAJOR', split[0])
version_conf.set('PIXMAN_VERSION_MINOR', split[1])
version_conf.set('PIXMAN_VERSION_MICRO', split[2])
add_project_arguments('-DHAVE_CONFIG_H', language : ['c'])
subdir('pixman')
if not get_option('tests').disabled() or not get_option('demos').disabled()
subdir(join_paths('test', 'utils'))
endif
if not get_option('demos').disabled()
subdir('demos')
endif
if not get_option('tests').disabled()
subdir('test')
endif
pkg = import('pkgconfig')
pkg.generate(libpixman,
name : 'Pixman',
filebase : 'pixman-1',
description : 'The pixman library (version 1)',
subdirs: 'pixman-1',
version : meson.project_version(),
)

122
meson_options.txt Normal file
View File

@ -0,0 +1,122 @@
# Copyright © 2018 Intel Corporation
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
option(
'loongson-mmi',
type : 'feature',
description : 'Use Loongson MMI intrinsic optimized paths',
)
option(
'mmx',
type : 'feature',
description : 'Use X86 MMX intrinsic optimized paths',
)
option(
'sse2',
type : 'feature',
description : 'Use X86 SSE2 intrinsic optimized paths',
)
option(
'ssse3',
type : 'feature',
description : 'Use X86 SSSE3 intrinsic optimized paths',
)
option(
'vmx',
type : 'feature',
description : 'Use PPC VMX/Altivec intrinsic optimized paths',
)
option(
'arm-simd',
type : 'feature',
description : 'Use ARMv6 SIMD intrinsic optimized paths',
)
option(
'neon',
type : 'feature',
description : 'Use ARM NEON intrinsic optimized paths',
)
option(
'a64-neon',
type : 'feature',
description : 'Use ARM A64 NEON intrinsic optimized paths',
)
option(
'mips-dspr2',
type : 'feature',
description : 'Use MIPS32 DSPr2 intrinsic optimized paths',
)
option(
'rvv',
type : 'feature',
description : 'Use RISC-V Vector extension',
)
option(
'gnu-inline-asm',
type : 'feature',
description : 'Use GNU style inline assembler',
)
option(
'tls',
type : 'feature',
description : 'Use compiler support for thread-local storage',
)
option(
'cpu-features-path',
type : 'string',
description : 'Path to platform-specific cpu-features.[ch] for systems that do not provide it (e.g. Android)',
)
option(
'openmp',
type : 'feature',
description : 'Enable OpenMP for tests',
)
option(
'timers',
type : 'boolean',
value : false,
description : 'Enable TIMER_* macros',
)
option(
'gnuplot',
type : 'boolean',
value : false,
description : 'Enable output of filters that can be piped to gnuplot',
)
option(
'gtk',
type : 'feature',
description : 'Enable demos using GTK',
)
option(
'libpng',
type : 'feature',
description : 'Use libpng in tests'
)
option(
'tests',
type : 'feature',
description : 'Build tests'
)
option(
'demos',
type : 'feature',
description : 'Build demos'
)

12
neon-test.S Normal file
View File

@ -0,0 +1,12 @@
.text
.fpu neon
.arch armv7a
.object_arch armv4
.eabi_attribute 10, 0
.arm
.altmacro
#ifndef __ARM_EABI__
#error EABI is required (to be sure that calling conventions are compatible)
#endif
pld [r0]
vmovn.u16 d0, q0

View File

@ -1,5 +0,0 @@
Name: Pixman
Description: The pixman library (version 1)
Version: @PACKAGE_VERSION@
Cflags: -I${pc_top_builddir}/${pcfiledir}/pixman
Libs: ${pc_top_builddir}/${pcfiledir}/pixman/libpixman-1.la

View File

@ -1,11 +0,0 @@
prefix=@prefix@
exec_prefix=@exec_prefix@
libdir=@libdir@
includedir=@includedir@
Name: Pixman
Description: The pixman library (version 1)
Version: @PACKAGE_VERSION@
Cflags: -I${includedir}/pixman-1
Libs: -L${libdir} -lpixman-1

View File

@ -1,141 +0,0 @@
include $(top_srcdir)/pixman/Makefile.sources
lib_LTLIBRARIES = libpixman-1.la
libpixman_1_la_LDFLAGS = -version-info $(LT_VERSION_INFO) -no-undefined @PTHREAD_LDFLAGS@
libpixman_1_la_LIBADD = @PTHREAD_LIBS@ -lm
libpixman_1_la_SOURCES = $(libpixman_sources) $(libpixman_headers)
libpixmanincludedir = $(includedir)/pixman-1
libpixmaninclude_HEADERS = pixman.h pixman-version.h
noinst_LTLIBRARIES =
EXTRA_DIST = \
Makefile.win32 \
pixman-region.c \
solaris-hwcap.mapfile \
$(NULL)
# mmx code
if USE_X86_MMX
noinst_LTLIBRARIES += libpixman-mmx.la
libpixman_mmx_la_SOURCES = \
pixman-mmx.c
libpixman_mmx_la_CFLAGS = $(MMX_CFLAGS)
libpixman_1_la_LDFLAGS += $(MMX_LDFLAGS)
libpixman_1_la_LIBADD += libpixman-mmx.la
ASM_CFLAGS_mmx=$(MMX_CFLAGS)
endif
# vmx code
if USE_VMX
noinst_LTLIBRARIES += libpixman-vmx.la
libpixman_vmx_la_SOURCES = \
pixman-vmx.c \
pixman-combine32.h
libpixman_vmx_la_CFLAGS = $(VMX_CFLAGS)
libpixman_1_la_LIBADD += libpixman-vmx.la
ASM_CFLAGS_vmx=$(VMX_CFLAGS)
endif
# sse2 code
if USE_SSE2
noinst_LTLIBRARIES += libpixman-sse2.la
libpixman_sse2_la_SOURCES = \
pixman-sse2.c
libpixman_sse2_la_CFLAGS = $(SSE2_CFLAGS)
libpixman_1_la_LDFLAGS += $(SSE2_LDFLAGS)
libpixman_1_la_LIBADD += libpixman-sse2.la
ASM_CFLAGS_sse2=$(SSE2_CFLAGS)
endif
# ssse3 code
if USE_SSSE3
noinst_LTLIBRARIES += libpixman-ssse3.la
libpixman_ssse3_la_SOURCES = \
pixman-ssse3.c
libpixman_ssse3_la_CFLAGS = $(SSSE3_CFLAGS)
libpixman_1_la_LDFLAGS += $(SSSE3_LDFLAGS)
libpixman_1_la_LIBADD += libpixman-ssse3.la
ASM_CFLAGS_ssse3=$(SSSE3_CFLAGS)
endif
# arm simd code
if USE_ARM_SIMD
noinst_LTLIBRARIES += libpixman-arm-simd.la
libpixman_arm_simd_la_SOURCES = \
pixman-arm-simd.c \
pixman-arm-common.h \
pixman-arm-simd-asm.S \
pixman-arm-simd-asm-scaled.S \
pixman-arm-asm.h \
pixman-arm-simd-asm.h
libpixman_1_la_LIBADD += libpixman-arm-simd.la
ASM_CFLAGS_arm_simd=
endif
# arm neon code
if USE_ARM_NEON
noinst_LTLIBRARIES += libpixman-arm-neon.la
libpixman_arm_neon_la_SOURCES = \
pixman-arm-neon.c \
pixman-arm-common.h \
pixman-arm-neon-asm.S \
pixman-arm-neon-asm-bilinear.S \
pixman-arm-asm.h \
pixman-arm-neon-asm.h
libpixman_1_la_LIBADD += libpixman-arm-neon.la
ASM_CFLAGS_arm_neon=
endif
# iwmmxt code
if USE_ARM_IWMMXT
libpixman_iwmmxt_la_SOURCES = pixman-mmx.c
noinst_LTLIBRARIES += libpixman-iwmmxt.la
libpixman_1_la_LIBADD += libpixman-iwmmxt.la
libpixman_iwmmxt_la-pixman-mmx.lo: pixman-mmx.c
$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(AM_CPPFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) $(CFLAGS) $(IWMMXT_CFLAGS) -MT libpixman_iwmmxt_la-pixman-mmx.lo -MD -MP -MF $(DEPDIR)/libpixman_iwmmxt_la-pixman-mmx.Tpo -c -o libpixman_iwmmxt_la-pixman-mmx.lo `test -f 'pixman-mmx.c' || echo '$(srcdir)/'`pixman-mmx.c
$(AM_V_at)$(am__mv) $(DEPDIR)/libpixman_iwmmxt_la-pixman-mmx.Tpo $(DEPDIR)/libpixman_iwmmxt_la-pixman-mmx.Plo
libpixman_iwmmxt_la_DEPENDENCIES = $(am__DEPENDENCIES_1)
libpixman_iwmmxt_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
$(CFLAGS) $(IWMMXT_CFLAGS) $(AM_LDFLAGS) \
$(LDFLAGS) -o $@
libpixman-iwmmxt.la: libpixman_iwmmxt_la-pixman-mmx.lo $(libpixman_iwmmxt_la_DEPENDENCIES)
$(AM_V_CCLD)$(libpixman_iwmmxt_la_LINK) libpixman_iwmmxt_la-pixman-mmx.lo $(libpixman_iwmmxt_la_LIBADD) $(LIBS)
endif
# mips dspr2 code
if USE_MIPS_DSPR2
noinst_LTLIBRARIES += libpixman-mips-dspr2.la
libpixman_mips_dspr2_la_SOURCES = \
pixman-mips-dspr2.c \
pixman-mips-dspr2.h \
pixman-mips-dspr2-asm.S \
pixman-mips-dspr2-asm.h \
pixman-mips-memcpy-asm.S
libpixman_1_la_LIBADD += libpixman-mips-dspr2.la
ASM_CFLAGS_mips_dspr2=
endif
# loongson code
if USE_LOONGSON_MMI
noinst_LTLIBRARIES += libpixman-loongson-mmi.la
libpixman_loongson_mmi_la_SOURCES = pixman-mmx.c loongson-mmintrin.h
libpixman_loongson_mmi_la_CFLAGS = $(LS_CFLAGS)
libpixman_1_la_LDFLAGS += $(LS_LDFLAGS)
libpixman_1_la_LIBADD += libpixman-loongson-mmi.la
endif
.c.s : $(libpixmaninclude_HEADERS)
$(CC) $(CFLAGS) $(ASM_CFLAGS_$(@:pixman-%.s=%)) $(ASM_CFLAGS_$(@:pixman-arm-%.s=arm_%)) -DHAVE_CONFIG_H -I$(srcdir) -I$(builddir) -I$(top_builddir) -S -o $@ $<

View File

@ -1,42 +0,0 @@
libpixman_sources = \
pixman.c \
pixman-access.c \
pixman-access-accessors.c \
pixman-bits-image.c \
pixman-combine32.c \
pixman-combine-float.c \
pixman-conical-gradient.c \
pixman-filter.c \
pixman-x86.c \
pixman-mips.c \
pixman-arm.c \
pixman-ppc.c \
pixman-edge.c \
pixman-edge-accessors.c \
pixman-fast-path.c \
pixman-glyph.c \
pixman-general.c \
pixman-gradient-walker.c \
pixman-image.c \
pixman-implementation.c \
pixman-linear-gradient.c \
pixman-matrix.c \
pixman-noop.c \
pixman-radial-gradient.c \
pixman-region16.c \
pixman-region32.c \
pixman-solid-fill.c \
pixman-timer.c \
pixman-trap.c \
pixman-utils.c \
$(NULL)
libpixman_headers = \
pixman.h \
pixman-accessor.h \
pixman-combine32.h \
pixman-compiler.h \
pixman-edge-imp.h \
pixman-inlines.h \
pixman-private.h \
$(NULL)

View File

@ -1,93 +0,0 @@
default: all
top_srcdir = ..
include $(top_srcdir)/pixman/Makefile.sources
include $(top_srcdir)/Makefile.win32.common
MMX_VAR = $(MMX)
ifeq ($(MMX_VAR),)
MMX_VAR=on
endif
SSE2_VAR = $(SSE2)
ifeq ($(SSE2_VAR),)
SSE2_VAR=on
endif
SSSE3_VAR = $(SSSE3)
ifeq ($(SSSE3_VAR),)
SSSE3_VAR=on
endif
MMX_CFLAGS = -DUSE_X86_MMX -w14710 -w14714
SSE2_CFLAGS = -DUSE_SSE2
SSSE3_CFLAGS = -DUSE_SSSE3
# MMX compilation flags
ifeq ($(MMX_VAR),on)
PIXMAN_CFLAGS += $(MMX_CFLAGS)
libpixman_sources += pixman-mmx.c
endif
# SSE2 compilation flags
ifeq ($(SSE2_VAR),on)
PIXMAN_CFLAGS += $(SSE2_CFLAGS)
libpixman_sources += pixman-sse2.c
endif
# SSSE3 compilation flags
ifeq ($(SSSE3_VAR),on)
PIXMAN_CFLAGS += $(SSSE3_CFLAGS)
libpixman_sources += pixman-ssse3.c
endif
OBJECTS = $(patsubst %.c, $(CFG_VAR)/%.obj, $(libpixman_sources))
# targets
all: inform informMMX informSSE2 informSSSE3 $(CFG_VAR)/$(LIBRARY).lib
informMMX:
ifneq ($(MMX),off)
ifneq ($(MMX),on)
ifneq ($(MMX),)
@echo "Invalid specified MMX option : "$(MMX_VAR)"."
@echo
@echo "Possible choices for MMX are 'on' or 'off'"
@exit 1
endif
@echo "Setting MMX flag to default value 'on'... (use MMX=on or MMX=off)"
endif
endif
informSSE2:
ifneq ($(SSE2),off)
ifneq ($(SSE2),on)
ifneq ($(SSE2),)
@echo "Invalid specified SSE option : "$(SSE2)"."
@echo
@echo "Possible choices for SSE2 are 'on' or 'off'"
@exit 1
endif
@echo "Setting SSE2 flag to default value 'on'... (use SSE2=on or SSE2=off)"
endif
endif
informSSSE3:
ifneq ($(SSSE3),off)
ifneq ($(SSSE3),on)
ifneq ($(SSSE3),)
@echo "Invalid specified SSE option : "$(SSSE3)"."
@echo
@echo "Possible choices for SSSE3 are 'on' or 'off'"
@exit 1
endif
@echo "Setting SSSE3 flag to default value 'on'... (use SSSE3=on or SSSE3=off)"
endif
endif
# pixman linking
$(CFG_VAR)/$(LIBRARY).lib: $(OBJECTS)
@$(AR) $(PIXMAN_ARFLAGS) -OUT:$@ $^
.PHONY: all informMMX informSSE2 informSSSE3

View File

@ -0,0 +1,77 @@
/* WARNING: This file is generated by make-blue-noise.c
* Please edit that file instead of this one.
*/
#ifndef BLUE_NOISE_64X64_H
#define BLUE_NOISE_64X64_H
#include <stdint.h>
static const uint16_t dither_blue_noise_64x64[4096] = {
3039, 1368, 3169, 103, 2211, 1248, 2981, 668, 2633, 37, 3963, 2903, 384, 2564, 3115, 1973, 3348, 830, 2505, 1293, 3054, 1060, 1505, 3268, 400, 1341, 593, 3802, 3384, 429, 4082, 1411, 2503, 3863, 126, 1292, 1887, 2855, 205, 2094, 2977, 1899, 3924, 356, 3088, 2500, 3942, 1409, 2293, 1734, 3732, 1291, 3227, 277, 2054, 786, 2871, 411, 2425, 1678, 3986, 455, 2879, 2288,
388, 1972, 3851, 778, 2768, 3697, 944, 2123, 1501, 3533, 937, 1713, 1381, 3888, 156, 1242, 516, 2888, 1607, 3676, 632, 2397, 3804, 2673, 1898, 3534, 2593, 1777, 1170, 2299, 3013, 1838, 523, 3053, 1647, 3601, 3197, 959, 1520, 3633, 893, 2437, 3367, 2187, 1258, 137, 1965, 401, 3546, 643, 3087, 2498, 733, 2786, 3371, 4053, 1266, 1977, 3663, 183, 2570, 2107, 1183, 3708,
907, 2473, 1151, 3363, 1527, 1902, 232, 3903, 3060, 496, 2486, 3206, 2165, 861, 2387, 3653, 2101, 3972, 132, 2162, 3437, 1827, 215, 895, 3114, 271, 969, 2932, 197, 1598, 878, 3696, 1140, 2120, 904, 2431, 302, 3846, 2675, 481, 3187, 66, 1440, 650, 3833, 2826, 3435, 901, 2936, 2111, 250, 1875, 3609, 1174, 1747, 162, 2346, 3420, 913, 3172, 1383, 752, 3298, 1735,
3540, 2938, 249, 2324, 526, 3099, 2561, 1324, 2347, 1861, 1200, 3702, 257, 3442, 1514, 2999, 992, 1766, 2735, 1163, 478, 2943, 1279, 3635, 2177, 1464, 3672, 2386, 3871, 3340, 2690, 64, 3489, 2811, 3999, 633, 1948, 1243, 2269, 1807, 1143, 2750, 3729, 1790, 2363, 1053, 1537, 2636, 4065, 1076, 1476, 3869, 450, 2200, 2676, 658, 2979, 1548, 544, 1913, 2838, 3911, 116, 2698,
517, 1295, 3997, 1739, 3665, 1083, 3509, 599, 3400, 118, 2956, 720, 2689, 1907, 567, 2523, 284, 3397, 711, 3219, 2450, 3985, 1665, 2549, 562, 3011, 1855, 729, 1355, 528, 1908, 2456, 1384, 337, 1540, 2654, 3138, 3513, 703, 4080, 3314, 2047, 855, 3037, 209, 3317, 577, 1828, 17, 2336, 3193, 2748, 962, 3441, 1450, 3246, 1075, 3878, 2615, 3497, 1033, 2310, 1442, 2183,
1654, 3254, 2061, 738, 2832, 148, 2030, 1670, 909, 3850, 2109, 1533, 4046, 1085, 3098, 3897, 1378, 2248, 3829, 1495, 1966, 23, 797, 3427, 1124, 4057, 95, 2787, 2190, 3074, 3950, 742, 3194, 1999, 3386, 1113, 16, 1657, 2804, 201, 1543, 383, 2559, 1325, 3604, 2068, 2493, 3771, 1284, 3460, 710, 1716, 2447, 80, 3811, 2032, 347, 2227, 15, 1689, 397, 3084, 662, 3798,
973, 43, 2608, 3143, 1459, 2423, 4066, 2770, 3191, 1283, 2630, 314, 3235, 2289, 72, 1822, 2840, 924, 350, 2653, 1057, 3715, 2235, 2775, 346, 2083, 1553, 3292, 1081, 274, 1686, 1188, 2327, 3743, 578, 2234, 3916, 2519, 1011, 3056, 2207, 3438, 3890, 537, 1617, 837, 3094, 373, 2795, 1980, 276, 3951, 1353, 3015, 844, 1724, 3651, 2923, 1316, 4092, 2504, 3627, 1936, 2854,
2461, 3929, 1193, 421, 3746, 820, 1180, 286, 2261, 532, 3625, 1812, 802, 1327, 3527, 670, 3730, 2025, 3124, 3565, 529, 2960, 1769, 1390, 3196, 2494, 3756, 796, 3618, 2602, 3463, 2847, 166, 953, 1745, 2900, 438, 2070, 1418, 3741, 639, 1205, 1891, 2882, 2282, 4012, 1182, 1696, 3630, 951, 2904, 2170, 3530, 375, 2320, 2742, 1132, 701, 3216, 2023, 847, 1230, 310, 3431,
770, 1961, 3531, 1702, 2181, 3370, 1877, 3072, 1571, 3389, 1071, 2415, 3782, 2803, 1610, 2454, 1211, 182, 1655, 2322, 1282, 3372, 287, 3935, 704, 1232, 415, 1910, 2286, 1399, 556, 1964, 4068, 2444, 3605, 1272, 3345, 816, 3526, 256, 2402, 2777, 955, 345, 3289, 111, 2727, 635, 2396, 1488, 3331, 600, 1032, 1575, 4026, 515, 3507, 2433, 1605, 460, 3364, 2783, 1810, 1397,
2334, 223, 2945, 688, 2533, 99, 2705, 624, 3944, 2073, 46, 2978, 508, 2132, 269, 3173, 3453, 2631, 4076, 694, 1892, 2586, 972, 2178, 3470, 1695, 2849, 3141, 77, 3884, 994, 3029, 1536, 673, 3083, 124, 2583, 1722, 2821, 1944, 4027, 1661, 3176, 3728, 1337, 1813, 3503, 2035, 3930, 157, 2537, 1865, 3096, 2646, 1941, 3252, 1449, 135, 2836, 3758, 2139, 84, 3678, 3106,
3862, 1545, 3307, 1320, 3955, 1031, 3664, 1306, 2460, 776, 1487, 3294, 1187, 3990, 1903, 1021, 549, 1484, 943, 3027, 97, 3853, 1499, 2880, 198, 2575, 3995, 1089, 1587, 2475, 3282, 339, 2657, 1158, 2105, 1493, 3943, 580, 3232, 1287, 846, 48, 2480, 2112, 771, 2534, 459, 3134, 850, 1298, 3790, 325, 3652, 1249, 193, 940, 2202, 3895, 1829, 911, 1366, 2577, 1069, 534,
2104, 1009, 2667, 392, 1983, 2917, 1645, 324, 3439, 2869, 3705, 1767, 2592, 756, 2916, 3683, 2276, 2850, 2053, 3594, 2403, 3181, 634, 3699, 1933, 906, 519, 2150, 3673, 764, 1770, 2220, 3795, 3336, 502, 3547, 2339, 1110, 301, 2210, 3354, 3643, 569, 1518, 2940, 3973, 1138, 1613, 2773, 2127, 2983, 1671, 769, 2161, 3800, 2730, 3127, 1179, 533, 3259, 2284, 4014, 1651, 2820,
3566, 653, 1839, 3455, 2399, 789, 3149, 2244, 1863, 1099, 474, 2307, 158, 3541, 1312, 1711, 0, 3902, 360, 1629, 1091, 395, 1781, 1191, 2374, 3353, 1419, 3225, 206, 2931, 3553, 1046, 54, 1646, 2470, 910, 1860, 3137, 3770, 2635, 1562, 2809, 1215, 3788, 222, 2199, 3335, 67, 3606, 524, 1001, 3309, 2410, 3473, 591, 1619, 291, 2502, 3629, 2891, 335, 741, 3378, 168,
2384, 3129, 4051, 22, 1444, 3613, 543, 3893, 186, 2665, 4062, 933, 3058, 2142, 449, 2711, 3224, 849, 1330, 3349, 2195, 2670, 3484, 2993, 32, 3774, 2722, 1859, 2548, 1268, 583, 2027, 3165, 2807, 4029, 227, 2897, 1434, 721, 1816, 195, 905, 2066, 3258, 1754, 970, 2674, 1880, 2338, 3915, 1485, 2660, 14, 1313, 2914, 2046, 4074, 791, 1917, 1301, 1725, 2687, 2019, 1443,
418, 1186, 1664, 2859, 1049, 2056, 2741, 1226, 1589, 3186, 2042, 1377, 3449, 1574, 3941, 1063, 1930, 2501, 3751, 2930, 671, 4031, 888, 2081, 1544, 684, 1117, 351, 4052, 1698, 2393, 3881, 1439, 785, 1277, 2013, 3488, 441, 2459, 3980, 3061, 3481, 2543, 419, 3020, 609, 3515, 1350, 799, 2878, 348, 2034, 3966, 1824, 950, 3281, 1394, 2239, 3452, 55, 3922, 3119, 892, 3785,
3023, 2140, 782, 2492, 3817, 241, 3355, 2424, 856, 3639, 612, 2556, 245, 2858, 705, 2316, 3562, 495, 1748, 128, 1912, 1454, 280, 2552, 3905, 3130, 2274, 3472, 834, 3055, 240, 2692, 471, 2272, 3301, 2632, 1080, 3693, 2136, 1029, 1364, 590, 1611, 4067, 1190, 2360, 3827, 261, 3180, 1768, 3471, 1103, 3003, 520, 3674, 151, 2571, 555, 3033, 982, 2353, 504, 1259, 2555,
149, 3889, 3380, 493, 3178, 1681, 663, 1924, 2990, 49, 1792, 3861, 1192, 1987, 3273, 297, 1457, 3043, 1177, 2292, 3249, 2829, 3682, 1154, 1758, 428, 2872, 1993, 1500, 3703, 1129, 3421, 1840, 3754, 163, 659, 1733, 3182, 38, 2875, 1957, 3614, 2237, 78, 1873, 2801, 1513, 2121, 1074, 2516, 667, 3710, 1429, 2430, 2088, 2830, 1072, 3557, 1531, 2733, 1955, 3286, 3590, 1826,
2778, 1068, 1932, 1452, 2279, 1185, 3564, 3952, 1391, 2726, 3313, 2331, 870, 3709, 1674, 2772, 4085, 808, 2596, 3848, 927, 538, 2335, 3334, 773, 3597, 1347, 109, 2663, 608, 2108, 2994, 936, 1524, 2922, 3968, 2422, 1467, 845, 3870, 321, 2704, 1073, 3308, 3680, 823, 430, 3375, 4030, 112, 2171, 2695, 267, 3374, 731, 1627, 3919, 1871, 352, 3839, 1370, 234, 794, 1532,
3245, 647, 3575, 74, 3045, 2766, 285, 2174, 498, 1059, 1551, 385, 3125, 2598, 143, 1128, 2095, 3395, 318, 1590, 3524, 1345, 1969, 242, 2759, 2092, 947, 3926, 3244, 2356, 1658, 6, 3593, 2554, 1172, 1995, 371, 2755, 3417, 2294, 1570, 3164, 748, 2517, 1401, 3111, 2420, 1662, 2910, 1276, 3276, 854, 1804, 4000, 1253, 2987, 229, 2344, 3184, 649, 2196, 2921, 4095, 2389,
1289, 2193, 2579, 4023, 757, 1858, 986, 3199, 2514, 3475, 4021, 2154, 651, 1432, 3468, 2404, 574, 1799, 3105, 2145, 86, 2614, 3218, 1565, 4088, 2481, 3079, 1815, 323, 1212, 3837, 759, 2159, 435, 3223, 784, 3659, 1114, 1888, 550, 1221, 3786, 1803, 499, 2117, 185, 3763, 942, 589, 2001, 3838, 1483, 3154, 2256, 468, 2544, 3403, 898, 1208, 2610, 3622, 967, 1929, 378,
3781, 220, 1656, 1115, 3347, 2428, 3822, 1577, 712, 1959, 110, 2765, 1762, 3854, 979, 2928, 3714, 1371, 746, 3969, 2884, 975, 3779, 641, 1142, 159, 1460, 702, 3485, 2866, 2495, 3330, 1305, 3937, 1635, 2229, 2962, 146, 4055, 3091, 2417, 100, 3508, 2933, 4006, 1167, 1920, 2760, 3552, 2545, 433, 2845, 142, 1056, 1886, 3616, 1435, 2099, 3803, 1749, 27, 1446, 3350, 2843,
884, 3310, 2948, 2103, 447, 1351, 187, 2895, 3655, 1256, 3036, 932, 3325, 2257, 451, 1915, 40, 2780, 2438, 1112, 1814, 423, 2290, 1905, 2898, 3419, 2306, 3760, 1938, 486, 1019, 1791, 3010, 2628, 203, 3408, 1269, 2507, 1606, 862, 2779, 2078, 952, 1529, 2638, 708, 3332, 1413, 2, 1726, 1156, 3500, 2392, 3791, 3076, 812, 107, 2861, 501, 3050, 3487, 2455, 594, 1731,
2685, 1498, 680, 3908, 2621, 3529, 1786, 2236, 342, 2569, 1526, 3722, 230, 1290, 3203, 3947, 1609, 3516, 467, 3267, 3685, 1461, 3140, 3569, 367, 1759, 928, 2754, 1332, 2219, 4034, 260, 655, 1984, 978, 3814, 617, 2086, 3525, 279, 3841, 1373, 3361, 319, 2251, 3066, 407, 2382, 3918, 3133, 2168, 762, 1523, 507, 2641, 1677, 4025, 2413, 1584, 793, 2049, 1109, 3962, 2218,
1194, 3692, 266, 1687, 981, 3103, 740, 3983, 1005, 3434, 570, 2383, 1942, 2718, 676, 2462, 1007, 2089, 1308, 2222, 233, 2568, 829, 1241, 2669, 3987, 514, 3303, 69, 3142, 1603, 3560, 2295, 3288, 1497, 2696, 1764, 2865, 1058, 3271, 1914, 477, 2529, 3927, 1736, 1273, 3752, 2029, 1012, 565, 2798, 4078, 1949, 3305, 1175, 2179, 380, 3366, 1195, 3849, 2637, 416, 2959, 125,
3396, 2467, 2036, 3234, 2340, 68, 2819, 1436, 2011, 3139, 1704, 4073, 860, 3582, 1468, 2969, 211, 3157, 4056, 866, 2935, 2000, 3923, 31, 2157, 1477, 2429, 1147, 3792, 2557, 774, 2802, 1153, 3747, 464, 3192, 42, 3904, 539, 1474, 2283, 803, 2876, 1061, 75, 3477, 747, 2893, 1538, 3626, 251, 1322, 2506, 189, 2791, 3667, 939, 2991, 1971, 175, 3195, 1416, 3648, 1857,
3052, 454, 851, 3789, 1271, 1906, 3694, 2484, 406, 2757, 26, 1189, 2909, 296, 2215, 3784, 1864, 637, 2715, 1673, 3445, 581, 1572, 3059, 3469, 761, 2984, 1737, 2058, 440, 1414, 1921, 121, 2527, 894, 2223, 1302, 2377, 3077, 2666, 3759, 3198, 1811, 3661, 2166, 2731, 1883, 359, 3285, 2458, 1805, 3459, 926, 3834, 675, 1893, 1496, 2612, 657, 3523, 1763, 2354, 564, 961,
1367, 3977, 1588, 2714, 322, 3446, 1088, 625, 3887, 1354, 3535, 2090, 3316, 1760, 1127, 483, 3491, 1421, 2301, 94, 1202, 3740, 2311, 1014, 1878, 3836, 180, 3412, 991, 2868, 3953, 3450, 3081, 1632, 4071, 1882, 3543, 726, 1719, 179, 1171, 364, 1420, 622, 3090, 1490, 946, 4007, 2212, 1102, 619, 2739, 2189, 1669, 2937, 3426, 39, 3940, 2191, 1264, 887, 4091, 2792, 2135,
4, 2883, 2281, 631, 3044, 1641, 2232, 3243, 1773, 2319, 827, 2591, 629, 3938, 2426, 3222, 2629, 1044, 3879, 3293, 1952, 2749, 275, 2590, 472, 1372, 2496, 660, 3669, 2264, 208, 915, 2167, 561, 2828, 307, 3265, 1104, 3964, 2155, 3425, 1951, 4077, 2391, 283, 3387, 2581, 115, 1415, 3069, 3896, 141, 3158, 1214, 442, 2405, 1349, 3085, 425, 2528, 3002, 312, 1602, 3588,
1137, 3323, 1963, 1002, 3578, 2521, 127, 925, 2970, 273, 3737, 1573, 167, 2863, 1509, 800, 147, 2059, 2942, 409, 921, 3151, 1451, 3909, 3333, 2844, 2096, 1512, 3136, 1210, 1798, 2709, 1331, 3586, 1034, 1521, 2441, 2926, 488, 2585, 775, 3031, 2693, 879, 3602, 1173, 2028, 3654, 2781, 841, 1975, 1507, 3646, 768, 3991, 2012, 996, 3544, 1666, 3810, 1990, 3360, 753, 2597,
3736, 304, 1473, 3828, 485, 1334, 4008, 2072, 3495, 1136, 2806, 2004, 3236, 1010, 2130, 3819, 1750, 3567, 644, 2515, 1794, 3636, 698, 2137, 1162, 832, 3761, 326, 2613, 513, 3302, 3820, 357, 3163, 2259, 3733, 101, 1922, 1386, 3587, 1640, 28, 1286, 2141, 1761, 2918, 693, 1639, 457, 3250, 2434, 365, 2599, 1729, 3284, 2643, 306, 2793, 689, 1090, 104, 1309, 2305, 1831,
2776, 859, 2446, 2915, 1778, 3337, 2677, 614, 1508, 2409, 469, 4033, 1321, 3563, 402, 3131, 2720, 1093, 1569, 4042, 1229, 2277, 216, 3046, 1817, 57, 3006, 1684, 4059, 2016, 795, 2440, 1652, 1960, 610, 2763, 920, 3864, 3110, 1026, 2326, 3762, 3233, 521, 3856, 173, 2457, 3939, 2138, 1262, 3572, 989, 3021, 2238, 119, 1445, 3832, 1809, 2297, 3467, 2700, 3684, 3102, 394,
4036, 2050, 3256, 89, 2198, 1079, 248, 1845, 3805, 3104, 880, 1779, 2688, 717, 2373, 1375, 262, 2249, 3071, 13, 2813, 3429, 1600, 3984, 2416, 3603, 1299, 2298, 998, 3492, 1393, 2951, 10, 4009, 1247, 3462, 1679, 2204, 414, 2736, 316, 1894, 2816, 1050, 3373, 1462, 3107, 817, 3464, 21, 1835, 4070, 568, 1178, 3718, 875, 3168, 466, 2974, 1458, 2084, 616, 1564, 1018,
1693, 546, 1244, 3899, 716, 3160, 3608, 2877, 1220, 334, 3443, 2270, 44, 3000, 1843, 3928, 3405, 766, 3686, 2040, 587, 993, 2647, 387, 930, 2753, 630, 3274, 150, 2808, 453, 3638, 1092, 2352, 3030, 239, 2562, 700, 3240, 1257, 4016, 730, 1515, 2203, 2551, 417, 1866, 1123, 2348, 2902, 1550, 2678, 2075, 3238, 1630, 2531, 2115, 1255, 4054, 840, 290, 3874, 2477, 3399,
2250, 3577, 2817, 1626, 2576, 1356, 2315, 792, 2087, 2618, 1612, 3855, 1263, 3637, 1036, 494, 1535, 2553, 1198, 1715, 3867, 3170, 1359, 1954, 3483, 1539, 2069, 3886, 1772, 2487, 1534, 2045, 3242, 806, 1578, 2018, 3948, 1423, 3596, 2076, 2466, 3424, 139, 3688, 871, 4049, 2852, 3342, 547, 3719, 327, 852, 3505, 207, 2794, 542, 3600, 45, 2411, 3324, 1788, 3012, 1235, 61,
2655, 917, 253, 1986, 3738, 313, 1706, 4072, 120, 3229, 957, 597, 2024, 3262, 2453, 2857, 2002, 3190, 210, 2784, 2206, 300, 2400, 3766, 553, 3152, 218, 1150, 2988, 883, 3753, 627, 2664, 3831, 437, 3385, 1008, 2957, 60, 1636, 891, 2899, 1776, 3062, 1315, 2026, 194, 1643, 2079, 1296, 3201, 2465, 1379, 1927, 3898, 1125, 1847, 2846, 1552, 1028, 2725, 2169, 787, 3202,
1441, 3982, 3032, 1052, 3251, 605, 2639, 3073, 1431, 3642, 2329, 2949, 341, 1634, 833, 129, 4020, 916, 3571, 669, 1506, 3411, 821, 2856, 1207, 2337, 2683, 3448, 340, 2214, 3128, 235, 1738, 1288, 2833, 2419, 606, 1884, 2668, 552, 3765, 1176, 399, 2302, 596, 3591, 2634, 767, 3845, 2767, 995, 3967, 491, 3057, 814, 2300, 3422, 691, 3797, 254, 3645, 509, 3478, 1836,
2119, 475, 2445, 1525, 2175, 3539, 914, 1926, 473, 1157, 1800, 3971, 2701, 3739, 2129, 3486, 1333, 1784, 2366, 2982, 1070, 4089, 1802, 73, 1642, 3958, 835, 1837, 1480, 4043, 1217, 2469, 3416, 2113, 88, 3668, 1240, 3255, 3920, 2355, 3167, 2003, 2645, 3936, 3228, 1592, 1144, 3474, 2394, 79, 1820, 2241, 1594, 3656, 2584, 153, 1448, 3034, 2005, 2511, 1692, 1335, 3913, 217,
2822, 3391, 745, 3813, 192, 1274, 2941, 3847, 2489, 3440, 744, 161, 1422, 1086, 572, 3004, 2617, 338, 3807, 2031, 236, 2472, 3065, 2098, 3358, 362, 2163, 3574, 497, 2788, 1970, 948, 3885, 685, 3100, 1712, 2228, 292, 1408, 1016, 164, 3537, 1417, 941, 34, 2172, 3001, 358, 1491, 3147, 699, 3356, 258, 1149, 2946, 1787, 3931, 382, 1146, 3291, 818, 2890, 2379, 1096,
3679, 1328, 1901, 3162, 2747, 1730, 2253, 5, 1556, 2818, 2093, 3166, 2522, 3410, 2287, 1701, 956, 3237, 620, 1596, 3300, 1307, 511, 3701, 1020, 2939, 1362, 2532, 3208, 749, 3641, 160, 1522, 2624, 1095, 4086, 826, 2841, 3583, 2173, 1727, 723, 2925, 1911, 2482, 3726, 863, 1962, 4028, 1111, 2835, 3773, 2449, 2022, 582, 3278, 923, 2619, 2152, 4039, 92, 1934, 3145, 677,
2530, 53, 2303, 1003, 458, 3989, 739, 3321, 1064, 369, 3556, 877, 1900, 426, 3876, 1, 3617, 2106, 1197, 2805, 3634, 857, 2706, 1504, 2418, 682, 3868, 20, 1139, 1688, 2333, 3311, 2907, 1945, 265, 2385, 3433, 1601, 636, 2620, 3095, 4044, 386, 3382, 1184, 527, 2814, 3414, 2342, 465, 1889, 1343, 874, 3479, 1502, 2233, 3689, 1385, 559, 2745, 1463, 3465, 376, 1718,
3217, 4045, 1580, 3612, 2525, 1228, 3018, 1958, 3725, 2358, 1361, 3996, 1581, 3063, 1224, 2737, 1475, 2442, 3946, 191, 1796, 2128, 3975, 134, 1916, 3318, 1597, 2071, 3749, 2672, 403, 1278, 602, 3745, 3220, 1374, 445, 2064, 3830, 243, 1252, 2390, 1563, 2724, 3875, 1818, 1346, 165, 1650, 3264, 2680, 117, 2998, 4081, 343, 2799, 9, 3122, 1743, 3724, 1040, 2231, 3842, 1209,
900, 398, 2851, 697, 1797, 3482, 293, 2679, 1649, 566, 2954, 91, 2697, 714, 2060, 3211, 781, 480, 3040, 1038, 2611, 666, 2989, 3458, 1201, 2796, 548, 2975, 839, 3121, 1850, 4001, 2208, 1631, 790, 2558, 2972, 1148, 3213, 1849, 3624, 971, 2102, 108, 772, 3101, 2589, 3777, 1042, 656, 3907, 2097, 1615, 2540, 805, 1935, 1231, 3494, 2451, 268, 2995, 750, 2682, 2020,
3024, 1392, 2124, 3279, 106, 2217, 1387, 822, 3214, 3825, 2160, 1000, 2395, 3691, 228, 4038, 1872, 3413, 1608, 2225, 3536, 303, 1653, 886, 2541, 224, 4037, 2252, 1428, 172, 3504, 958, 2848, 113, 3628, 1834, 3979, 19, 2317, 779, 2797, 518, 3174, 3549, 1482, 2266, 444, 2014, 3555, 2439, 1213, 3113, 535, 1135, 3204, 3858, 2309, 931, 623, 2009, 3359, 1566, 140, 3550,
1808, 3872, 2488, 1152, 3764, 2892, 3960, 2412, 353, 1223, 1825, 3444, 3116, 1717, 1082, 2313, 1280, 2661, 82, 3852, 1389, 3200, 2330, 3812, 2038, 3581, 1728, 1039, 3339, 2427, 586, 2580, 1238, 3328, 2280, 1047, 595, 2662, 1363, 3338, 1620, 3934, 2497, 1881, 1054, 3954, 3215, 864, 2887, 1801, 320, 3519, 2378, 3704, 1753, 424, 2958, 1660, 4005, 2601, 1116, 3912, 2381, 573,
2740, 200, 828, 1667, 432, 1931, 1035, 1616, 3598, 2640, 728, 264, 1437, 557, 3501, 2966, 372, 3734, 974, 1978, 758, 2719, 1145, 452, 1433, 725, 2681, 408, 3843, 1918, 1547, 3906, 1996, 503, 1456, 3019, 3493, 1700, 3742, 355, 2134, 176, 1311, 615, 2867, 315, 1680, 1314, 8, 3297, 1494, 783, 1950, 83, 2656, 1382, 3561, 138, 2834, 1404, 330, 1904, 3156, 1027,
1357, 3381, 3041, 3666, 2729, 734, 3415, 177, 3051, 2021, 4079, 2823, 3775, 2186, 2616, 869, 1668, 3148, 2367, 3315, 393, 4075, 1870, 2920, 3343, 2362, 3188, 1303, 2782, 825, 3171, 259, 2905, 3717, 2538, 184, 2074, 838, 2860, 2407, 1024, 3496, 3008, 3706, 1985, 2349, 3623, 2582, 4058, 2184, 2694, 3873, 2964, 990, 3346, 690, 2033, 1066, 2201, 3490, 2971, 718, 3700, 2188,
4061, 391, 1989, 2325, 1430, 3150, 2125, 2526, 592, 1403, 976, 2351, 1165, 1851, 114, 3921, 2063, 613, 1358, 2785, 1623, 2254, 25, 3542, 1045, 246, 1852, 3554, 87, 2243, 3615, 1169, 727, 1705, 968, 3957, 3185, 1251, 500, 4063, 1751, 2622, 842, 1519, 90, 3393, 819, 490, 1874, 999, 571, 1275, 2271, 1586, 4040, 2448, 3126, 3731, 436, 885, 1708, 2421, 24, 1599,
889, 2563, 1199, 645, 70, 4013, 1237, 3723, 1694, 3499, 3, 3266, 484, 2997, 3390, 1233, 2842, 3687, 152, 3480, 1084, 3698, 881, 2490, 1542, 3992, 2209, 692, 1690, 3022, 1470, 2625, 2114, 3512, 2359, 381, 2684, 1897, 3368, 1395, 3080, 289, 2065, 3981, 2758, 1141, 3097, 1472, 2870, 3352, 3707, 225, 3159, 505, 1895, 214, 1222, 1774, 2686, 3978, 3275, 1196, 3518, 2825,
3270, 1720, 3796, 3466, 2650, 1841, 298, 899, 2862, 2091, 2671, 1744, 3735, 801, 1560, 349, 2262, 903, 1833, 2524, 512, 3117, 1793, 2827, 476, 3038, 1216, 2550, 3826, 980, 431, 4048, 35, 2992, 1265, 1595, 765, 3675, 76, 2247, 696, 3456, 1254, 2452, 664, 1757, 2133, 3750, 145, 2332, 1554, 1981, 3580, 2712, 868, 3640, 2919, 638, 2275, 1427, 309, 2595, 2006, 492,
2226, 178, 2911, 836, 1528, 3028, 2240, 3327, 404, 3970, 707, 1294, 2464, 2131, 4032, 2600, 3319, 1406, 2913, 3974, 2156, 1425, 221, 3877, 2017, 811, 3662, 272, 3287, 1988, 2408, 3357, 1746, 598, 3239, 3823, 2182, 2934, 1078, 2604, 3840, 1697, 2906, 413, 3210, 3880, 331, 2644, 1260, 848, 3042, 2535, 1077, 1438, 3261, 2365, 1561, 3799, 85, 3082, 1876, 674, 3932, 1101,
3644, 1344, 1943, 2401, 390, 3835, 1048, 2572, 1541, 1133, 3075, 3584, 308, 2889, 1065, 1869, 601, 3783, 282, 1181, 736, 3312, 2368, 1126, 3383, 1675, 2734, 1426, 628, 2873, 1317, 843, 2717, 2048, 1004, 2536, 333, 1782, 3295, 1517, 219, 2153, 815, 3502, 1579, 2268, 987, 3409, 1780, 4018, 354, 665, 3914, 47, 1956, 456, 1006, 2010, 3406, 1130, 3621, 2894, 1549, 3092,
2485, 640, 3993, 3179, 1270, 3436, 585, 1925, 3757, 2304, 136, 1976, 1486, 646, 3520, 50, 3155, 1637, 2435, 3522, 1937, 2756, 3748, 661, 2224, 58, 3230, 2357, 1830, 3892, 170, 3607, 1447, 3949, 190, 3392, 1336, 584, 4010, 918, 3016, 3670, 1155, 2406, 52, 1304, 3009, 607, 2085, 2699, 3205, 1848, 2291, 3402, 2764, 3865, 3048, 2508, 735, 2710, 443, 2341, 897, 263,
1785, 2769, 983, 56, 2197, 1685, 2703, 202, 2944, 810, 3377, 2626, 3787, 3047, 2055, 1236, 2752, 2122, 945, 3093, 96, 1624, 439, 3014, 1388, 4015, 977, 448, 3506, 1098, 2242, 3026, 506, 2361, 2952, 1862, 3619, 2790, 1992, 2483, 525, 1868, 2652, 4093, 1998, 3595, 2478, 3816, 122, 1412, 929, 3716, 1166, 1648, 813, 1300, 199, 1489, 3998, 1771, 1310, 3808, 2052, 3423,
434, 3712, 1625, 3558, 2955, 853, 4019, 1348, 3511, 1732, 1246, 487, 934, 1672, 2510, 3965, 788, 3711, 396, 1369, 4090, 1055, 2603, 1879, 3528, 2518, 2067, 3005, 1516, 2588, 751, 1740, 3418, 1131, 1576, 686, 2296, 1118, 18, 3263, 1365, 3401, 294, 737, 3177, 410, 867, 1633, 2963, 3579, 2375, 252, 2881, 479, 2471, 3576, 2180, 3306, 332, 2255, 3035, 41, 2648, 1396,
2929, 2230, 1219, 2512, 446, 2008, 3189, 2388, 626, 2164, 2831, 4047, 2376, 174, 3272, 368, 1469, 3226, 2578, 1991, 2874, 2263, 3681, 876, 188, 1239, 683, 3776, 226, 3183, 4083, 2148, 63, 2649, 3859, 299, 3086, 3933, 1585, 2185, 3767, 988, 1707, 2908, 1407, 1844, 2771, 2245, 1161, 560, 1755, 3376, 2051, 4064, 3135, 1832, 652, 2853, 1051, 3649, 760, 3290, 1105, 3945,
872, 154, 3207, 713, 3780, 1453, 281, 1087, 3695, 30, 3299, 1919, 1400, 3551, 1119, 1890, 2314, 618, 1703, 3428, 724, 295, 3146, 1557, 3341, 2896, 1683, 2723, 1974, 1017, 541, 1380, 3720, 804, 3280, 2082, 997, 2567, 777, 2961, 213, 2707, 2328, 3632, 1025, 3891, 3304, 255, 4003, 3108, 2587, 1323, 743, 1479, 105, 1013, 3901, 1618, 2044, 2627, 1465, 1846, 576, 1994,
2560, 3521, 1742, 2118, 2800, 3404, 1783, 2609, 2968, 1582, 1022, 412, 2713, 687, 2976, 3857, 2761, 3620, 62, 1108, 3844, 1340, 2100, 540, 2345, 3925, 405, 3457, 1319, 2468, 3362, 2815, 1867, 2372, 1281, 1714, 3690, 482, 3498, 1842, 1285, 3994, 558, 2039, 81, 2499, 678, 1481, 1923, 964, 12, 3824, 2980, 2205, 2762, 3432, 2398, 181, 3247, 462, 4094, 2350, 3589, 3089,
1555, 1094, 4041, 247, 1267, 908, 3959, 2041, 732, 3860, 2343, 3132, 3769, 2144, 1621, 237, 912, 1329, 3025, 2146, 2642, 1775, 3721, 2746, 1121, 1953, 902, 2285, 130, 3671, 1659, 278, 3153, 522, 2721, 123, 2996, 1466, 2380, 377, 3231, 873, 1510, 3476, 3123, 1250, 2147, 3650, 2839, 3451, 2323, 1122, 3545, 379, 1765, 1218, 603, 3768, 1360, 938, 2885, 133, 1245, 363,
2364, 554, 2743, 3344, 2474, 530, 3112, 169, 1297, 3430, 536, 1741, 98, 1043, 2574, 3253, 2246, 1854, 4022, 510, 3283, 204, 858, 3398, 36, 3118, 1478, 3794, 2986, 706, 2176, 922, 3559, 1097, 3976, 3322, 2149, 1160, 2810, 3883, 2007, 2513, 2953, 328, 1721, 3793, 422, 2566, 807, 329, 1638, 1967, 648, 2520, 3727, 3109, 2116, 2927, 2491, 1939, 3365, 1709, 2728, 3815,
2037, 3120, 831, 1405, 1896, 3592, 1622, 2369, 2864, 2151, 1107, 2542, 3532, 1410, 3917, 427, 3568, 709, 2509, 1503, 1037, 2973, 2436, 1604, 4035, 2594, 563, 1819, 2659, 1234, 4004, 2565, 1511, 2273, 1823, 336, 882, 3772, 575, 1628, 171, 3570, 1120, 2260, 2716, 935, 3064, 1806, 1342, 3144, 3900, 2744, 3296, 985, 1546, 238, 896, 1663, 305, 3660, 695, 2213, 960, 3407,
144, 1795, 3894, 2267, 51, 2708, 1023, 3818, 366, 1821, 4087, 2985, 755, 2057, 2912, 949, 1583, 2774, 231, 3447, 2258, 3866, 1982, 672, 1225, 2077, 3320, 1062, 370, 3241, 1968, 7, 3068, 681, 3631, 2573, 1567, 3175, 2321, 1067, 3070, 722, 1856, 3744, 642, 1471, 4084, 131, 3514, 2443, 531, 1227, 155, 2265, 4024, 2658, 3326, 3910, 1168, 3078, 1530, 3956, 489, 1424,
3647, 1203, 420, 2924, 3755, 719, 3248, 1376, 3067, 890, 196, 1559, 3269, 270, 2432, 1885, 3212, 1164, 3778, 1752, 579, 1338, 344, 3585, 3017, 288, 3658, 2371, 3882, 1691, 611, 2789, 3809, 1339, 389, 2950, 2015, 59, 3548, 2751, 2158, 4011, 1352, 29, 3388, 2370, 2812, 1946, 954, 2110, 1558, 2947, 3573, 1909, 1326, 679, 1853, 2312, 551, 2702, 33, 2414, 3209, 2824,
2547, 2143, 3379, 966, 1492, 1979, 2479, 463, 2194, 3657, 2738, 2318, 1261, 3713, 604, 4002, 11, 2192, 2967, 919, 2607, 3369, 2837, 1676, 2539, 984, 1568, 93, 2901, 1318, 3538, 1041, 2216, 1756, 3454, 1030, 4050, 1402, 798, 1723, 311, 3277, 2546, 2886, 2043, 461, 1206, 3677, 361, 3260, 3988, 809, 2605, 470, 3007, 3517, 102, 3221, 1398, 2062, 3611, 1134, 1928, 865,
4060, 621, 1710, 2606, 3510, 317, 4017, 1682, 3329, 1159, 1940, 654, 3461, 1789, 1015, 2691, 1455, 3599, 374, 1947, 4069, 71, 2126, 763, 3961, 2278, 3161, 1997, 824, 2623, 2080, 244, 3257, 780, 2732, 2308, 545, 3351, 2476, 3806, 1204, 588, 1591, 963, 3610, 1699, 754, 3049, 2651, 1106, 65, 2221, 1644, 3821, 1100, 2463, 1614, 3801, 965, 2965, 715, 3394, 1593, 212,
};
#endif /* BLUE_NOISE_64X64_H */

Some files were not shown because too many files have changed in this diff Show More