pixman: Changes to 'upstream-unstable'
.gitignore | 4
Makefile.am | 121
RELEASING | 67
TODO | 71
configure.ac | 91
pixman/Makefile.am | 48
pixman/Makefile.win32 | 97
pixman/pixman-access-accessors.c | 3
pixman/pixman-access.c | 1686 +++++++++++++
pixman/pixman-combine.c | 1260 ++++++++++
pixman/pixman-compose.c | 4150 ----------------------------------
pixman/pixman-edge-imp.h | 64
pixman/pixman-edge.c | 66
pixman/pixman-image.c | 75
pixman/pixman-mmx.c | 670 ++---
pixman/pixman-mmx.h | 5
pixman/pixman-pict.c | 1106 +++------
pixman/pixman-private.h | 138 -
pixman/pixman-region.c | 1
pixman/pixman-source.c | 681 +++++
pixman/pixman-sse.c | 51
pixman/pixman-sse.h | 53
pixman/pixman-transformed-accessors.c | 3
pixman/pixman-transformed.c | 726 +++++
pixman/pixman-trap.c | 6
pixman/pixman-utils.c | 218 +
pixman/pixman-version.h.in | 50
pixman/pixman.h | 97
test/Makefile.am | 6
test/fetch-test.c | 163 +
30 files changed, 6468 insertions(+), 5309 deletions(-)
New commits:
commit 92b675db8d3ef44c3c87110443b15a68a871cf7b
Author: Søren Sandmann Pedersen <sandmann@redhat.com>
Date: Thu Mar 27 10:08:35 2008 -0400
Fix log generation
diff --git a/Makefile.am b/Makefile.am
index 87d212e..542603e 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -118,7 +118,7 @@ release-publish-message: $(sha1_tgz) $(md5_tgz) $(sha1_tbz2) $(md5_tbz2) ensure-
@echo " tag: $(PACKAGE)-$(VERSION)"
@echo ""
@echo "Log:"
- @git-log --no-merges "$(PACKAGE)-$(PREV)".. | git shortlog | awk '{ printf "\t"; print ; }' | cut -b0-80
+ @git-log --no-merges "$(PACKAGE)-$(PREV)".."$(PACKAGE)-$(VERSION)" | git shortlog | awk '{ printf "\t"; print ; }' | cut -b0-80
@echo "============================== CUT HERE =============================="
@echo ""
commit 0c33317f59b93f5cab348619b1c38a5dce97de94
Author: Søren Sandmann Pedersen <sandmann@redhat.com>
Date: Thu Mar 27 10:07:11 2008 -0400
Bump version to 0.10.0.
Also a bunch of changes to the release make targets
diff --git a/Makefile.am b/Makefile.am
index 9a2b991..87d212e 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -15,24 +15,40 @@ RELEASE_OR_SNAPSHOT = $$(if test "x$(CAIRO_VERSION_MINOR)" = "x$$(echo "$(CAIRO_
RELEASE_CAIRO_HOST = $(USERNAME)@cairographics.org
RELEASE_CAIRO_DIR = /srv/cairo.freedesktop.org/www/releases
RELEASE_CAIRO_URL = http://cairographics.org/releases
+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
+RELEASE_ANNOUNCE_LIST = cairo-announce@cairographics.org, xorg-announce@lists.freedesktop.org
tar_gz = $(PACKAGE)-$(VERSION).tar.gz
tar_bz2 = $(PACKAGE)-$(VERSION).tar.bz2
-sha1_file = $(tar_gz).sha1
-gpg_file = $(sha1_file).asc
-$(sha1_file): $(tar_gz)
+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 $^ > $@
-$(gpg_file): $(sha1_file)
+$(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 $^
release-verify-newer:
- @echo -n "Checking that no $(VERSION) release already exists..."
+ @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." \
@@ -44,52 +60,67 @@ release-verify-newer:
@echo "Good."
release-remove-old:
- $(RM) $(tar_gz) $(tar_bz2) $(sha1_file) $(gpg_file)
+ $(RM) $(tar_gz) $(tar_bz2) $(sha1_tgz) $(gpg_file)
-release-check: release-verify-newer release-remove-old distcheck
+ensure-prev:
+ @if [[ "$(PREV)" == "" ]]; then \
+ echo "" && \
+ echo "You must set the PREV variable on the make command line to" && \
+ echo "the git tag of the last release." && \
+ echo "" && \
+ echo "For example:" && \
+ echo " make PREV=pixman-0.7.3" && \
+ echo "" && \
+ false; \
+ fi
-release-upload: release-check $(tar_gz) $(tar_bz2) $(sha1_file) $(gpg_file)
+release-check: ensure-prev release-verify-newer release-remove-old distcheck
+
+release-upload: release-check $(tar_gz) $(tar_bz2) $(sha1_tgz) $(gpg_file)
mkdir -p releases
- scp $(tar_gz) $(sha1_file) $(gpg_file) $(RELEASE_CAIRO_HOST):$(RELEASE_CAIRO_DIR)
- scp $(tar_gz) $(tar_bz2) $(sha1_file) $(gpg_file) $(RELEASE_XORG_HOST):$(RELEASE_XORG_DIR)
- mv $(tar_gz) $(tar_bz2) $(sha1_file) $(gpg_file) releases
+ 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)"
git-tag -s -m "$(PACKAGE) $(VERSION) release" $(PACKAGE)-$(VERSION)
-release-publish-message: releases/$(sha1_file)
+release-publish-message: $(sha1_tgz) $(md5_tgz) $(sha1_tbz2) $(md5_tbz2) 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 "Subject: $(PACKAGE) release $(VERSION) now available"
- @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 from:"
+ @echo "A new $(PACKAGE) release $(VERSION) is now available"
@echo ""
+ @echo "tar.gz:"
@echo " $(RELEASE_CAIRO_URL)/$(tar_gz)"
+ @echo " $(RELEASE_XORG_URL)/$(tar_gz)"
@echo ""
- @echo " which can be verified with:"
+ @echo "tar.bz2:"
+ @echo " $(RELEASE_XORG_URL)/$(tar_bz2)"
@echo ""
- @echo " $(RELEASE_CAIRO_URL)/$(sha1_file)"
- @echo -n " "
- @cat releases/$(sha1_file)
+ @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 `getent passwd "$$USER" | cut -d: -f 5 | cut -d, -f 1`)"
@echo ""
- @echo " Additionally, a git clone of the source tree:"
- @echo ""
- @echo " git clone git://git.freedesktop.org/git/pixman"
- @echo ""
- @echo " will include a signed $(PACKAGE)-$(VERSION) tag which points to a commit named:"
- @echo " `git cat-file tag $(PACKAGE)-$(VERSION) | grep ^object | sed -e 's,object ,,'`"
- @echo ""
- @echo " which can be verified with:"
- @echo " git verify-tag $(PACKAGE)-$(VERSION)"
- @echo ""
- @echo " and can be checked out with a command such as:"
- @echo " git checkout -b build $(PACKAGE)-$(VERSION)"
+ @echo "Git:"
+ @echo " git://git.freedesktop.org/git/pixman"
+ @echo " tag: $(PACKAGE)-$(VERSION)"
@echo ""
+ @echo "Log:"
+ @git-log --no-merges "$(PACKAGE)-$(PREV)".. | git shortlog | awk '{ printf "\t"; print ; }' | cut -b0-80
@echo "============================== CUT HERE =============================="
+ @echo ""
release-publish: release-upload release-publish-message
diff --git a/TODO b/TODO
index e1ee318..7ff58de 100644
--- a/TODO
+++ b/TODO
@@ -1,3 +1,5 @@
+ - Update the RLEASING file
+
- Things to keep in mind if breaking ABI:
- There should be a guard #ifndef I_AM_EITHER_CAIRO_OR_THE_X_SERVER
diff --git a/configure.ac b/configure.ac
index f0563ac..79997e1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -56,8 +56,8 @@ AC_PREREQ([2.57])
# more information
m4_define([pixman_major], 0)
-m4_define([pixman_minor], 9)
-m4_define([pixman_micro], 7)
+m4_define([pixman_minor], 10)
+m4_define([pixman_micro], 0)
m4_define([pixman_version],[pixman_major.pixman_minor.pixman_micro])
commit 0637671959b56bba93f39208c825c0d97e2f90df
Author: Søren Sandmann Pedersen <sandmann@redhat.com>
Date: Thu Mar 27 08:37:29 2008 -0400
Make username configurable; add Makefile.win32 to EXTRA_DIST
diff --git a/Makefile.am b/Makefile.am
index e6b1a60..9a2b991 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -10,11 +10,12 @@ snapshot:
test -d "$(srcdir)/.git" && distdir=$$distdir-`cd "$(srcdir)" && git-rev-parse HEAD | cut -c 1-6`; \
$(MAKE) $(AM_MAKEFLAGS) distdir="$$distdir" dist
+USERNAME=$$USER
RELEASE_OR_SNAPSHOT = $$(if test "x$(CAIRO_VERSION_MINOR)" = "x$$(echo "$(CAIRO_VERSION_MINOR)/2*2" | bc)" ; then echo release; else echo snapshot; fi)
-RELEASE_CAIRO_HOST = cairographics.org
+RELEASE_CAIRO_HOST = $(USERNAME)@cairographics.org
RELEASE_CAIRO_DIR = /srv/cairo.freedesktop.org/www/releases
RELEASE_CAIRO_URL = http://cairographics.org/releases
-RELEASE_XORG_HOST = xorg.freedesktop.org
+RELEASE_XORG_HOST = $(USERNAME)@xorg.freedesktop.org
RELEASE_XORG_DIR = /srv/xorg.freedesktop.org/archive/individual/lib
RELEASE_ANNOUNCE_LIST = cairo-announce@cairographics.org
@@ -32,6 +33,10 @@ $(gpg_file): $(sha1_file)
release-verify-newer:
@echo -n "Checking that no $(VERSION) release already exists..."
+ @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." \
diff --git a/pixman/Makefile.am b/pixman/Makefile.am
index 251fef9..190df4c 100644
--- a/pixman/Makefile.am
+++ b/pixman/Makefile.am
@@ -27,6 +27,8 @@ libpixmanincludedir = $(includedir)/pixman-1/
libpixmaninclude_HEADERS = pixman.h pixman-version.h
noinst_LTLIBRARIES =
+EXTRA_DIST = Makefile.win32
+
# mmx code
if USE_MMX
noinst_LTLIBRARIES += libpixman-mmx.la
commit 10a227ed9311529cd98cb8b3aa1b8d48dad8b517
Author: Vladimir Vukicevic <vladimir@pobox.com>
Date: Wed Mar 26 16:10:43 2008 -0700
Fix up unsigned long long/ullong usage
A few stray "unsigned long long"s were in place, along with
a ullong typedef outside of the appropriate ifdef.
diff --git a/pixman/pixman-mmx.c b/pixman/pixman-mmx.c
index 9b1c2b4..8afbcb8 100644
--- a/pixman/pixman-mmx.c
+++ b/pixman/pixman-mmx.c
@@ -76,9 +76,8 @@
/* --------------- MMX primitivess ------------------------------------ */
-typedef unsigned long long ullong;
-
#ifdef __GNUC__
+typedef unsigned long long ullong;
typedef ullong mmxdatafield;
#endif
#ifdef _MSC_VER
@@ -1624,7 +1623,7 @@ fbCompositeSolidMask_nx8x8888mmx (pixman_op_t op,
if (srca == 0)
return;
- srcsrc = (unsigned long long)src << 32 | src;
+ srcsrc = (ullong)src << 32 | src;
fbComposeGetStart (pDst, xDst, yDst, uint32_t, dstStride, dstLine, 1);
fbComposeGetStart (pMask, xMask, yMask, uint8_t, maskStride, maskLine, 1);
@@ -1667,7 +1666,7 @@ fbCompositeSolidMask_nx8x8888mmx (pixman_op_t op,
if (srca == 0xff && (m0 & m1) == 0xff)
{
- *(unsigned long long *)dst = srcsrc;
+ *(ullong *)dst = srcsrc;
}
else if (m0 | m1)
{
@@ -1988,7 +1987,7 @@ fbCompositeSolidMask_nx8x0565mmx (pixman_op_t op,
int dstStride, maskStride;
uint16_t w;
__m64 vsrc, vsrca, tmp;
- unsigned long long srcsrcsrcsrc, src16;
+ ullong srcsrcsrcsrc, src16;
CHECKPOINT();
@@ -2050,7 +2049,7 @@ fbCompositeSolidMask_nx8x0565mmx (pixman_op_t op,
if (srca == 0xff && (m0 & m1 & m2 & m3) == 0xff)
{
- *(unsigned long long *)dst = srcsrcsrcsrc;
+ *(ullong *)dst = srcsrcsrcsrc;
}
else if (m0 | m1 | m2 | m3)
{
commit eec44d371f278ee1f7de03d1a0fcaa17941c8a00
Author: Søren Sandmann <sandmann@redhat.com>
Date: Wed Mar 26 02:20:42 2008 -0400
Make it distcheck
diff --git a/pixman/Makefile.am b/pixman/Makefile.am
index a4eacaa..251fef9 100644
--- a/pixman/Makefile.am
+++ b/pixman/Makefile.am
@@ -2,33 +2,34 @@ lib_LTLIBRARIES = libpixman-1.la
libpixman_1_la_LDFLAGS = -version-info $(LT_VERSION_INFO)
libpixman_1_la_LIBADD = @DEP_LIBS@ -lm
libpixman_1_la_SOURCES = \
- pixman.h \
- pixman-access.c \
+ pixman.h \
+ pixman-access.c \
pixman-access-accessors.c \
- pixman-region.c \
- pixman-private.h \
- pixman-image.c \
- pixman-combine.c \
- pixman-compose.c \
+ pixman-region.c \
+ pixman-private.h \
+ pixman-image.c \
+ pixman-combine.c \
+ pixman-compose.c \
pixman-compose-accessors.c \
- pixman-pict.c \
- pixman-source.c \
- pixman-transformed.c \
+ pixman-pict.c \
+ pixman-source.c \
+ pixman-transformed.c \
pixman-transformed-accessors.c \
- pixman-utils.c \
- pixman-edge.c \
+ pixman-utils.c \
+ pixman-edge.c \
pixman-edge-accessors.c \
- pixman-edge-imp.h \
- pixman-trap.c \
- pixman-compute-region.c \
+ pixman-edge-imp.h \
+ pixman-trap.c \
+ pixman-compute-region.c \
pixman-timer.c
libpixmanincludedir = $(includedir)/pixman-1/
libpixmaninclude_HEADERS = pixman.h pixman-version.h
+noinst_LTLIBRARIES =
# mmx code
if USE_MMX
-noinst_LTLIBRARIES = libpixman-mmx.la
+noinst_LTLIBRARIES += libpixman-mmx.la
libpixman_mmx_la_SOURCES = \
pixman-mmx.c \
pixman-mmx.h
@@ -40,7 +41,7 @@ endif
# sse2 code
if USE_SSE2
-noinst_LTLIBRARIES = libpixman-sse.la
+noinst_LTLIBRARIES += libpixman-sse.la
libpixman_sse_la_SOURCES = \
pixman-sse.c \
pixman-sse.h
commit 03b9c143770566ebcbee7ca3abde223529c07ce9
Author: Søren Sandmann <sandmann@redhat.com>
Date: Wed Mar 26 01:49:56 2008 -0400
Move version functions from pixman-version.c into pixman-utils.c.
Delete pixman-version.c
diff --git a/configure.ac b/configure.ac
index e39f4c0..f0563ac 100644
--- a/configure.ac
+++ b/configure.ac
@@ -24,25 +24,36 @@ AC_PREREQ([2.57])
# Pixman versioning scheme
#
-# - If the changes don't affect API or ABI, then increment pixman_micro
-# Note: This number is incremented immediately before *and*
-# immediately after a release. This gurantees that the micro
-# component is always an even number in any release.
+# - The git version must at all times have an odd MICRO version
+# number.
#
-# - If API is added, then increment PIXMAN_MINOR, and set MICRO to 0
+# - If you add API, increment the MICRO version to the next largest
+# odd number.
#
-# - If you break ABI, then
-# - In the first development release where you break ABI, find all instances of
-# "pixman-n" and change it to pixman-(n+1)
+# - If you release a version that contains new API, then increment
+# MINOR and set MICRO to 0.
+#
+# - If you release a new version that does not contain new API, then
+# increment MICRO to the next even number.
+#
+# - After doing a release, increment MICRO again to make the version
+# number in git odd.
+#
+# - If you break the ABI, then
+#
+# - increment MAJOR
+#
+# - In the first development release where you break ABI, find
+# all instances of "pixman-n" and change them to pixman-(n+1)
#
# This needs to be done at least in
# configure.ac
# all Makefile.am's
# pixman-n.pc.in
#
-# This ensures that binary incompatible versions can be installed in parallel.
-# See http://www106.pair.com/rhp/parallel.html for more information
-#
+# This ensures that binary incompatible versions can be installed
+# in parallel. See http://www106.pair.com/rhp/parallel.html for
+# more information
m4_define([pixman_major], 0)
m4_define([pixman_minor], 9)
diff --git a/pixman/Makefile.am b/pixman/Makefile.am
index ff3997b..a4eacaa 100644
--- a/pixman/Makefile.am
+++ b/pixman/Makefile.am
@@ -21,8 +21,7 @@ libpixman_1_la_SOURCES = \
pixman-edge-imp.h \
pixman-trap.c \
pixman-compute-region.c \
- pixman-timer.c \
- pixman-version.c
+ pixman-timer.c
libpixmanincludedir = $(includedir)/pixman-1/
libpixmaninclude_HEADERS = pixman.h pixman-version.h
diff --git a/pixman/pixman-utils.c b/pixman/pixman-utils.c
index 9cba793..b100d09 100644
--- a/pixman/pixman-utils.c
+++ b/pixman/pixman-utils.c
@@ -408,6 +408,49 @@ pixman_malloc_abc (unsigned int a,
return malloc (a * b * c);
}
+
+/**
+ * pixman_version:
+ *
+ * Returns the version of the pixman library encoded in a single
+ * integer as per %PIXMAN_VERSION_ENCODE. The encoding ensures that
+ * later versions compare greater than earlier versions.
+ *
+ * A run-time comparison to check that pixman's version is greater than
+ * or equal to version X.Y.Z could be performed as follows:
+ *
+ * <informalexample><programlisting>
+ * if (pixman_version() >= PIXMAN_VERSION_ENCODE(X,Y,Z)) {...}
+ * </programlisting></informalexample>
+ *
+ * See also pixman_version_string() as well as the compile-time
+ * equivalents %PIXMAN_VERSION and %PIXMAN_VERSION_STRING.
+ *
+ * Return value: the encoded version.
+ **/
+int
+pixman_version (void)
+{
+ return PIXMAN_VERSION;
+}
+
+/**
+ * pixman_version_string:
+ *
+ * Returns the version of the pixman library as a human-readable string
+ * of the form "X.Y.Z".
+ *
+ * See also pixman_version() as well as the compile-time equivalents
+ * %PIXMAN_VERSION_STRING and %PIXMAN_VERSION.
+ *
+ * Return value: a string containing the version.
+ **/
+const char*
+pixman_version_string (void)
+{
+ return PIXMAN_VERSION_STRING;
+}
+
/**
* pixman_format_supported_destination:
* @format: A pixman_format_code_t format
diff --git a/pixman/pixman-version.c b/pixman/pixman-version.c
deleted file mode 100644
index 58ac057..0000000
--- a/pixman/pixman-version.c
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * Copyright © 2008 Red Hat, Inc.
- *
- * 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.
- *
- * Author: Carl D. Worth <cworth@cworth.org>
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include "pixman-private.h"
-
-/**
- * pixman_version:
- *
- * Returns the version of the pixman library encoded in a single
- * integer as per %PIXMAN_VERSION_ENCODE. The encoding ensures that
- * later versions compare greater than earlier versions.
- *
- * A run-time comparison to check that pixman's version is greater than
- * or equal to version X.Y.Z could be performed as follows:
- *
- * <informalexample><programlisting>
- * if (pixman_version() >= PIXMAN_VERSION_ENCODE(X,Y,Z)) {...}
- * </programlisting></informalexample>
- *
- * See also pixman_version_string() as well as the compile-time
- * equivalents %PIXMAN_VERSION and %PIXMAN_VERSION_STRING.
- *
- * Return value: the encoded version.
- **/
-int
-pixman_version (void)
-{
- return PIXMAN_VERSION;
-}
-
-/**
- * pixman_version_string:
- *
- * Returns the version of the pixman library as a human-readable string
- * of the form "X.Y.Z".
- *
- * See also pixman_version() as well as the compile-time equivalents
- * %PIXMAN_VERSION_STRING and %PIXMAN_VERSION.
- *
- * Return value: a string containing the version.
- **/
-const char*
-pixman_version_string (void)
-{
- return PIXMAN_VERSION_STRING;
-}
commit cb7fceabb9da30d03b29f9ff946a3793a1b9ebab
Author: Søren Sandmann <sandmann@redhat.com>
Date: Tue Mar 25 23:11:19 2008 -0400
Make pixman-version.h print an error if you include it by itself
diff --git a/pixman/pixman-version.h.in b/pixman/pixman-version.h.in
index ce86312..256b2e6 100644
--- a/pixman/pixman-version.h.in
+++ b/pixman/pixman-version.h.in
@@ -27,6 +27,10 @@
#ifndef PIXMAN_VERSION_H__
#define PIXMAN_VERSION_H__
+#ifndef PIXMAN_H__
+# error pixman-version.h should only be included by pixman.h
+#endif
+
#define PIXMAN_VERSION_MAJOR @PIXMAN_VERSION_MAJOR@
#define PIXMAN_VERSION_MINOR @PIXMAN_VERSION_MINOR@
#define PIXMAN_VERSION_MICRO @PIXMAN_VERSION_MICRO@
commit 0982adf0794507899f642bdb55f3a979d6cc486e
Author: Søren Sandmann <sandmann@redhat.com>
Date: Tue Mar 25 23:07:03 2008 -0400
Update TODO
diff --git a/TODO b/TODO
index 184f823..e1ee318 100644
--- a/TODO
+++ b/TODO
@@ -21,6 +21,10 @@
- There should only be one trap rasterization API.
+ - The PIXMAN_g8/c8/etc formats should use the A channel
+ to indicate the actual depth. That way PIXMAN_x4c4 and PIXMAN_c8
+ won't collide.
+
- Make pixman_region_point_in() survive a NULL box, then fix up
pixman-compose.c
commit 3e700366ef82f0ecd28014cf873ffd292ad9cdc5
Author: Carl Worth <cworth@cworth.org>
Date: Tue Mar 25 19:43:40 2008 -0700
Eliminate duplicate case values that were breaking the compilation.
diff --git a/pixman/pixman-utils.c b/pixman/pixman-utils.c
index d4e4c77..9cba793 100644
--- a/pixman/pixman-utils.c
+++ b/pixman/pixman-utils.c
@@ -450,8 +450,12 @@ pixman_format_supported_destination (pixman_format_code_t format)
case PIXMAN_c8:
case PIXMAN_g8:
case PIXMAN_x4a4:
+ /* Collides with PIXMAN_c8
case PIXMAN_x4c4:
+ */
+ /* Collides with PIXMAN_g8
case PIXMAN_x4g4:
+ */
/* 4bpp formats */
case PIXMAN_a4:
case PIXMAN_r1g2b1:
@@ -514,8 +518,12 @@ pixman_format_supported_source (pixman_format_code_t format)
case PIXMAN_c8:
case PIXMAN_g8:
case PIXMAN_x4a4:
+ /* Collides with PIXMAN_c8
case PIXMAN_x4c4:
+ */
+ /* Collides with PIXMAN_g8
case PIXMAN_x4g4:
+ */
/* 4bpp formats */
case PIXMAN_a4:
case PIXMAN_r1g2b1:
commit 7fa668f4ac4be756d097b29240bf15bb71ae6db9
Author: Carl Worth <cworth@cworth.org>
Date: Tue Mar 25 13:12:29 2008 -0700
New API: pixman_format_supported_destination and pixman_format_supported_source
These functions allow for callers to use the PIXMAN_FORMAT macro to
construct a format code and to then determine if the resulting code
is supported by pixman for either destination or source surfaces.
diff --git a/pixman/pixman-utils.c b/pixman/pixman-utils.c
index 73c1cde..d4e4c77 100644
--- a/pixman/pixman-utils.c
+++ b/pixman/pixman-utils.c
@@ -407,3 +407,132 @@ pixman_malloc_abc (unsigned int a,
else
return malloc (a * b * c);
}
+
+/**
+ * pixman_format_supported_destination:
+ * @format: A pixman_format_code_t format
+ *
+ * Return value: whether the provided format code is a supported
+ * format for a pixman surface used as a destination in
+ * rendering.
+ *
+ * Currently, all pixman_format_code_t values are supported
+ * except for the YUV formats.
+ **/
+pixman_bool_t
+pixman_format_supported_destination (pixman_format_code_t format)
+{
+ switch (format) {
+ /* 32 bpp formats */
+ case PIXMAN_a8r8g8b8:
+ case PIXMAN_x8r8g8b8:
+ case PIXMAN_a8b8g8r8:
+ case PIXMAN_x8b8g8r8:
+ case PIXMAN_r8g8b8:
+ case PIXMAN_b8g8r8:
+ case PIXMAN_r5g6b5:
+ case PIXMAN_b5g6r5:
+ /* 16 bpp formats */
+ case PIXMAN_a1r5g5b5:
+ case PIXMAN_x1r5g5b5:
+ case PIXMAN_a1b5g5r5:
+ case PIXMAN_x1b5g5r5:
+ case PIXMAN_a4r4g4b4:
+ case PIXMAN_x4r4g4b4:
+ case PIXMAN_a4b4g4r4:
+ case PIXMAN_x4b4g4r4:
+ /* 8bpp formats */
+ case PIXMAN_a8:
+ case PIXMAN_r3g3b2:
+ case PIXMAN_b2g3r3:
+ case PIXMAN_a2r2g2b2:
+ case PIXMAN_a2b2g2r2:
+ case PIXMAN_c8:
+ case PIXMAN_g8:
+ case PIXMAN_x4a4:
+ case PIXMAN_x4c4:
+ case PIXMAN_x4g4:
+ /* 4bpp formats */
+ case PIXMAN_a4:
+ case PIXMAN_r1g2b1:
+ case PIXMAN_b1g2r1:
+ case PIXMAN_a1r1g1b1:
+ case PIXMAN_a1b1g1r1:
+ case PIXMAN_c4:
+ case PIXMAN_g4:
+ /* 1bpp formats */
+ case PIXMAN_a1:
+ case PIXMAN_g1:
+ return TRUE;
+
+ /* YUV formats */
+ case PIXMAN_yuy2:
+ case PIXMAN_yv12:
+ default:
+ return FALSE;
+ }
+}
+
+/**
+ * pixman_format_supported_source:
+ * @format: A pixman_format_code_t format
+ *
+ * Return value: whether the provided format code is a supported
+ * format for a pixman surface used as a source in
+ * rendering.
+ *
+ * Currently, all pixman_format_code_t values are supported.
+ **/
+pixman_bool_t
+pixman_format_supported_source (pixman_format_code_t format)
+{
+ switch (format) {
+ /* 32 bpp formats */
+ case PIXMAN_a8r8g8b8:
+ case PIXMAN_x8r8g8b8:
+ case PIXMAN_a8b8g8r8:
+ case PIXMAN_x8b8g8r8:
+ case PIXMAN_r8g8b8:
+ case PIXMAN_b8g8r8:
+ case PIXMAN_r5g6b5:
+ case PIXMAN_b5g6r5:
+ /* 16 bpp formats */
+ case PIXMAN_a1r5g5b5:
+ case PIXMAN_x1r5g5b5:
+ case PIXMAN_a1b5g5r5:
+ case PIXMAN_x1b5g5r5:
+ case PIXMAN_a4r4g4b4:
+ case PIXMAN_x4r4g4b4:
+ case PIXMAN_a4b4g4r4:
+ case PIXMAN_x4b4g4r4:
+ /* 8bpp formats */
+ case PIXMAN_a8:
+ case PIXMAN_r3g3b2:
+ case PIXMAN_b2g3r3:
+ case PIXMAN_a2r2g2b2:
+ case PIXMAN_a2b2g2r2:
+ case PIXMAN_c8:
+ case PIXMAN_g8:
+ case PIXMAN_x4a4:
+ case PIXMAN_x4c4:
+ case PIXMAN_x4g4:
+ /* 4bpp formats */
+ case PIXMAN_a4:
+ case PIXMAN_r1g2b1:
+ case PIXMAN_b1g2r1:
+ case PIXMAN_a1r1g1b1:
+ case PIXMAN_a1b1g1r1:
+ case PIXMAN_c4:
+ case PIXMAN_g4:
+ /* 1bpp formats */
+ case PIXMAN_a1:
+ case PIXMAN_g1:
+ /* YUV formats */
+ case PIXMAN_yuy2:
+ case PIXMAN_yv12:
+ return TRUE;
+
+ default:
+ return FALSE;
+ }
+}
diff --git a/pixman/pixman.h b/pixman/pixman.h
index c4c5c3b..6a27a3f 100644
--- a/pixman/pixman.h
+++ b/pixman/pixman.h
@@ -503,6 +503,13 @@ typedef enum {
PIXMAN_yv12 = PIXMAN_FORMAT(12,PIXMAN_TYPE_YV12,0,0,0,0),
} pixman_format_code_t;
+/* Querying supported format values. */
+PIXMAN_EXPORT
+pixman_bool_t pixman_format_supported_destination (pixman_format_code_t format);
+
+PIXMAN_EXPORT
+pixman_bool_t pixman_format_supported_source (pixman_format_code_t format);
+
/* Constructors */
PIXMAN_EXPORT
pixman_image_t *pixman_image_create_solid_fill (pixman_color_t *color);
commit bd2a53fc4ece82321f139cdf3276a7ceb871f895
Author: Carl Worth <cworth@cworth.org>
Date: Mon Mar 24 14:51:09 2008 -0700
Add pixman_version function and related macros
The complete new API here makes available compile-tim version checks:
PIXMAN_VERSION
PIXMAN_VERSION_STRING
PIXMAN_VERSION_ENCODE
as well as run-time version checks:
pixman_version()
pixman_version_string()
diff --git a/.gitignore b/.gitignore
index 2c736c1..70b7b64 100644
--- a/.gitignore
+++ b/.gitignore
@@ -26,6 +26,7 @@ stamp-h?
config.h
config.h.in
.*.swp
+pixman/pixman-version.h
test/composite-test
test/fetch-test
test/gradient-test
diff --git a/configure.ac b/configure.ac
index 63ee2c5..e39f4c0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -72,8 +72,12 @@ m4_define([lt_age], [pixman_minor])
LT_VERSION_INFO="lt_current:lt_revision:lt_age"
-PIXMAN_MAJOR=pixman_major
-AC_SUBST(PIXMAN_MAJOR)
+PIXMAN_VERSION_MAJOR=pixman_major()
+AC_SUBST(PIXMAN_VERSION_MAJOR)
+PIXMAN_VERSION_MINOR=pixman_minor()
+AC_SUBST(PIXMAN_VERSION_MINOR)
+PIXMAN_VERSION_MICRO=pixman_micro()
+AC_SUBST(PIXMAN_VERSION_MICRO)
AC_SUBST(LT_VERSION_INFO)
@@ -212,4 +216,5 @@ AC_SUBST(DEP_LIBS)
AC_OUTPUT([pixman-1.pc
Makefile
pixman/Makefile
+ pixman/pixman-version.h
test/Makefile])
diff --git a/pixman/Makefile.am b/pixman/Makefile.am
index 37d892b..ff3997b 100644
--- a/pixman/Makefile.am
+++ b/pixman/Makefile.am
@@ -21,10 +21,11 @@ libpixman_1_la_SOURCES = \
pixman-edge-imp.h \
pixman-trap.c \
pixman-compute-region.c \
- pixman-timer.c
+ pixman-timer.c \
+ pixman-version.c
libpixmanincludedir = $(includedir)/pixman-1/
-libpixmaninclude_HEADERS = pixman.h
+libpixmaninclude_HEADERS = pixman.h pixman-version.h
# mmx code
if USE_MMX
diff --git a/pixman/pixman-version.c b/pixman/pixman-version.c
new file mode 100644
index 0000000..58ac057
--- /dev/null
+++ b/pixman/pixman-version.c
@@ -0,0 +1,73 @@
+/*
+ * Copyright © 2008 Red Hat, Inc.
+ *
+ * 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.
+ *
+ * Author: Carl D. Worth <cworth@cworth.org>
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include "pixman-private.h"
+
+/**
+ * pixman_version:
+ *
+ * Returns the version of the pixman library encoded in a single
+ * integer as per %PIXMAN_VERSION_ENCODE. The encoding ensures that
+ * later versions compare greater than earlier versions.
+ *
+ * A run-time comparison to check that pixman's version is greater than
+ * or equal to version X.Y.Z could be performed as follows:
+ *
+ * <informalexample><programlisting>
+ * if (pixman_version() >= PIXMAN_VERSION_ENCODE(X,Y,Z)) {...}
+ * </programlisting></informalexample>
+ *
+ * See also pixman_version_string() as well as the compile-time
+ * equivalents %PIXMAN_VERSION and %PIXMAN_VERSION_STRING.
+ *
+ * Return value: the encoded version.
+ **/
+int
+pixman_version (void)
Reply to: