mirror of
https://salsa.debian.org/xorg-team/lib/pixman
synced 2025-09-02 12:15:01 +00:00
Compare commits
No commits in common. "debian-unstable" and "pixman-0.32.6-2" have entirely different histories.
debian-uns
...
pixman-0.3
@ -1,11 +0,0 @@
|
|||||||
# 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
|
|
47
.gitignore
vendored
47
.gitignore
vendored
@ -26,28 +26,61 @@ stamp-h?
|
|||||||
config.h
|
config.h
|
||||||
config.h.in
|
config.h.in
|
||||||
.*.swp
|
.*.swp
|
||||||
demos/*-test
|
demos/alpha-test
|
||||||
demos/checkerboard
|
demos/checkerboard
|
||||||
demos/clip-in
|
demos/clip-in
|
||||||
|
demos/clip-test
|
||||||
|
demos/composite-test
|
||||||
|
demos/conical-test
|
||||||
|
demos/convolution-test
|
||||||
|
demos/gradient-test
|
||||||
demos/linear-gradient
|
demos/linear-gradient
|
||||||
demos/quad2quad
|
demos/quad2quad
|
||||||
|
demos/radial-test
|
||||||
demos/scale
|
demos/scale
|
||||||
demos/dither
|
demos/screen-test
|
||||||
|
demos/srgb-test
|
||||||
|
demos/srgb-trap-test
|
||||||
|
demos/trap-test
|
||||||
|
demos/tri-test
|
||||||
pixman/pixman-srgb.c
|
pixman/pixman-srgb.c
|
||||||
pixman/pixman-version.h
|
pixman/pixman-version.h
|
||||||
test/*-test
|
test/a1-trap-test
|
||||||
test/affine-bench
|
test/affine-test
|
||||||
test/alpha-loop
|
test/alpha-loop
|
||||||
test/alphamap
|
test/alphamap
|
||||||
test/check-formats
|
test/alpha-test
|
||||||
|
test/blitters-test
|
||||||
test/clip-in
|
test/clip-in
|
||||||
|
test/clip-test
|
||||||
|
test/combiner-test
|
||||||
test/composite
|
test/composite
|
||||||
|
test/composite-test
|
||||||
|
test/composite-traps-test
|
||||||
|
test/convolution-test
|
||||||
|
test/fetch-test
|
||||||
|
test/glyph-test
|
||||||
|
test/gradient-crash-test
|
||||||
|
test/gradient-test
|
||||||
test/infinite-loop
|
test/infinite-loop
|
||||||
test/lowlevel-blt-bench
|
test/lowlevel-blt-bench
|
||||||
test/radial-invalid
|
test/oob-test
|
||||||
|
test/pdf-op-test
|
||||||
|
test/prng-test
|
||||||
|
test/radial-perf-test
|
||||||
|
test/region-contains-test
|
||||||
|
test/region-test
|
||||||
test/region-translate
|
test/region-translate
|
||||||
test/scaling-bench
|
test/region-translate-test
|
||||||
|
test/rotate-test
|
||||||
|
test/scaling-crash-test
|
||||||
|
test/scaling-helpers-test
|
||||||
|
test/scaling-test
|
||||||
|
test/screen-test
|
||||||
|
test/stress-test
|
||||||
test/trap-crasher
|
test/trap-crasher
|
||||||
|
test/trap-test
|
||||||
|
test/window-test
|
||||||
*.pdb
|
*.pdb
|
||||||
*.dll
|
*.dll
|
||||||
*.lib
|
*.lib
|
||||||
|
@ -1,80 +0,0 @@
|
|||||||
# 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}
|
|
@ -1,150 +0,0 @@
|
|||||||
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-*
|
|
@ -1,4 +0,0 @@
|
|||||||
DOCKER_PLATFORM=linux/386
|
|
||||||
BASE_IMAGE=docker.io/i386/debian
|
|
||||||
BASE_IMAGE_TAG=bookworm-slim
|
|
||||||
LLVM_VERSION=16
|
|
@ -1,4 +0,0 @@
|
|||||||
DOCKER_PLATFORM=linux/amd64
|
|
||||||
BASE_IMAGE=docker.io/amd64/debian
|
|
||||||
BASE_IMAGE_TAG=bookworm-slim
|
|
||||||
LLVM_VERSION=16
|
|
@ -1,4 +0,0 @@
|
|||||||
DOCKER_PLATFORM=linux/arm/v5
|
|
||||||
BASE_IMAGE=docker.io/arm32v5/debian
|
|
||||||
BASE_IMAGE_TAG=bookworm-slim
|
|
||||||
LLVM_VERSION=16
|
|
@ -1,4 +0,0 @@
|
|||||||
DOCKER_PLATFORM=linux/arm/v7
|
|
||||||
BASE_IMAGE=docker.io/arm32v7/debian
|
|
||||||
BASE_IMAGE_TAG=bookworm-slim
|
|
||||||
LLVM_VERSION=16
|
|
@ -1,4 +0,0 @@
|
|||||||
DOCKER_PLATFORM=linux/arm64/v8
|
|
||||||
BASE_IMAGE=docker.io/arm64v8/debian
|
|
||||||
BASE_IMAGE_TAG=bookworm-slim
|
|
||||||
LLVM_VERSION=16
|
|
@ -1,4 +0,0 @@
|
|||||||
DOCKER_PLATFORM=linux/amd64
|
|
||||||
BASE_IMAGE=docker.io/amd64/debian
|
|
||||||
BASE_IMAGE_TAG=bookworm-slim
|
|
||||||
LLVM_VERSION=16
|
|
@ -1,4 +0,0 @@
|
|||||||
DOCKER_PLATFORM=linux/mips64el
|
|
||||||
BASE_IMAGE=docker.io/mips64le/debian
|
|
||||||
BASE_IMAGE_TAG=bookworm-slim
|
|
||||||
LLVM_VERSION=16
|
|
@ -1,4 +0,0 @@
|
|||||||
DOCKER_PLATFORM=linux/mipsel
|
|
||||||
BASE_IMAGE=docker.io/serenitycode/debian-debootstrap
|
|
||||||
BASE_IMAGE_TAG=mipsel-bookworm-slim
|
|
||||||
LLVM_VERSION=14
|
|
@ -1 +0,0 @@
|
|||||||
linux-amd64.env
|
|
@ -1 +0,0 @@
|
|||||||
linux-amd64.env
|
|
@ -1,4 +0,0 @@
|
|||||||
DOCKER_PLATFORM=linux/ppc64le
|
|
||||||
BASE_IMAGE=docker.io/ppc64le/debian
|
|
||||||
BASE_IMAGE_TAG=bookworm-slim
|
|
||||||
LLVM_VERSION=16
|
|
@ -1,4 +0,0 @@
|
|||||||
DOCKER_PLATFORM=linux/riscv64
|
|
||||||
BASE_IMAGE=docker.io/riscv64/debian
|
|
||||||
BASE_IMAGE_TAG=sid-slim
|
|
||||||
LLVM_VERSION=18
|
|
@ -1 +0,0 @@
|
|||||||
linux-amd64.env
|
|
@ -1 +0,0 @@
|
|||||||
linux-amd64.env
|
|
@ -1,3 +0,0 @@
|
|||||||
DOCKER_PLATFORM=linux/amd64
|
|
||||||
BASE_IMAGE=docker.io/linaro/wine-arm64
|
|
||||||
BASE_IMAGE_TAG=latest
|
|
@ -1,107 +0,0 @@
|
|||||||
# 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
|
|
@ -1,175 +0,0 @@
|
|||||||
# 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]
|
|
@ -1,47 +0,0 @@
|
|||||||
# 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}/
|
|
@ -1 +0,0 @@
|
|||||||
native-gnu.meson
|
|
@ -1 +0,0 @@
|
|||||||
native-llvm.meson
|
|
@ -1 +0,0 @@
|
|||||||
native-gnu.meson
|
|
@ -1 +0,0 @@
|
|||||||
native-llvm.meson
|
|
@ -1 +0,0 @@
|
|||||||
native-gnu-noopenmp.meson
|
|
@ -1 +0,0 @@
|
|||||||
native-llvm-noopenmp.meson
|
|
@ -1 +0,0 @@
|
|||||||
native-gnu.meson
|
|
@ -1 +0,0 @@
|
|||||||
native-llvm.meson
|
|
@ -1 +0,0 @@
|
|||||||
native-gnu.meson
|
|
@ -1 +0,0 @@
|
|||||||
native-llvm.meson
|
|
@ -1,11 +0,0 @@
|
|||||||
[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'
|
|
@ -1,14 +0,0 @@
|
|||||||
[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'
|
|
@ -1,8 +0,0 @@
|
|||||||
[binaries]
|
|
||||||
c = ['gcc', '-DCI_HAS_ALL_MIPS_CPU_FEATURES']
|
|
||||||
ar = 'ar'
|
|
||||||
strip = 'strip'
|
|
||||||
pkg-config = 'pkg-config'
|
|
||||||
|
|
||||||
[project options]
|
|
||||||
mips-dspr2 = 'disabled'
|
|
@ -1,8 +0,0 @@
|
|||||||
[binaries]
|
|
||||||
c = ['clang', '-DCI_HAS_ALL_MIPS_CPU_FEATURES']
|
|
||||||
ar = 'llvm-ar'
|
|
||||||
strip = 'llvm-strip'
|
|
||||||
pkg-config = 'pkg-config'
|
|
||||||
|
|
||||||
[project options]
|
|
||||||
mips-dspr2 = 'disabled'
|
|
@ -1 +0,0 @@
|
|||||||
native-gnu-noopenmp.meson
|
|
@ -1 +0,0 @@
|
|||||||
native-llvm-noopenmp.meson
|
|
@ -1,11 +0,0 @@
|
|||||||
[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'
|
|
@ -1,15 +0,0 @@
|
|||||||
[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'
|
|
@ -1,11 +0,0 @@
|
|||||||
[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'
|
|
@ -1,15 +0,0 @@
|
|||||||
[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'
|
|
@ -1 +0,0 @@
|
|||||||
native-gnu.meson
|
|
@ -1 +0,0 @@
|
|||||||
native-llvm.meson
|
|
@ -1 +0,0 @@
|
|||||||
native-gnu.meson
|
|
@ -1 +0,0 @@
|
|||||||
native-llvm.meson
|
|
@ -1,8 +0,0 @@
|
|||||||
[binaries]
|
|
||||||
c = ['gcc', '-DCI_HAS_ALL_MIPS_CPU_FEATURES']
|
|
||||||
ar = 'ar'
|
|
||||||
strip = 'strip'
|
|
||||||
pkg-config = 'pkg-config'
|
|
||||||
|
|
||||||
[project options]
|
|
||||||
openmp = 'disabled'
|
|
@ -1,5 +0,0 @@
|
|||||||
[binaries]
|
|
||||||
c = 'gcc'
|
|
||||||
ar = 'ar'
|
|
||||||
strip = 'strip'
|
|
||||||
pkg-config = 'pkg-config'
|
|
@ -1,8 +0,0 @@
|
|||||||
[binaries]
|
|
||||||
c = ['clang', '-DCI_HAS_ALL_MIPS_CPU_FEATURES']
|
|
||||||
ar = 'llvm-ar'
|
|
||||||
strip = 'llvm-strip'
|
|
||||||
pkg-config = 'pkg-config'
|
|
||||||
|
|
||||||
[project options]
|
|
||||||
openmp = 'disabled'
|
|
@ -1,5 +0,0 @@
|
|||||||
[binaries]
|
|
||||||
c = 'clang'
|
|
||||||
ar = 'llvm-ar'
|
|
||||||
strip = 'llvm-strip'
|
|
||||||
pkg-config = 'pkg-config'
|
|
@ -1,18 +0,0 @@
|
|||||||
[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'
|
|
@ -1,18 +0,0 @@
|
|||||||
[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'
|
|
@ -1,15 +0,0 @@
|
|||||||
[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'
|
|
@ -1,20 +0,0 @@
|
|||||||
[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'
|
|
@ -1,18 +0,0 @@
|
|||||||
[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'
|
|
@ -1,65 +0,0 @@
|
|||||||
# 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"
|
|
@ -1,80 +0,0 @@
|
|||||||
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}/
|
|
@ -1,9 +0,0 @@
|
|||||||
# General target templates.
|
|
||||||
|
|
||||||
.target:all:
|
|
||||||
image:
|
|
||||||
name: $DOCKER_IMAGE_NAME-$TARGET
|
|
||||||
rules:
|
|
||||||
- if: "$TARGET =~ $ACTIVE_TARGET_PATTERN"
|
|
||||||
before_script:
|
|
||||||
- ${LOAD_TARGET_ENV}
|
|
@ -1,112 +0,0 @@
|
|||||||
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
|
|
@ -1,16 +0,0 @@
|
|||||||
#
|
|
||||||
# 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'
|
|
137
Makefile.am
Normal file
137
Makefile.am
Normal file
@ -0,0 +1,137 @@
|
|||||||
|
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
|
25
Makefile.win32
Normal file
25
Makefile.win32
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
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
|
56
Makefile.win32.common
Normal file
56
Makefile.win32.common
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
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
80
README
@ -1,20 +1,14 @@
|
|||||||
Pixman
|
|
||||||
======
|
|
||||||
|
|
||||||
Pixman is a library that provides low-level pixel manipulation
|
Pixman is a library that provides low-level pixel manipulation
|
||||||
features such as image compositing and trapezoid rasterization.
|
features such as image compositing and trapezoid rasterization.
|
||||||
|
|
||||||
Questions should be directed to the pixman mailing list:
|
Questions, bug reports and patches should be directed to the pixman
|
||||||
|
mailing list:
|
||||||
|
|
||||||
https://lists.freedesktop.org/mailman/listinfo/pixman
|
http://lists.freedesktop.org/mailman/listinfo/pixman
|
||||||
|
|
||||||
You can also file bugs at
|
You can also file bugs at
|
||||||
|
|
||||||
https://gitlab.freedesktop.org/pixman/pixman/-/issues/new
|
https://bugs.freedesktop.org/enter_bug.cgi?product=pixman
|
||||||
|
|
||||||
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
|
For real time discussions about pixman, feel free to join the IRC
|
||||||
channels #cairo and #xorg-devel on the FreeNode IRC network.
|
channels #cairo and #xorg-devel on the FreeNode IRC network.
|
||||||
@ -27,66 +21,54 @@ In order to contribute to pixman, you will need a working knowledge of
|
|||||||
the git version control system. For a quick getting started guide,
|
the git version control system. For a quick getting started guide,
|
||||||
there is the "Everyday Git With 20 Commands Or So guide"
|
there is the "Everyday Git With 20 Commands Or So guide"
|
||||||
|
|
||||||
https://www.kernel.org/pub/software/scm/git/docs/everyday.html
|
http://www.kernel.org/pub/software/scm/git/docs/everyday.html
|
||||||
|
|
||||||
from the Git homepage. For more in depth git documentation, see the
|
from the Git homepage. For more in depth git documentation, see the
|
||||||
resources on the Git community documentation page:
|
resources on the Git community documentation page:
|
||||||
|
|
||||||
https://git-scm.com/documentation
|
http://git-scm.com/documentation
|
||||||
|
|
||||||
Pixman uses the infrastructure from the freedesktop.org umbrella
|
Pixman uses the infrastructure from the freedesktop.org umbrella
|
||||||
project. For instructions about how to use the git service on
|
project. For instructions about how to use the git service on
|
||||||
freedesktop.org, see:
|
freedesktop.org, see:
|
||||||
|
|
||||||
https://www.freedesktop.org/wiki/Infrastructure/git/Developers
|
http://www.freedesktop.org/wiki/Infrastructure/git/Developers
|
||||||
|
|
||||||
The Pixman master repository can be found at:
|
The Pixman master repository can be found at:
|
||||||
|
|
||||||
https://gitlab.freedesktop.org/pixman/pixman
|
git://anongit.freedesktop.org/git/pixman
|
||||||
|
|
||||||
|
and browsed on the web here:
|
||||||
|
|
||||||
|
http://cgit.freedesktop.org/pixman/
|
||||||
|
|
||||||
|
|
||||||
Sending patches
|
Sending patches
|
||||||
---------------
|
---------------
|
||||||
|
|
||||||
Patches should be submitted in form of Merge Requests via Gitlab.
|
The general workflow for sending patches is to first make sure that
|
||||||
|
git can send mail on your system. Then,
|
||||||
|
|
||||||
You will first need to create a fork of the main pixman repository at
|
- create a branch off of master in your local git repository
|
||||||
|
|
||||||
https://gitlab.freedesktop.org/pixman/pixman
|
- make your changes as one or more commits
|
||||||
|
|
||||||
via the Fork button on the top right. Once that is done you can add your
|
- use the
|
||||||
personal repository as a remote to your local pixman development git checkout:
|
|
||||||
|
|
||||||
git remote add my-gitlab git@gitlab.freedesktop.org:YOURUSERNAME/pixman.git
|
git send-email
|
||||||
|
|
||||||
git fetch my-gitlab
|
command to send the patch series to pixman@lists.freedesktop.org.
|
||||||
|
|
||||||
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
|
In order for your patches to be accepted, please consider the
|
||||||
following guidelines:
|
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
|
- At each point in the series, pixman should compile and the test
|
||||||
suite should pass.
|
suite should pass.
|
||||||
|
|
||||||
@ -97,7 +79,7 @@ following guidelines:
|
|||||||
|
|
||||||
You can run the test suite with
|
You can run the test suite with
|
||||||
|
|
||||||
meson test -C builddir
|
make check
|
||||||
|
|
||||||
It will take around two minutes to run on a modern PC.
|
It will take around two minutes to run on a modern PC.
|
||||||
|
|
||||||
@ -119,7 +101,7 @@ following guidelines:
|
|||||||
- If review comments were incorporated, a brief version
|
- If review comments were incorporated, a brief version
|
||||||
history describing what those changes were.
|
history describing what those changes were.
|
||||||
|
|
||||||
- For big patch series, write an introductory post with an overall
|
- For big patch series, send an introductory email with an overall
|
||||||
description of the patch series, including benchmarks and
|
description of the patch series, including benchmarks and
|
||||||
motivation. Each commit message should still be descriptive and
|
motivation. Each commit message should still be descriptive and
|
||||||
include enough information to understand why this particular commit
|
include enough information to understand why this particular commit
|
||||||
@ -129,6 +111,6 @@ Pixman has high standards for code quality and so almost everybody
|
|||||||
should expect to have the first versions of their patches rejected.
|
should expect to have the first versions of their patches rejected.
|
||||||
|
|
||||||
If you think that the reviewers are wrong about something, or that the
|
If you think that the reviewers are wrong about something, or that the
|
||||||
guidelines above are wrong, feel free to discuss the issue. The purpose
|
guidelines above are wrong, feel free to discuss the issue on the
|
||||||
of the guidelines and code review is to ensure high code quality; it is
|
list. The purpose of the guidelines and code review is to ensure high
|
||||||
not an exercise in compliance.
|
code quality; it is not an exercise in compliance.
|
||||||
|
@ -10,11 +10,12 @@ Here are the steps to follow to create a new pixman release:
|
|||||||
|
|
||||||
git log master...origin (no output; note: *3* dots)
|
git log master...origin (no output; note: *3* dots)
|
||||||
|
|
||||||
2) Increment the version in meson.build.
|
2) Increment pixman_(major|minor|micro) in configure.ac according to
|
||||||
|
the directions in that file.
|
||||||
|
|
||||||
3) Make sure that new version works, including
|
3) Make sure that new version works, including
|
||||||
|
|
||||||
- meson test passes
|
- make distcheck passes
|
||||||
|
|
||||||
- the X server still works with the new pixman version
|
- the X server still works with the new pixman version
|
||||||
installed
|
installed
|
||||||
|
@ -1,5 +0,0 @@
|
|||||||
.text
|
|
||||||
.arch armv8-a
|
|
||||||
.altmacro
|
|
||||||
prfm pldl2strm, [x0]
|
|
||||||
xtn v0.8b, v0.8h
|
|
@ -1,10 +0,0 @@
|
|||||||
.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
|
|
14
autogen.sh
Executable file
14
autogen.sh
Executable file
@ -0,0 +1,14 @@
|
|||||||
|
#! /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
|
1128
configure.ac
Normal file
1128
configure.ac
Normal file
File diff suppressed because it is too large
Load Diff
129
debian/changelog
vendored
129
debian/changelog
vendored
@ -1,132 +1,3 @@
|
|||||||
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.
|
|
||||||
* Add myself to Uploaders.
|
|
||||||
|
|
||||||
-- Andreas Boll <andreas.boll.dev@gmail.com> Thu, 14 Jan 2016 13:46:28 +0100
|
|
||||||
|
|
||||||
pixman (0.33.4-1) unstable; urgency=medium
|
|
||||||
|
|
||||||
* Team upload.
|
|
||||||
* New upstream release candidate.
|
|
||||||
|
|
||||||
-- Andreas Boll <andreas.boll.dev@gmail.com> Wed, 04 Nov 2015 13:26:18 +0100
|
|
||||||
|
|
||||||
pixman (0.33.2-2) sid; urgency=medium
|
|
||||||
|
|
||||||
* Run tests with VERBOSE=1.
|
|
||||||
|
|
||||||
-- Julien Cristau <jcristau@debian.org> Sat, 12 Sep 2015 20:31:06 +0200
|
|
||||||
|
|
||||||
pixman (0.33.2-1) sid; urgency=medium
|
|
||||||
|
|
||||||
[ Andreas Boll ]
|
|
||||||
* New upstream release candidate.
|
|
||||||
* Enable vmx on ppc64el (closes: #786345).
|
|
||||||
* Update Vcs-* fields.
|
|
||||||
* Add upstream url.
|
|
||||||
* Drop XC- prefix from Package-Type field.
|
|
||||||
* Bump standards version to 3.9.6.
|
|
||||||
|
|
||||||
[ intrigeri ]
|
|
||||||
* Simplify hardening build flags handling (closes: #760100).
|
|
||||||
Thanks to Simon Ruderich <simon@ruderich.org> for the patch.
|
|
||||||
* Enable all hardening build flags. Thanks to Simon Ruderich too.
|
|
||||||
|
|
||||||
-- Julien Cristau <jcristau@debian.org> Sat, 12 Sep 2015 13:08:02 +0200
|
|
||||||
|
|
||||||
pixman (0.32.6-3) sid; urgency=medium
|
|
||||||
|
|
||||||
[ intrigeri ]
|
|
||||||
* Enable hardening build flags with dpkg-buildflags.
|
|
||||||
|
|
||||||
-- Julien Cristau <jcristau@debian.org> Sat, 23 Aug 2014 22:16:40 -0700
|
|
||||||
|
|
||||||
pixman (0.32.6-2) sid; urgency=medium
|
pixman (0.32.6-2) sid; urgency=medium
|
||||||
|
|
||||||
[ Julien Cristau ]
|
[ Julien Cristau ]
|
||||||
|
1
debian/compat
vendored
Normal file
1
debian/compat
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
9
|
29
debian/control
vendored
29
debian/control
vendored
@ -2,16 +2,14 @@ Source: pixman
|
|||||||
Section: devel
|
Section: devel
|
||||||
Priority: optional
|
Priority: optional
|
||||||
Maintainer: Debian X Strike Force <debian-x@lists.debian.org>
|
Maintainer: Debian X Strike Force <debian-x@lists.debian.org>
|
||||||
Uploaders: Andreas Boll <aboll@debian.org>
|
|
||||||
Build-Depends:
|
Build-Depends:
|
||||||
debhelper-compat (= 13),
|
debhelper (>= 9),
|
||||||
meson,
|
dh-autoreconf,
|
||||||
pkgconf,
|
pkg-config,
|
||||||
quilt,
|
quilt,
|
||||||
Standards-Version: 4.2.1
|
Standards-Version: 3.9.2
|
||||||
Vcs-Git: https://salsa.debian.org/xorg-team/lib/pixman.git
|
Vcs-Git: git://git.debian.org/git/pkg-xorg/lib/pixman
|
||||||
Vcs-Browser: https://salsa.debian.org/xorg-team/lib/pixman
|
Vcs-Browser: http://git.debian.org/?p=pkg-xorg/lib/pixman.git
|
||||||
Homepage: http://pixman.org/
|
|
||||||
|
|
||||||
Package: libpixman-1-0
|
Package: libpixman-1-0
|
||||||
Section: libs
|
Section: libs
|
||||||
@ -29,7 +27,7 @@ Description: pixel-manipulation library for X and cairo
|
|||||||
|
|
||||||
Package: libpixman-1-0-udeb
|
Package: libpixman-1-0-udeb
|
||||||
Section: debian-installer
|
Section: debian-installer
|
||||||
Package-Type: udeb
|
XC-Package-Type: udeb
|
||||||
Architecture: any
|
Architecture: any
|
||||||
Depends:
|
Depends:
|
||||||
${shlibs:Depends},
|
${shlibs:Depends},
|
||||||
@ -38,13 +36,24 @@ Description: pixel-manipulation library for X and cairo
|
|||||||
This package contains a minimal set of libraries needed for the Debian
|
This package contains a minimal set of libraries needed for the Debian
|
||||||
installer. Do not install it on a normal system.
|
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
|
Package: libpixman-1-dev
|
||||||
Section: libdevel
|
Section: libdevel
|
||||||
Architecture: any
|
Architecture: any
|
||||||
Depends:
|
Depends:
|
||||||
libpixman-1-0 (= ${binary:Version}),
|
libpixman-1-0 (= ${binary:Version}),
|
||||||
${misc:Depends},
|
${misc:Depends},
|
||||||
Multi-Arch: same
|
|
||||||
Description: pixel-manipulation library for X and cairo (development files)
|
Description: pixel-manipulation library for X and cairo (development files)
|
||||||
Development libraries, header files and documentation needed by
|
Development libraries, header files and documentation needed by
|
||||||
programs that want to compile with the Cairo/X pixman library.
|
programs that want to compile with the Cairo/X pixman library.
|
||||||
|
89
debian/copyright
vendored
89
debian/copyright
vendored
@ -1,48 +1,47 @@
|
|||||||
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
|
This package was downloaded from
|
||||||
Upstream-Name: pixman
|
http://xorg.freedesktop.org/releases/individual/lib/
|
||||||
Source: https://gitlab.freedesktop.org/pixman/pixman
|
|
||||||
License: Expat
|
|
||||||
|
|
||||||
Files: *
|
Debian packaging by Julien Cristau <jcristau@debian.org>, 18 May 2007.
|
||||||
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
|
|
||||||
|
|
||||||
Files: debian/*
|
The following is the MIT license, agreed upon by most contributors.
|
||||||
Copyright: 2007 Julien Cristau <jcristau@debian.org>
|
Copyright holders of new code should use this license statement where
|
||||||
License: Expat
|
possible. They may also add themselves to the list below.
|
||||||
|
|
||||||
License: Expat
|
/*
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a
|
* Copyright 1987, 1988, 1989, 1998 The Open Group
|
||||||
copy of this software and associated documentation files (the "Software"),
|
* Copyright 1987, 1988, 1989 Digital Equipment Corporation
|
||||||
to deal in the Software without restriction, including without limitation
|
* Copyright 1999, 2004, 2008 Keith Packard
|
||||||
the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
* Copyright 2000 SuSE, Inc.
|
||||||
and/or sell copies of the Software, and to permit persons to whom the
|
* Copyright 2000 Keith Packard, member of The XFree86 Project, Inc.
|
||||||
Software is furnished to do so, subject to the following conditions:
|
* Copyright 2004, 2005, 2007, 2008, 2009, 2010 Red Hat, Inc.
|
||||||
.
|
* Copyright 2004 Nicholas Miell
|
||||||
The above copyright notice and this permission notice (including the next
|
* Copyright 2005 Lars Knoll & Zack Rusin, Trolltech
|
||||||
paragraph) shall be included in all copies or substantial portions of the
|
* Copyright 2005 Trolltech AS
|
||||||
Software.
|
* Copyright 2007 Luca Barbato
|
||||||
.
|
* Copyright 2008 Aaron Plattner, NVIDIA Corporation
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
* Copyright 2008 Rodrigo Kumpera
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
* Copyright 2008 André Tupinambá
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
* Copyright 2008 Mozilla Corporation
|
||||||
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
* Copyright 2008 Frederic Plourde
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
* Copyright 2009, Oracle and/or its affiliates. All rights reserved.
|
||||||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
* Copyright 2009, 2010 Nokia Corporation
|
||||||
DEALINGS IN THE SOFTWARE.
|
*
|
||||||
|
* 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.
|
||||||
|
*/
|
||||||
|
4
debian/libpixman-1-0.symbols
vendored
4
debian/libpixman-1-0.symbols
vendored
@ -64,8 +64,6 @@ libpixman-1.so.0 libpixman-1-0 #MINVER#
|
|||||||
pixman_image_set_clip_region@Base 0
|
pixman_image_set_clip_region@Base 0
|
||||||
pixman_image_set_component_alpha@Base 0
|
pixman_image_set_component_alpha@Base 0
|
||||||
pixman_image_set_destroy_function@Base 0.15.12
|
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_filter@Base 0.30.0
|
||||||
pixman_image_set_has_client_clip@Base 0
|
pixman_image_set_has_client_clip@Base 0
|
||||||
pixman_image_set_indexed@Base 0
|
pixman_image_set_indexed@Base 0
|
||||||
@ -80,7 +78,6 @@ libpixman-1.so.0 libpixman-1-0 #MINVER#
|
|||||||
pixman_region32_contains_point@Base 0.11.2
|
pixman_region32_contains_point@Base 0.11.2
|
||||||
pixman_region32_contains_rectangle@Base 0.11.2
|
pixman_region32_contains_rectangle@Base 0.11.2
|
||||||
pixman_region32_copy@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_equal@Base 0.11.2
|
||||||
pixman_region32_extents@Base 0.11.2
|
pixman_region32_extents@Base 0.11.2
|
||||||
pixman_region32_fini@Base 0.11.2
|
pixman_region32_fini@Base 0.11.2
|
||||||
@ -105,7 +102,6 @@ libpixman-1.so.0 libpixman-1-0 #MINVER#
|
|||||||
pixman_region_contains_point@Base 0
|
pixman_region_contains_point@Base 0
|
||||||
pixman_region_contains_rectangle@Base 0
|
pixman_region_contains_rectangle@Base 0
|
||||||
pixman_region_copy@Base 0
|
pixman_region_copy@Base 0
|
||||||
pixman_region_empty@Base 0.44.0
|
|
||||||
pixman_region_equal@Base 0
|
pixman_region_equal@Base 0
|
||||||
pixman_region_extents@Base 0
|
pixman_region_extents@Base 0
|
||||||
pixman_region_fini@Base 0
|
pixman_region_fini@Base 0
|
||||||
|
1
debian/libpixman-1-dev.install
vendored
1
debian/libpixman-1-dev.install
vendored
@ -1,3 +1,4 @@
|
|||||||
usr/lib/*/libpixman-1.so
|
usr/lib/*/libpixman-1.so
|
||||||
|
usr/lib/*/libpixman-1.a
|
||||||
usr/lib/*/pkgconfig
|
usr/lib/*/pkgconfig
|
||||||
usr/include/pixman-1
|
usr/include/pixman-1
|
||||||
|
14
debian/patches/ppc64el.diff
vendored
Normal file
14
debian/patches/ppc64el.diff
vendored
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
diff --git a/configure.ac b/configure.ac
|
||||||
|
index dce76b3..172de8b 100644
|
||||||
|
--- a/configure.ac
|
||||||
|
+++ b/configure.ac
|
||||||
|
@@ -540,6 +540,9 @@ AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
|
||||||
|
#if defined(__GNUC__) && (__GNUC__ < 3 || (__GNUC__ == 3 && __GNUC_MINOR__ < 4))
|
||||||
|
#error "Need GCC >= 3.4 for sane altivec support"
|
||||||
|
#endif
|
||||||
|
+#if defined(__PPC64__) && (__BYTE_ORDER__==__ORDER_LITTLE_ENDIAN__)
|
||||||
|
+#error VMX utilization is still not ready on ppc64el
|
||||||
|
+#endif
|
||||||
|
#include <altivec.h>
|
||||||
|
int main () {
|
||||||
|
vector unsigned int v = vec_splat_u32 (1);
|
1
debian/patches/series
vendored
1
debian/patches/series
vendored
@ -1 +1,2 @@
|
|||||||
|
ppc64el.diff
|
||||||
test-increase-timeout.diff
|
test-increase-timeout.diff
|
||||||
|
12
debian/patches/test-increase-timeout.diff
vendored
12
debian/patches/test-increase-timeout.diff
vendored
@ -1,8 +1,10 @@
|
|||||||
--- a/test/alpha-loop.c
|
Index: pixman/test/alpha-loop.c
|
||||||
+++ b/test/alpha-loop.c
|
===================================================================
|
||||||
@@ -22,7 +22,7 @@ main (int argc, char **argv)
|
--- pixman.orig/test/alpha-loop.c 2013-07-26 14:26:43.905457549 +0200
|
||||||
d = pixman_image_create_bits (PIXMAN_a8r8g8b8, WIDTH, HEIGHT, dest, WIDTH * 4);
|
+++ pixman/test/alpha-loop.c 2013-08-03 10:21:53.498601016 +0200
|
||||||
s = pixman_image_create_bits (PIXMAN_a2r10g10b10, WIDTH, HEIGHT, src, WIDTH * 4);
|
@@ -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);
|
||||||
|
|
||||||
- fail_after (5, "Infinite loop detected: 5 seconds without progress\n");
|
- fail_after (5, "Infinite loop detected: 5 seconds without progress\n");
|
||||||
+ fail_after (50, "Infinite loop detected: 50 seconds without progress\n");
|
+ fail_after (50, "Infinite loop detected: 50 seconds without progress\n");
|
||||||
|
21
debian/rules
vendored
21
debian/rules
vendored
@ -1,16 +1,15 @@
|
|||||||
#!/usr/bin/make -f
|
#!/usr/bin/make -f
|
||||||
|
|
||||||
PACKAGE = libpixman-1-0
|
PACKAGE = libpixman-1-0
|
||||||
SHLIBS = 0.40.0
|
SHLIBS = 0.25.2
|
||||||
|
|
||||||
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
|
|
||||||
|
|
||||||
# Disable Gtk+ autodetection:
|
# Disable Gtk+ autodetection:
|
||||||
override_dh_auto_configure:
|
override_dh_auto_configure:
|
||||||
# also avoid loongson2f optimizations on mipsel, see 0.26.0-3
|
# also avoid loongson2f optimizations on mipsel, see 0.26.0-3
|
||||||
# changelog entry:
|
# changelog entry:
|
||||||
LS_CFLAGS=" " dh_auto_configure -- \
|
LS_CFLAGS=" " dh_auto_configure -- --disable-gtk \
|
||||||
-Dgtk=disabled
|
--disable-silent-rules \
|
||||||
|
--disable-arm-iwmmxt
|
||||||
|
|
||||||
# Install in debian/tmp to retain control through dh_install:
|
# Install in debian/tmp to retain control through dh_install:
|
||||||
override_dh_auto_install:
|
override_dh_auto_install:
|
||||||
@ -19,14 +18,16 @@ override_dh_auto_install:
|
|||||||
# Kill *.la files, and forget no-one:
|
# Kill *.la files, and forget no-one:
|
||||||
override_dh_install:
|
override_dh_install:
|
||||||
find debian/tmp -name '*.la' -delete
|
find debian/tmp -name '*.la' -delete
|
||||||
dh_install
|
dh_install --fail-missing
|
||||||
|
|
||||||
|
# Debug package:
|
||||||
|
override_dh_strip:
|
||||||
|
dh_strip -p$(PACKAGE) --dbg-package=$(PACKAGE)-dbg
|
||||||
|
dh_strip -N$(PACKAGE)
|
||||||
|
|
||||||
# Shlibs:
|
# Shlibs:
|
||||||
override_dh_makeshlibs:
|
override_dh_makeshlibs:
|
||||||
dh_makeshlibs -p$(PACKAGE) --add-udeb $(PACKAGE)-udeb -V"$(PACKAGE) (>= $(SHLIBS))" -- -c4
|
dh_makeshlibs -p$(PACKAGE) --add-udeb $(PACKAGE)-udeb -V"$(PACKAGE) (>= $(SHLIBS))" -- -c4
|
||||||
|
|
||||||
override_dh_auto_test:
|
|
||||||
dh_auto_test -- --verbose --timeout-multiplier 3
|
|
||||||
|
|
||||||
%:
|
%:
|
||||||
dh $@ --with quilt --builddirectory=build/
|
dh $@ --with quilt,autoreconf --builddirectory=build/ --parallel
|
||||||
|
1
debian/source/format
vendored
1
debian/source/format
vendored
@ -1 +0,0 @@
|
|||||||
1.0
|
|
2
debian/watch
vendored
2
debian/watch
vendored
@ -1,3 +1,3 @@
|
|||||||
#git=git://anongit.freedesktop.org/pixman
|
#git=git://anongit.freedesktop.org/pixman
|
||||||
version=3
|
version=3
|
||||||
https://xorg.freedesktop.org/releases/individual/lib/ pixman-(.*)\.tar\.gz
|
http://xorg.freedesktop.org/releases/individual/lib/ pixman-(.*)\.tar\.gz
|
||||||
|
52
demos/Makefile.am
Normal file
52
demos/Makefile.am
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
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
|
@ -1,4 +1,4 @@
|
|||||||
#include "utils.h"
|
#include "../test/utils.h"
|
||||||
#include "gtk-utils.h"
|
#include "gtk-utils.h"
|
||||||
|
|
||||||
#define SIZE 128
|
#define SIZE 128
|
||||||
|
277
demos/dither.c
277
demos/dither.c
@ -1,277 +0,0 @@
|
|||||||
/*
|
|
||||||
* 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
147
demos/dither.ui
@ -1,147 +0,0 @@
|
|||||||
<?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"><b>Target format:</b></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"><b>Dithering:</b></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>
|
|
@ -1,8 +1,6 @@
|
|||||||
#include <gtk/gtk.h>
|
#include <gtk/gtk.h>
|
||||||
#ifdef HAVE_CONFIG_H
|
#include <config.h>
|
||||||
#include <pixman-config.h>
|
#include "../test/utils.h"
|
||||||
#endif
|
|
||||||
#include "utils.h"
|
|
||||||
#include "gtk-utils.h"
|
#include "gtk-utils.h"
|
||||||
|
|
||||||
pixman_image_t *
|
pixman_image_t *
|
||||||
@ -95,14 +93,15 @@ pixbuf_from_argb32 (uint32_t *bits,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
on_draw (GtkWidget *widget, cairo_t *cr, gpointer user_data)
|
on_expose (GtkWidget *widget, GdkEventExpose *expose, gpointer data)
|
||||||
{
|
{
|
||||||
pixman_image_t *pimage = user_data;
|
pixman_image_t *pimage = data;
|
||||||
int width = pixman_image_get_width (pimage);
|
int width = pixman_image_get_width (pimage);
|
||||||
int height = pixman_image_get_height (pimage);
|
int height = pixman_image_get_height (pimage);
|
||||||
int stride = pixman_image_get_stride (pimage);
|
int stride = pixman_image_get_stride (pimage);
|
||||||
cairo_surface_t *cimage;
|
cairo_surface_t *cimage;
|
||||||
cairo_format_t format;
|
cairo_format_t format;
|
||||||
|
cairo_t *cr;
|
||||||
|
|
||||||
if (pixman_image_get_format (pimage) == PIXMAN_x8r8g8b8)
|
if (pixman_image_get_format (pimage) == PIXMAN_x8r8g8b8)
|
||||||
format = CAIRO_FORMAT_RGB24;
|
format = CAIRO_FORMAT_RGB24;
|
||||||
@ -113,10 +112,13 @@ on_draw (GtkWidget *widget, cairo_t *cr, gpointer user_data)
|
|||||||
(uint8_t *)pixman_image_get_data (pimage),
|
(uint8_t *)pixman_image_get_data (pimage),
|
||||||
format, width, height, stride);
|
format, width, height, stride);
|
||||||
|
|
||||||
|
cr = gdk_cairo_create (widget->window);
|
||||||
|
|
||||||
cairo_rectangle (cr, 0, 0, width, height);
|
cairo_rectangle (cr, 0, 0, width, height);
|
||||||
cairo_set_source_surface (cr, cimage, 0, 0);
|
cairo_set_source_surface (cr, cimage, 0, 0);
|
||||||
cairo_fill (cr);
|
cairo_fill (cr);
|
||||||
|
|
||||||
|
cairo_destroy (cr);
|
||||||
cairo_surface_destroy (cimage);
|
cairo_surface_destroy (cimage);
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
@ -168,7 +170,7 @@ show_image (pixman_image_t *image)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
g_signal_connect (window, "draw", G_CALLBACK (on_draw), copy);
|
g_signal_connect (window, "expose_event", G_CALLBACK (on_expose), copy);
|
||||||
g_signal_connect (window, "delete_event", G_CALLBACK (gtk_main_quit), NULL);
|
g_signal_connect (window, "delete_event", G_CALLBACK (gtk_main_quit), NULL);
|
||||||
|
|
||||||
gtk_widget_show (window);
|
gtk_widget_show (window);
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#include "utils.h"
|
#include "../test/utils.h"
|
||||||
#include "gtk-utils.h"
|
#include "gtk-utils.h"
|
||||||
|
|
||||||
#define WIDTH 1024
|
#define WIDTH 1024
|
||||||
|
@ -1,66 +0,0 @@
|
|||||||
# 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
|
|
@ -1,4 +1,4 @@
|
|||||||
#include "utils.h"
|
#include "../test/utils.h"
|
||||||
#include "gtk-utils.h"
|
#include "gtk-utils.h"
|
||||||
|
|
||||||
#define NUM_GRADIENTS 9
|
#define NUM_GRADIENTS 9
|
||||||
|
132
demos/scale.c
132
demos/scale.c
@ -24,7 +24,7 @@
|
|||||||
* Author: Soren Sandmann <soren.sandmann@gmail.com>
|
* Author: Soren Sandmann <soren.sandmann@gmail.com>
|
||||||
*/
|
*/
|
||||||
#ifdef HAVE_CONFIG_H
|
#ifdef HAVE_CONFIG_H
|
||||||
#include "pixman-config.h"
|
#include "config.h"
|
||||||
#endif
|
#endif
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include <gtk/gtk.h>
|
#include <gtk/gtk.h>
|
||||||
@ -55,70 +55,50 @@ get_widget (app_t *app, const char *name)
|
|||||||
return widget;
|
return widget;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Figure out the boundary of a diameter=1 circle transformed into an ellipse
|
static double
|
||||||
* by trans. Proof that this is the correct calculation:
|
min4 (double a, double b, double c, double d)
|
||||||
*
|
{
|
||||||
* Transform x,y to u,v by this matrix calculation:
|
double m1, m2;
|
||||||
*
|
|
||||||
* |u| |a c| |x|
|
m1 = MIN (a, b);
|
||||||
* |v| = |b d|*|y|
|
m2 = MIN (c, d);
|
||||||
*
|
return MIN (m1, m2);
|
||||||
* Horizontal component:
|
}
|
||||||
*
|
|
||||||
* u = ax+cy (1)
|
static double
|
||||||
*
|
max4 (double a, double b, double c, double d)
|
||||||
* For each x,y on a radius-1 circle (p is angle to the point):
|
{
|
||||||
*
|
double m1, m2;
|
||||||
* x^2+y^2 = 1
|
|
||||||
* x = cos(p)
|
m1 = MAX (a, b);
|
||||||
* y = sin(p)
|
m2 = MAX (c, d);
|
||||||
* dx/dp = -sin(p) = -y
|
return MAX (m1, m2);
|
||||||
* 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
|
static void
|
||||||
compute_extents (pixman_f_transform_t *trans, double *sx, double *sy)
|
compute_extents (pixman_f_transform_t *trans, double *sx, double *sy)
|
||||||
{
|
{
|
||||||
*sx = hypot (trans->m[0][0], trans->m[0][1]) / trans->m[2][2];
|
double min_x, max_x, min_y, max_y;
|
||||||
*sy = hypot (trans->m[1][0], trans->m[1][1]) / trans->m[2][2];
|
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;
|
||||||
}
|
}
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
@ -278,37 +258,39 @@ rescale (GtkWidget *may_be_null, app_t *app)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
on_draw (GtkWidget *widget, cairo_t *cr, gpointer user_data)
|
on_expose (GtkWidget *da, GdkEvent *event, gpointer data)
|
||||||
{
|
{
|
||||||
app_t *app = user_data;
|
app_t *app = data;
|
||||||
GdkRectangle area;
|
GdkRectangle *area = &event->expose.area;
|
||||||
cairo_surface_t *surface;
|
cairo_surface_t *surface;
|
||||||
pixman_image_t *tmp;
|
pixman_image_t *tmp;
|
||||||
|
cairo_t *cr;
|
||||||
uint32_t *pixels;
|
uint32_t *pixels;
|
||||||
|
|
||||||
gdk_cairo_get_clip_rectangle(cr, &area);
|
pixels = calloc (1, area->width * area->height * 4);
|
||||||
|
|
||||||
pixels = calloc (1, area.width * area.height * 4);
|
|
||||||
tmp = pixman_image_create_bits (
|
tmp = pixman_image_create_bits (
|
||||||
PIXMAN_a8r8g8b8, area.width, area.height, pixels, area.width * 4);
|
PIXMAN_a8r8g8b8, area->width, area->height, pixels, area->width * 4);
|
||||||
|
|
||||||
if (area.x < app->scaled_width && area.y < app->scaled_height)
|
if (area->x < app->scaled_width && area->y < app->scaled_height)
|
||||||
{
|
{
|
||||||
pixman_image_composite (
|
pixman_image_composite (
|
||||||
PIXMAN_OP_SRC,
|
PIXMAN_OP_SRC,
|
||||||
app->original, NULL, tmp,
|
app->original, NULL, tmp,
|
||||||
area.x, area.y, 0, 0, 0, 0,
|
area->x, area->y, 0, 0, 0, 0,
|
||||||
app->scaled_width - area.x, app->scaled_height - area.y);
|
app->scaled_width - area->x, app->scaled_height - area->y);
|
||||||
}
|
}
|
||||||
|
|
||||||
surface = cairo_image_surface_create_for_data (
|
surface = cairo_image_surface_create_for_data (
|
||||||
(uint8_t *)pixels, CAIRO_FORMAT_ARGB32,
|
(uint8_t *)pixels, CAIRO_FORMAT_ARGB32,
|
||||||
area.width, area.height, area.width * 4);
|
area->width, area->height, area->width * 4);
|
||||||
|
|
||||||
cairo_set_source_surface (cr, surface, area.x, area.y);
|
cr = gdk_cairo_create (da->window);
|
||||||
|
|
||||||
|
cairo_set_source_surface (cr, surface, area->x, area->y);
|
||||||
|
|
||||||
cairo_paint (cr);
|
cairo_paint (cr);
|
||||||
|
|
||||||
|
cairo_destroy (cr);
|
||||||
cairo_surface_destroy (surface);
|
cairo_surface_destroy (surface);
|
||||||
free (pixels);
|
free (pixels);
|
||||||
pixman_image_unref (tmp);
|
pixman_image_unref (tmp);
|
||||||
@ -398,7 +380,7 @@ app_new (pixman_image_t *original)
|
|||||||
gtk_scale_add_mark (GTK_SCALE (widget), 0.0, GTK_POS_LEFT, NULL);
|
gtk_scale_add_mark (GTK_SCALE (widget), 0.0, GTK_POS_LEFT, NULL);
|
||||||
|
|
||||||
widget = get_widget (app, "drawing_area");
|
widget = get_widget (app, "drawing_area");
|
||||||
g_signal_connect (widget, "draw", G_CALLBACK (on_draw), app);
|
g_signal_connect (widget, "expose_event", G_CALLBACK (on_expose), app);
|
||||||
|
|
||||||
set_up_filter_box (app, "reconstruct_x_combo_box");
|
set_up_filter_box (app, "reconstruct_x_combo_box");
|
||||||
set_up_filter_box (app, "reconstruct_y_combo_box");
|
set_up_filter_box (app, "reconstruct_y_combo_box");
|
||||||
|
@ -177,7 +177,6 @@
|
|||||||
id="lock_checkbutton">
|
id="lock_checkbutton">
|
||||||
<property name="label" translatable="yes">Lock X and Y Dimensions</property>
|
<property name="label" translatable="yes">Lock X and Y Dimensions</property>
|
||||||
<property name="xalign">0.0</property>
|
<property name="xalign">0.0</property>
|
||||||
<property name="active">True</property>
|
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="expand">False</property>
|
<property name="expand">False</property>
|
||||||
@ -302,7 +301,6 @@
|
|||||||
<object class="GtkSpinButton" id="subsample_spin_button">
|
<object class="GtkSpinButton" id="subsample_spin_button">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="adjustment">subsample_adjustment</property>
|
<property name="adjustment">subsample_adjustment</property>
|
||||||
<property name="value">4</property>
|
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="left_attach">1</property>
|
<property name="left_attach">1</property>
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "utils.h"
|
#include "../test/utils.h"
|
||||||
#include "gtk-utils.h"
|
#include "gtk-utils.h"
|
||||||
|
|
||||||
int
|
int
|
||||||
|
609
meson.build
609
meson.build
@ -1,609 +0,0 @@
|
|||||||
# 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(),
|
|
||||||
)
|
|
@ -1,122 +0,0 @@
|
|||||||
# 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
12
neon-test.S
@ -1,12 +0,0 @@
|
|||||||
.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
|
|
5
pixman-1-uninstalled.pc.in
Normal file
5
pixman-1-uninstalled.pc.in
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
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
|
11
pixman-1.pc.in
Normal file
11
pixman-1.pc.in
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
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
|
||||||
|
|
139
pixman/Makefile.am
Normal file
139
pixman/Makefile.am
Normal file
@ -0,0 +1,139 @@
|
|||||||
|
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-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-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 $@ $<
|
42
pixman/Makefile.sources
Normal file
42
pixman/Makefile.sources
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
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)
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user