aboutsummaryrefslogtreecommitdiff
path: root/pixman/test
diff options
context:
space:
mode:
Diffstat (limited to 'pixman/test')
-rw-r--r--pixman/test/Makefile.am19
-rw-r--r--pixman/test/Makefile.in498
-rw-r--r--pixman/test/clip-test.c159
-rw-r--r--pixman/test/composite-test.c155
-rw-r--r--pixman/test/fetch-test.c163
-rw-r--r--pixman/test/gradient-test.c147
-rw-r--r--pixman/test/region-test.c23
7 files changed, 1164 insertions, 0 deletions
diff --git a/pixman/test/Makefile.am b/pixman/test/Makefile.am
new file mode 100644
index 000000000..33e2200db
--- /dev/null
+++ b/pixman/test/Makefile.am
@@ -0,0 +1,19 @@
+if HAVE_GTK
+TESTPROGRAMS = \
+ clip-test \
+ composite-test \
+ gradient-test \
+ region-test \
+ fetch-test
+
+noinst_PROGRAMS = $(TESTPROGRAMS)
+
+INCLUDES = -I$(top_srcdir)/pixman -I$(top_builddir)/pixman $(GTK_CFLAGS)
+
+composite_test_LDADD = $(top_builddir)/pixman/libpixman-1.la $(GTK_LIBS)
+gradient_test_LDADD = $(top_builddir)/pixman/libpixman-1.la $(GTK_LIBS)
+fetch_test_LDADD = $(top_builddir)/pixman/libpixman-1.la
+region_test_LDADD = $(top_builddir)/pixman/libpixman-1.la
+clip_test_LDADD = $(top_builddir)/pixman/libpixman-1.la $(GTK_LIBS)
+
+endif
diff --git a/pixman/test/Makefile.in b/pixman/test/Makefile.in
new file mode 100644
index 000000000..e6ee5c05c
--- /dev/null
+++ b/pixman/test/Makefile.in
@@ -0,0 +1,498 @@
+# Makefile.in generated by automake 1.10.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+@HAVE_GTK_TRUE@noinst_PROGRAMS = $(am__EXEEXT_1)
+subdir = test
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+@HAVE_GTK_TRUE@am__EXEEXT_1 = clip-test$(EXEEXT) \
+@HAVE_GTK_TRUE@ composite-test$(EXEEXT) gradient-test$(EXEEXT) \
+@HAVE_GTK_TRUE@ region-test$(EXEEXT) fetch-test$(EXEEXT)
+PROGRAMS = $(noinst_PROGRAMS)
+clip_test_SOURCES = clip-test.c
+clip_test_OBJECTS = clip-test.$(OBJEXT)
+am__DEPENDENCIES_1 =
+@HAVE_GTK_TRUE@clip_test_DEPENDENCIES = \
+@HAVE_GTK_TRUE@ $(top_builddir)/pixman/libpixman-1.la \
+@HAVE_GTK_TRUE@ $(am__DEPENDENCIES_1)
+composite_test_SOURCES = composite-test.c
+composite_test_OBJECTS = composite-test.$(OBJEXT)
+@HAVE_GTK_TRUE@composite_test_DEPENDENCIES = \
+@HAVE_GTK_TRUE@ $(top_builddir)/pixman/libpixman-1.la \
+@HAVE_GTK_TRUE@ $(am__DEPENDENCIES_1)
+fetch_test_SOURCES = fetch-test.c
+fetch_test_OBJECTS = fetch-test.$(OBJEXT)
+@HAVE_GTK_TRUE@fetch_test_DEPENDENCIES = \
+@HAVE_GTK_TRUE@ $(top_builddir)/pixman/libpixman-1.la
+gradient_test_SOURCES = gradient-test.c
+gradient_test_OBJECTS = gradient-test.$(OBJEXT)
+@HAVE_GTK_TRUE@gradient_test_DEPENDENCIES = \
+@HAVE_GTK_TRUE@ $(top_builddir)/pixman/libpixman-1.la \
+@HAVE_GTK_TRUE@ $(am__DEPENDENCIES_1)
+region_test_SOURCES = region-test.c
+region_test_OBJECTS = region-test.$(OBJEXT)
+@HAVE_GTK_TRUE@region_test_DEPENDENCIES = \
+@HAVE_GTK_TRUE@ $(top_builddir)/pixman/libpixman-1.la
+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
+ $(LDFLAGS) -o $@
+SOURCES = clip-test.c composite-test.c fetch-test.c gradient-test.c \
+ region-test.c
+DIST_SOURCES = clip-test.c composite-test.c fetch-test.c \
+ gradient-test.c region-test.c
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DEP_CFLAGS = @DEP_CFLAGS@
+DEP_LIBS = @DEP_LIBS@
+DSYMUTIL = @DSYMUTIL@
+ECHO = @ECHO@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FFLAGS = @FFLAGS@
+GREP = @GREP@
+GTK_CFLAGS = @GTK_CFLAGS@
+GTK_LIBS = @GTK_LIBS@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+LT_VERSION_INFO = @LT_VERSION_INFO@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+MMX_CFLAGS = @MMX_CFLAGS@
+NMEDIT = @NMEDIT@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PERL = @PERL@
+PIXMAN_VERSION_MAJOR = @PIXMAN_VERSION_MAJOR@
+PIXMAN_VERSION_MICRO = @PIXMAN_VERSION_MICRO@
+PIXMAN_VERSION_MINOR = @PIXMAN_VERSION_MINOR@
+PKG_CONFIG = @PKG_CONFIG@
+RANLIB = @RANLIB@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SSE2_CFLAGS = @SSE2_CFLAGS@
+STRIP = @STRIP@
+VERSION = @VERSION@
+VMX_CFLAGS = @VMX_CFLAGS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+@HAVE_GTK_TRUE@TESTPROGRAMS = \
+@HAVE_GTK_TRUE@ clip-test \
+@HAVE_GTK_TRUE@ composite-test \
+@HAVE_GTK_TRUE@ gradient-test \
+@HAVE_GTK_TRUE@ region-test \
+@HAVE_GTK_TRUE@ fetch-test
+
+@HAVE_GTK_TRUE@INCLUDES = -I$(top_srcdir)/pixman -I$(top_builddir)/pixman $(GTK_CFLAGS)
+@HAVE_GTK_TRUE@composite_test_LDADD = $(top_builddir)/pixman/libpixman-1.la $(GTK_LIBS)
+@HAVE_GTK_TRUE@gradient_test_LDADD = $(top_builddir)/pixman/libpixman-1.la $(GTK_LIBS)
+@HAVE_GTK_TRUE@fetch_test_LDADD = $(top_builddir)/pixman/libpixman-1.la
+@HAVE_GTK_TRUE@region_test_LDADD = $(top_builddir)/pixman/libpixman-1.la
+@HAVE_GTK_TRUE@clip_test_LDADD = $(top_builddir)/pixman/libpixman-1.la $(GTK_LIBS)
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .lo .o .obj
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+ && exit 0; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu test/Makefile'; \
+ cd $(top_srcdir) && \
+ $(AUTOMAKE) --gnu test/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+clean-noinstPROGRAMS:
+ @list='$(noinst_PROGRAMS)'; for p in $$list; do \
+ f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
+ echo " rm -f $$p $$f"; \
+ rm -f $$p $$f ; \
+ done
+clip-test$(EXEEXT): $(clip_test_OBJECTS) $(clip_test_DEPENDENCIES)
+ @rm -f clip-test$(EXEEXT)
+ $(LINK) $(clip_test_OBJECTS) $(clip_test_LDADD) $(LIBS)
+composite-test$(EXEEXT): $(composite_test_OBJECTS) $(composite_test_DEPENDENCIES)
+ @rm -f composite-test$(EXEEXT)
+ $(LINK) $(composite_test_OBJECTS) $(composite_test_LDADD) $(LIBS)
+fetch-test$(EXEEXT): $(fetch_test_OBJECTS) $(fetch_test_DEPENDENCIES)
+ @rm -f fetch-test$(EXEEXT)
+ $(LINK) $(fetch_test_OBJECTS) $(fetch_test_LDADD) $(LIBS)
+gradient-test$(EXEEXT): $(gradient_test_OBJECTS) $(gradient_test_DEPENDENCIES)
+ @rm -f gradient-test$(EXEEXT)
+ $(LINK) $(gradient_test_OBJECTS) $(gradient_test_LDADD) $(LIBS)
+region-test$(EXEEXT): $(region_test_OBJECTS) $(region_test_DEPENDENCIES)
+ @rm -f region-test$(EXEEXT)
+ $(LINK) $(region_test_OBJECTS) $(region_test_LDADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/clip-test.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/composite-test.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fetch-test.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gradient-test.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/region-test.Po@am__quote@
+
+.c.o:
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(COMPILE) -c $<
+
+.c.obj:
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
+
+.c.lo:
+@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ mkid -fID $$unique
+tags: TAGS
+
+TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$tags $$unique; \
+ fi
+ctags: CTAGS
+CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ tags=; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ test -z "$(CTAGS_ARGS)$$tags$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$tags $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && cd $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+ fi; \
+ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+ else \
+ test -f $(distdir)/$$file \
+ || cp -p $$d/$$file $(distdir)/$$file \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-am
+all-am: Makefile $(PROGRAMS)
+installdirs:
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \
+ mostlyclean-am
+
+distclean: distclean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-info: install-info-am
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-ps: install-ps-am
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+ mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+ clean-libtool clean-noinstPROGRAMS ctags distclean \
+ distclean-compile distclean-generic distclean-libtool \
+ distclean-tags distdir dvi dvi-am html html-am info info-am \
+ install install-am install-data install-data-am install-dvi \
+ install-dvi-am install-exec install-exec-am install-html \
+ install-html-am install-info install-info-am install-man \
+ install-pdf install-pdf-am install-ps install-ps-am \
+ install-strip installcheck installcheck-am installdirs \
+ maintainer-clean maintainer-clean-generic mostlyclean \
+ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
+ pdf pdf-am ps ps-am tags uninstall uninstall-am
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/pixman/test/clip-test.c b/pixman/test/clip-test.c
new file mode 100644
index 000000000..457e97a2b
--- /dev/null
+++ b/pixman/test/clip-test.c
@@ -0,0 +1,159 @@
+#include <stdio.h>
+#include <stdlib.h>
+#include <gtk/gtk.h>
+#include "pixman.h"
+
+GdkPixbuf *
+pixbuf_from_argb32 (uint32_t *bits,
+ int width,
+ int height,
+ int stride)
+{
+ GdkPixbuf *pixbuf = gdk_pixbuf_new (GDK_COLORSPACE_RGB, TRUE,
+ 8, width, height);
+ int p_stride = gdk_pixbuf_get_rowstride (pixbuf);
+ guint32 *p_bits = (guint32 *)gdk_pixbuf_get_pixels (pixbuf);
+ int w, h;
+
+ for (h = 0; h < height; ++h)
+ {
+ for (w = 0; w < width; ++w)
+ {
+ uint32_t argb = bits[h * stride + w];
+ guint32 abgr;
+
+ abgr = (argb & 0xff000000) |
+ (argb & 0xff) << 16 |
+ (argb & 0x00ff00) |
+ (argb & 0xff0000) >> 16;
+
+ p_bits[h * (p_stride / 4) + w] = abgr;
+ }
+ }
+
+ return pixbuf;
+}
+
+static gboolean
+on_expose (GtkWidget *widget, GdkEventExpose *expose, gpointer data)
+{
+ GdkPixbuf *pixbuf = data;
+
+ gdk_draw_pixbuf (widget->window, NULL,
+ pixbuf, 0, 0, 0, 0,
+ gdk_pixbuf_get_width (pixbuf),
+ gdk_pixbuf_get_height (pixbuf),
+ GDK_RGB_DITHER_NONE,
+ 0, 0);
+
+ return TRUE;
+}
+
+static void
+show_window (pixman_image_t *img, int w, int h, int stride)
+{
+ GdkPixbuf *pixbuf;
+
+ GtkWidget *window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
+
+ pixbuf = pixbuf_from_argb32 (pixman_image_get_data (img), w, h, stride);
+
+ g_signal_connect (window, "expose_event", G_CALLBACK (on_expose), pixbuf);
+ g_signal_connect (window, "delete_event", G_CALLBACK (gtk_main_quit), NULL);
+
+ gtk_widget_show (window);
+
+ gtk_main ();
+}
+
+#define WIDTH 200
+#define HEIGHT 200
+
+static pixman_image_t *
+create_solid_bits (uint32_t pixel)
+{
+ uint32_t *pixels = malloc (WIDTH * HEIGHT * 4);
+ int i;
+
+ for (i = 0; i < WIDTH * HEIGHT; ++i)
+ pixels[i] = pixel;
+
+ return pixman_image_create_bits (PIXMAN_a8r8g8b8,
+ WIDTH, HEIGHT,
+ pixels,
+ WIDTH * 4);
+}
+
+int
+main (int argc, char **argv)
+{
+ pixman_image_t *gradient_img;
+ pixman_image_t *src_img, *dst_img;
+ pixman_gradient_stop_t stops[2] =
+ {
+ { pixman_int_to_fixed (0), { 0xffff, 0x0000, 0x0000, 0xffff } },
+ { pixman_int_to_fixed (1), { 0xffff, 0xffff, 0x0000, 0xffff } }
+ };
+ pixman_point_fixed_t p1 = { 0, 0 };
+ pixman_point_fixed_t p2 = { pixman_int_to_fixed (WIDTH),
+ pixman_int_to_fixed (HEIGHT) };
+ pixman_point_fixed_t c_inner;
+ pixman_point_fixed_t c_outer;
+ pixman_fixed_t r_inner;
+ pixman_fixed_t r_outer;
+ pixman_region32_t clip_region;
+ pixman_transform_t trans = {
+ { { pixman_double_to_fixed (1.3), pixman_double_to_fixed (0), pixman_double_to_fixed (-0.5), },
+ { pixman_double_to_fixed (0), pixman_double_to_fixed (1), pixman_double_to_fixed (-0.5), },
+ { pixman_double_to_fixed (0), pixman_double_to_fixed (0), pixman_double_to_fixed (1.0) }
+ }
+ };
+
+ gtk_init (&argc, &argv);
+
+ src_img = create_solid_bits (0xff0000ff);
+
+ c_inner.x = pixman_double_to_fixed (100.0);
+ c_inner.y = pixman_double_to_fixed (100.0);
+ c_outer.x = pixman_double_to_fixed (100.0);
+ c_outer.y = pixman_double_to_fixed (100.0);
+ r_inner = 0;
+ r_outer = pixman_double_to_fixed (100.0);
+
+ gradient_img = pixman_image_create_radial_gradient (&c_inner, &c_outer,
+ r_inner, r_outer,
+ stops, 2);
+
+#if 0
+ gradient_img = pixman_image_create_linear_gradient (&p1, &p2,
+ stops, 2);
+
+#endif
+
+ pixman_image_composite (PIXMAN_OP_OVER, gradient_img, NULL, src_img,
+ 0, 0, 0, 0, 0, 0, WIDTH, HEIGHT);
+
+ pixman_region32_init_rect (&clip_region, 50, 0, 100, 200);
+ pixman_image_set_clip_region32 (src_img, &clip_region);
+ pixman_image_set_source_clipping (src_img, TRUE);
+ pixman_image_set_transform (src_img, &trans);
+ pixman_image_set_repeat (src_img, PIXMAN_REPEAT_NORMAL);
+
+ dst_img = create_solid_bits (0xffff0000);
+ pixman_image_composite (PIXMAN_OP_OVER, src_img, NULL, dst_img,
+ 0, 0, 0, 0, 0, 0, WIDTH, HEIGHT);
+
+
+#if 0
+ printf ("0, 0: %x\n", src[0]);
+ printf ("10, 10: %x\n", src[10 * 10 + 10]);
+ printf ("w, h: %x\n", src[(HEIGHT - 1) * 100 + (WIDTH - 1)]);
+#endif
+
+ show_window (dst_img, WIDTH, HEIGHT, WIDTH);
+
+ pixman_image_unref (gradient_img);
+ pixman_image_unref (src_img);
+
+ return 0;
+}
diff --git a/pixman/test/composite-test.c b/pixman/test/composite-test.c
new file mode 100644
index 000000000..d6596f496
--- /dev/null
+++ b/pixman/test/composite-test.c
@@ -0,0 +1,155 @@
+#include <stdlib.h>
+#include <stdio.h>
+#include "pixman.h"
+
+#include <gtk/gtk.h>
+
+static GdkPixbuf *
+pixbuf_from_argb32 (uint32_t *bits,
+ int width,
+ int height,
+ int stride)
+{
+ GdkPixbuf *pixbuf = gdk_pixbuf_new (GDK_COLORSPACE_RGB, TRUE,
+ 8, width, height);
+ int p_stride = gdk_pixbuf_get_rowstride (pixbuf);
+ guint32 *p_bits = (guint32 *)gdk_pixbuf_get_pixels (pixbuf);
+ int w, h;
+
+ for (h = 0; h < height; ++h)
+ {
+ for (w = 0; w < width; ++w)
+ {
+ uint32_t argb = bits[h * stride + w];
+ guint32 rgba;
+
+ rgba = (argb << 8) | (argb >> 24);
+
+ p_bits[h * (p_stride / 4) + w] = rgba;
+ }
+ }
+
+ return pixbuf;
+}
+
+static gboolean
+on_expose (GtkWidget *widget, GdkEventExpose *expose, gpointer data)
+{
+ GdkPixbuf *pixbuf = data;
+
+ gdk_draw_pixbuf (widget->window, NULL,
+ pixbuf, 0, 0, 0, 0,
+ gdk_pixbuf_get_width (pixbuf),
+ gdk_pixbuf_get_height (pixbuf),
+ GDK_RGB_DITHER_NONE,
+ 0, 0);
+
+ return TRUE;
+}
+
+static void
+show_window (uint32_t *bits, int w, int h, int stride)
+{
+ GdkPixbuf *pixbuf;
+
+ GtkWidget *window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
+
+ pixbuf = pixbuf_from_argb32 (bits, w, h, stride);
+
+ g_signal_connect (window, "expose_event", G_CALLBACK (on_expose), pixbuf);
+
+ gtk_widget_show (window);
+
+ gtk_main ();
+}
+
+#define WIDTH 100
+#define HEIGHT 100
+
+static uint32_t
+reader (const void *src, int size)
+{
+ switch (size)
+ {
+ case 1:
+ return *(uint8_t *)src;
+ case 2:
+ return *(uint16_t *)src;
+ case 4:
+ return *(uint32_t *)src;
+ default:
+ g_assert_not_reached();
+ }
+}
+
+static void
+writer (void *src, uint32_t value, int size)
+{
+ switch (size)
+ {
+ case 1:
+ *(uint8_t *)src = value;
+ break;
+
+ case 2:
+ *(uint16_t *)src = value;
+ break;
+
+ case 4:
+ *(uint32_t *)src = value;
+ break;
+ }
+}
+
+int
+main (int argc, char **argv)
+{
+ uint32_t *src = malloc (WIDTH * HEIGHT * 4);
+ uint32_t *dest = malloc (WIDTH * HEIGHT * 4);
+ pixman_image_t *src_img;
+ pixman_image_t *dest_img;
+ int i, j;
+ gtk_init (&argc, &argv);
+
+ for (i = 0; i < WIDTH * HEIGHT; ++i)
+ src[i] = 0x7f7f0000; /* red */
+
+ for (i = 0; i < WIDTH * HEIGHT; ++i)
+ dest[i] = 0x7f0000ff; /* blue */
+
+ src_img = pixman_image_create_bits (PIXMAN_a8r8g8b8,
+ WIDTH, HEIGHT,
+ src,
+ WIDTH * 4);
+
+ dest_img = pixman_image_create_bits (PIXMAN_a8r8g8b8,
+ WIDTH, HEIGHT,
+ dest,
+ WIDTH * 4);
+
+ pixman_image_set_accessors (src_img, reader, writer);
+ pixman_image_set_accessors (dest_img, reader, writer);
+
+ pixman_image_composite (PIXMAN_OP_OVER, src_img, NULL, dest_img,
+ 0, 0, 0, 0, 0, 0, WIDTH, HEIGHT);
+
+#if 0
+ for (i = 0; i < WIDTH; ++i)
+ {
+ for (j = 0; j < HEIGHT; ++j)
+ g_print ("%x, ", dest[i * WIDTH + j]);
+ g_print ("\n");
+ }
+#endif
+
+ show_window (dest, WIDTH, HEIGHT, WIDTH);
+
+ pixman_image_unref (src_img);
+ pixman_image_unref (dest_img);
+ free (src);
+ free (dest);
+
+
+
+ return 0;
+}
diff --git a/pixman/test/fetch-test.c b/pixman/test/fetch-test.c
new file mode 100644
index 000000000..717f6d4fd
--- /dev/null
+++ b/pixman/test/fetch-test.c
@@ -0,0 +1,163 @@
+#include <assert.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include "pixman.h"
+
+
+#define SIZE 1024
+
+
+pixman_indexed_t mono_pallete = {
+ .rgba = { 0x00000000, 0x00ffffff },
+};
+
+
+typedef struct {
+ pixman_format_code_t format;
+ int width, height;
+ int stride;
+ uint32_t src[SIZE];
+ uint32_t dst[SIZE];
+ pixman_indexed_t *indexed;
+} testcase_t;
+
+testcase_t testcases[] = {
+ {
+ .format = PIXMAN_a8r8g8b8,
+ .width = 2, .height = 2,
+ .stride = 8,
+ .src = { 0x00112233, 0x44556677,
+ 0x8899aabb, 0xccddeeff },
+ .dst = { 0x00112233, 0x44556677,
+ 0x8899aabb, 0xccddeeff },
+ .indexed = NULL,
+ },
+ {
+ .format = PIXMAN_g1,
+ .width = 8, .height = 2,
+ .stride = 4,
+ .src = { 0x00000055,
+ 0x000000aa },
+ .dst = { 0x00ffffff, 0x00000000, 0x00ffffff, 0x00000000, 0x00ffffff, 0x00000000, 0x00ffffff, 0x00000000,
+ 0x00000000, 0x00ffffff, 0x00000000, 0x00ffffff, 0x00000000, 0x00ffffff, 0x00000000, 0x00ffffff },
+ .indexed = &mono_pallete,
+ },
+#if 0
+ {
+ .format = PIXMAN_g8,
+ .width = 4, .height = 2,
+ .stride = 4,
+ .src = { 0x01234567,
+ 0x89abcdef },
+ .dst = { 0x00010101, 0x00232323, 0x00454545, 0x00676767,
+ 0x00898989, 0x00ababab, 0x00cdcdcd, 0x00efefef, },
+ },
+#endif
+ {
+ .format = PIXMAN_yv12,
+ .width = 8, .height = 2,
+ .stride = 8,
+ .src = { 0xff00ff00, 0xff00ff00,
+ 0x00ff00ff, 0x00ff00ff,
+ 0x0080ff80,
+ 0xff800080},
+ .dst = {
+ 0xff000000, 0xffffffff, 0xffb80000, 0xffffe113,
+ 0xff000000, 0xffffffff, 0xff0023ee, 0xff4affff,
+ 0xffffffff, 0xff000000, 0xffffe113, 0xffb80000,
+ 0xffffffff, 0xff000000, 0xff4affff, 0xff0023ee,
+ },
+ },
+};
+
+const int ntestcases = sizeof(testcases)/sizeof(testcases[0]);
+
+
+static uint32_t
+reader (const void *src, int size)
+{
+ switch (size)
+ {
+ case 1:
+ return *(uint8_t *)src;
+ case 2:
+ return *(uint16_t *)src;
+ case 4:
+ return *(uint32_t *)src;
+ default:
+ assert(0);
+ }
+}
+
+
+static void
+writer (void *src, uint32_t value, int size)
+{
+ switch (size)
+ {
+ case 1:
+ *(uint8_t *)src = value;
+ break;
+ case 2:
+ *(uint16_t *)src = value;
+ break;
+ case 4:
+ *(uint32_t *)src = value;
+ break;
+ default:
+ assert(0);
+ }
+}
+
+
+int
+main (int argc, char **argv)
+{
+ uint32_t dst[SIZE];
+ pixman_image_t *src_img;
+ pixman_image_t *dst_img;
+ int i, j, x, y;
+ int ret = 0;
+
+ for (i = 0; i < ntestcases; ++i) {
+ for (j = 0; j < 2; ++j) {
+ src_img = pixman_image_create_bits (testcases[i].format,
+ testcases[i].width,
+ testcases[i].height,
+ testcases[i].src,
+ testcases[i].stride);
+ pixman_image_set_indexed(src_img, testcases[i].indexed);
+
+ dst_img = pixman_image_create_bits (PIXMAN_a8r8g8b8,
+ testcases[i].width,
+ testcases[i].height,
+ dst,
+ testcases[i].width*4);
+
+ if (j) {
+ pixman_image_set_accessors (src_img, reader, writer);
+ pixman_image_set_accessors (dst_img, reader, writer);
+ }
+
+ pixman_image_composite (PIXMAN_OP_SRC, src_img, NULL, dst_img,
+ 0, 0, 0, 0, 0, 0, testcases[i].width, testcases[i].height);
+
+ pixman_image_unref (src_img);
+ pixman_image_unref (dst_img);
+
+ for (y = 0; y < testcases[i].height; ++y)
+ for (x = 0; x < testcases[i].width; ++x) {
+ int offset = y*testcases[i].width + x;
+ if (dst[offset] != testcases[i].dst[offset]) {
+ printf ("test %i%c: pixel mismatch at (x=%d,y=%d): %08x expected, %08x obtained\n",
+ i + 1, 'a' + j,
+ x, y,
+ testcases[i].dst[offset], dst[offset]);
+ ret = 1;
+ }
+ }
+ }
+ }
+
+ return ret;
+}
diff --git a/pixman/test/gradient-test.c b/pixman/test/gradient-test.c
new file mode 100644
index 000000000..8a99ff0e6
--- /dev/null
+++ b/pixman/test/gradient-test.c
@@ -0,0 +1,147 @@
+#include <stdio.h>
+#include <stdlib.h>
+#include <gtk/gtk.h>
+#include "pixman.h"
+
+GdkPixbuf *
+pixbuf_from_argb32 (uint32_t *bits,
+ int width,
+ int height,
+ int stride)
+{
+ GdkPixbuf *pixbuf = gdk_pixbuf_new (GDK_COLORSPACE_RGB, TRUE,
+ 8, width, height);
+ int p_stride = gdk_pixbuf_get_rowstride (pixbuf);
+ guint32 *p_bits = (guint32 *)gdk_pixbuf_get_pixels (pixbuf);
+ int w, h;
+
+ for (h = 0; h < height; ++h)
+ {
+ for (w = 0; w < width; ++w)
+ {
+ uint32_t argb = bits[h * stride + w];
+ guint32 abgr;
+
+ abgr = (argb & 0xff000000) |
+ (argb & 0xff) << 16 |
+ (argb & 0x00ff00) |
+ (argb & 0xff0000) >> 16;
+
+ p_bits[h * (p_stride / 4) + w] = abgr;
+ }
+ }
+
+ return pixbuf;
+}
+
+static gboolean
+on_expose (GtkWidget *widget, GdkEventExpose *expose, gpointer data)
+{
+ GdkPixbuf *pixbuf = data;
+
+ gdk_draw_pixbuf (widget->window, NULL,
+ pixbuf, 0, 0, 0, 0,
+ gdk_pixbuf_get_width (pixbuf),
+ gdk_pixbuf_get_height (pixbuf),
+ GDK_RGB_DITHER_NONE,
+ 0, 0);
+
+ return TRUE;
+}
+
+static void
+show_window (uint32_t *bits, int w, int h, int stride)
+{
+ GdkPixbuf *pixbuf;
+
+ GtkWidget *window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
+
+ pixbuf = pixbuf_from_argb32 (bits, w, h, stride);
+
+ g_signal_connect (window, "expose_event", G_CALLBACK (on_expose), pixbuf);
+ g_signal_connect (window, "delete_event", G_CALLBACK (gtk_main_quit), NULL);
+
+ gtk_widget_show (window);
+
+ gtk_main ();
+}
+
+int
+main (int argc, char **argv)
+{
+#define WIDTH 200
+#define HEIGHT 200
+
+ uint32_t *dest = malloc (WIDTH * HEIGHT * 4);
+ pixman_image_t *src_img;
+ pixman_image_t *dest_img;
+ int i;
+ pixman_gradient_stop_t stops[2] =
+ {
+ { pixman_int_to_fixed (0), { 0xffff, 0x0000, 0x0000, 0xffff } },
+ { pixman_int_to_fixed (1), { 0xffff, 0xffff, 0x0000, 0xffff } }
+ };
+ pixman_point_fixed_t p1 = { 0, 0 };
+ pixman_point_fixed_t p2 = { pixman_int_to_fixed (WIDTH),
+ pixman_int_to_fixed (HEIGHT) };
+ pixman_transform_t trans = {
+ { { pixman_double_to_fixed (2), pixman_double_to_fixed (0.5), pixman_double_to_fixed (-100), },
+ { pixman_double_to_fixed (0), pixman_double_to_fixed (2), pixman_double_to_fixed (0), },
+ { pixman_double_to_fixed (0), pixman_double_to_fixed (0.004990), pixman_double_to_fixed (1.0) }
+ }
+ };
+
+ pixman_transform_t id = {
+ { { pixman_fixed_1, 0, 0 },
+ { 0, pixman_fixed_1, 0 },
+ { 0, 0, pixman_fixed_1 } }
+ };
+
+ pixman_point_fixed_t c_inner;
+ pixman_point_fixed_t c_outer;
+ pixman_fixed_t r_inner;
+ pixman_fixed_t r_outer;
+
+ gtk_init (&argc, &argv);
+
+ for (i = 0; i < WIDTH * HEIGHT; ++i)
+ dest[i] = 0x3f0000ff; /* pale blue */
+
+ dest_img = pixman_image_create_bits (PIXMAN_a8r8g8b8,
+ WIDTH, HEIGHT,
+ dest,
+ WIDTH * 4);
+
+ c_inner.x = pixman_double_to_fixed (50.0);
+ c_inner.y = pixman_double_to_fixed (50.0);
+ c_outer.x = pixman_double_to_fixed (50.0);
+ c_outer.y = pixman_double_to_fixed (50.0);
+ r_inner = 0;
+ r_outer = pixman_double_to_fixed (50.0);
+
+ src_img = pixman_image_create_radial_gradient (&c_inner, &c_outer,
+ r_inner, r_outer,
+ stops, 2);
+
+#if 0
+ src_img = pixman_image_create_linear_gradient (&p1, &p2,
+ stops, 2);
+
+#endif
+ pixman_image_set_transform (src_img, &trans);
+
+ pixman_image_composite (PIXMAN_OP_OVER, src_img, NULL, dest_img,
+ 0, 0, 0, 0, 0, 0, WIDTH, HEIGHT);
+
+ printf ("0, 0: %x\n", dest[0]);
+ printf ("10, 10: %x\n", dest[10 * 10 + 10]);
+ printf ("w, h: %x\n", dest[(HEIGHT - 1) * 100 + (WIDTH - 1)]);
+
+ show_window (dest, WIDTH, HEIGHT, WIDTH);
+
+ pixman_image_unref (src_img);
+ pixman_image_unref (dest_img);
+ free (dest);
+
+ return 0;
+}
diff --git a/pixman/test/region-test.c b/pixman/test/region-test.c
new file mode 100644
index 000000000..e214e9b89
--- /dev/null
+++ b/pixman/test/region-test.c
@@ -0,0 +1,23 @@
+#include <assert.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include "pixman.h"
+
+/* This used to go into an infinite loop before pixman-region.c
+ * was fixed to not use explict "short" variables
+ */
+int
+main ()
+{
+ pixman_region32_t r1;
+ pixman_region32_t r2;
+ pixman_region32_t r3;
+
+ pixman_region32_init_rect (&r1, 0, 0, 20, 64000);
+ pixman_region32_init_rect (&r2, 0, 0, 20, 64000);
+ pixman_region32_init_rect (&r3, 0, 0, 20, 64000);
+
+ pixman_region32_subtract (&r1, &r2, &r3);
+
+}
+