pixman: Branch 'master' - 7 commits
Carl Worth
cworth at kemper.freedesktop.org
Tue Jan 22 16:34:46 PST 2008
.gitignore | 1
Makefile.am | 85 +++++++++++++++++++++++++++++++++++++++++++++++
RELEASING | 55 ++++++++++++++++++++++++++++++
pixman/pixman-compose.c | 4 +-
pixman/pixman-edge-imp.h | 26 +++++++++-----
pixman/pixman-edge.c | 12 +++---
pixman/pixman-private.h | 2 -
7 files changed, 168 insertions(+), 17 deletions(-)
New commits:
commit e4d482a6bb766f50f49ba81591ca7c26ba3ce047
Author: Carl Worth <cworth at cworth.org>
Date: Tue Jan 22 16:33:58 2008 -0800
A tiny amount of ifdef reduction.
Just moving two common assignments outside the condition to
drop the #else part.
diff --git a/pixman/pixman-edge-imp.h b/pixman/pixman-edge-imp.h
index 0982a46..016bfab 100644
--- a/pixman/pixman-edge-imp.h
+++ b/pixman/pixman-edge-imp.h
@@ -45,15 +45,14 @@ rasterizeEdges (pixman_image_t *image,
int lxi;
int rxi;
+ lx = l->x;
+ rx = r->x;
#if N_BITS == 1
/* For the non-antialiased case, round the coordinates up, in effect
* sampling the center of the pixel. (The AA case does a similar
* adjustment in RenderSamplesX) */
- lx = l->x + X_FRAC_FIRST(1);
- rx = r->x + X_FRAC_FIRST(1);
-#else
- lx = l->x;
- rx = r->x;
+ lx += X_FRAC_FIRST(1);
+ rx += X_FRAC_FIRST(1);
#endif
/* clip X */
if (lx < 0)
commit bcac3335893a24e1d16790cb38d8a105b1e19951
Merge: e5ceddf... 054be10...
Author: Carl Worth <cworth at cworth.org>
Date: Tue Jan 22 16:31:44 2008 -0800
Merge commit 'inte/sampling'
commit e5ceddf038d69cef74df0632f93abae37ec6d7ce
Author: Carl Worth <cworth at cworth.org>
Date: Tue Oct 30 13:03:18 2007 -0700
Ignore test/fetch-test
diff --git a/.gitignore b/.gitignore
index ec3c0b4..2c736c1 100644
--- a/.gitignore
+++ b/.gitignore
@@ -27,6 +27,7 @@ config.h
config.h.in
.*.swp
test/composite-test
+test/fetch-test
test/gradient-test
*.pdb
*.dll
commit ad773927d885515bf43d9824c1577199fccfc535
Author: Carl Worth <cworth at cworth.org>
Date: Tue Oct 30 12:52:19 2007 -0700
Add release-publish target and RELEASING instructions
diff --git a/Makefile.am b/Makefile.am
index 70035a1..e6b1a60 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -4,3 +4,88 @@ 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
+
+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_DIR = /srv/cairo.freedesktop.org/www/releases
+RELEASE_CAIRO_URL = http://cairographics.org/releases
+RELEASE_XORG_HOST = xorg.freedesktop.org
+RELEASE_XORG_DIR = /srv/xorg.freedesktop.org/archive/individual/lib
+RELEASE_ANNOUNCE_LIST = cairo-announce at cairographics.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)
+ sha1sum $^ > $@
+
+$(gpg_file): $(sha1_file)
+ @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..."
+ @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) $(sha1_file) $(gpg_file)
+
+release-check: release-verify-newer release-remove-old distcheck
+
+release-upload: release-check $(tar_gz) $(tar_bz2) $(sha1_file) $(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
+ 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)
+ @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 "============================== CUT HERE =============================="
+ @echo "A new $(PACKAGE) release $(VERSION) is now available from:"
+ @echo ""
+ @echo " $(RELEASE_CAIRO_URL)/$(tar_gz)"
+ @echo ""
+ @echo " which can be verified with:"
+ @echo ""
+ @echo " $(RELEASE_CAIRO_URL)/$(sha1_file)"
+ @echo -n " "
+ @cat releases/$(sha1_file)
+ @echo ""
+ @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 ""
+ @echo "============================== CUT HERE =============================="
+
+release-publish: release-upload release-publish-message
+
+.PHONY: release-upload release-publish release-publish-message
diff --git a/RELEASING b/RELEASING
new file mode 100644
index 0000000..c72d051
--- /dev/null
+++ b/RELEASING
@@ -0,0 +1,55 @@
+Here are the steps to follow to create a new pixman release:
+
+1) Ensure that there are no uncommitted changes or unpushed commits,
+ and that you are up to date with the latest commits in the central
+ repository. Here are a couple of useful commands:
+
+ # This should report "nothing to commit (working directory clean")
+ git status
+
+ # This should give no output, (note there are *3* dots)
+ git log master...origin
+
+2) Verify that the code passes "make distcheck".
+
+ NOTE: There is some test code in the test directory, but it's
+ not yet integrated into "make distcheck" yet. It might be
+ useful to run those programs, (but I don't know how to
+ interpret those results). Another very useful thing to do is
+ to run the cairo test suite against pixman. This can be done
+ by running the following commands with the latest cairo
+ release:
+
+ tar xzf cairo-X.Y.Z.tar.gz
+ cd cairo
+ CAIRO_TEST_TARGET=image make test
+
+3) Fill out an entry in the NEWS file
+
+ Sift through the logs since the last release. This is most
+ easily done with a command such as:
+
+ git log --stat pixman-X.Y.Z..
+
+ where X.Y.Z is the previous release version.
+
+ Summarize major changes briefly in a style similar to other
+ entries in NEWS. Take special care to note any additions in
+ the API. These should be easy to find by noting modifications
+ to pixman.h in the log command above. And more specifically,
+ the following command will show each patch that has changed the
+ public header file since the given version:
+
+ git log -p pixman-X..Z.. -- pixman/pixman.h
+
+4) Increment pixman_{major|minor|micro} in configure.ac according to
+ the directions in that file. Also note that if there is an ABI
+ change then there is further work to be done, (also described in
+ configure.in).
+
+5) Use "git commit" and "git push" to publish any changes made in steps
+ 3 and 4.
+
+6) Generate the final tar files with:
+
+ make distcheck
commit 054be107365cac5dc6cff2b6f705978f1899c79e
Author: Bertram Felgenhauer <int-e at gmx.de>
Date: Tue Jan 22 08:00:05 2008 +0100
eliminate a special case in fbRasterizeEdges{4,8}.
diff --git a/pixman/pixman-edge-imp.h b/pixman/pixman-edge-imp.h
index 9c33f94..0982a46 100644
--- a/pixman/pixman-edge-imp.h
+++ b/pixman/pixman-edge-imp.h
@@ -59,7 +59,15 @@ rasterizeEdges (pixman_image_t *image,
if (lx < 0)
lx = 0;
if (pixman_fixed_to_int (rx) >= width)
+#if N_BITS == 1
rx = pixman_int_to_fixed (width);
+#else
+ /* Use the last pixel of the scanline, covered 100%.
+ * We can't use the first pixel following the scanline,
+ * because accessing it could result in a buffer overrun.
+ */
+ rx = pixman_int_to_fixed (width) - 1;
+#endif
/* Skip empty (or backwards) sections */
if (rx > lx)
@@ -117,12 +125,7 @@ rasterizeEdges (pixman_image_t *image,
AddAlpha (N_X_FRAC(N_BITS));
StepAlpha;
}
- /* Do not add in a 0 alpha here. This check is necessary
- * to avoid a buffer overrun when rx is exactly on a pixel
- * boundary.
- */
- if (rxs != 0)
- AddAlpha (rxs);
+ AddAlpha (rxs);
}
}
#endif
diff --git a/pixman/pixman-edge.c b/pixman/pixman-edge.c
index 1ed6f10..4a9df9a 100644
--- a/pixman/pixman-edge.c
+++ b/pixman/pixman-edge.c
@@ -147,7 +147,11 @@ fbRasterizeEdges8 (pixman_image_t *image,
lx = 0;
rx = r->x;
if (pixman_fixed_to_int (rx) >= width)
- rx = pixman_int_to_fixed (width);
+ /* Use the last pixel of the scanline, covered 100%.
+ * We can't use the first pixel following the scanline,
+ * because accessing it could result in a buffer overrun.
+ */
+ rx = pixman_int_to_fixed (width) - 1;
/* Skip empty (or backwards) sections */
if (rx > lx)
@@ -235,11 +239,7 @@ fbRasterizeEdges8 (pixman_image_t *image,
add_saturate_8 (ap + lxi, N_X_FRAC(8), rxi - lxi);
}
- /* Do not add in a 0 alpha here. This check is
- * necessary to avoid a buffer overrun, (when rx
- * is exactly on a pixel boundary). */
- if (rxs)
- WRITE(image, ap + rxi, clip255 (READ(image, ap + rxi) + rxs));
+ WRITE(image, ap + rxi, clip255 (READ(image, ap + rxi) + rxs));
}
}
commit 5467807e757ad6a5ec45085c963425f9dd6d2414
Author: Bertram Felgenhauer <int-e at gmx.de>
Date: Tue Jan 22 07:57:54 2008 +0100
fix cairo's a1-traps-sample test
For 1 bit alpha targets, the left and right boundaries of edges were
not rounded correctly.
diff --git a/pixman/pixman-edge-imp.h b/pixman/pixman-edge-imp.h
index 2cf6d73..9c33f94 100644
--- a/pixman/pixman-edge-imp.h
+++ b/pixman/pixman-edge-imp.h
@@ -45,11 +45,19 @@ rasterizeEdges (pixman_image_t *image,
int lxi;
int rxi;
- /* clip X */
+#if N_BITS == 1
+ /* For the non-antialiased case, round the coordinates up, in effect
+ * sampling the center of the pixel. (The AA case does a similar
+ * adjustment in RenderSamplesX) */
+ lx = l->x + X_FRAC_FIRST(1);
+ rx = r->x + X_FRAC_FIRST(1);
+#else
lx = l->x;
+ rx = r->x;
+#endif
+ /* clip X */
if (lx < 0)
lx = 0;
- rx = r->x;
if (pixman_fixed_to_int (rx) >= width)
rx = pixman_int_to_fixed (width);
diff --git a/pixman/pixman-private.h b/pixman/pixman-private.h
index 33a9e7c..075feb6 100644
--- a/pixman/pixman-private.h
+++ b/pixman/pixman-private.h
@@ -748,7 +748,7 @@ union pixman_image
#define MAX_ALPHA(n) ((1 << (n)) - 1)
#define N_Y_FRAC(n) ((n) == 1 ? 1 : (1 << ((n)/2)) - 1)
-#define N_X_FRAC(n) ((1 << ((n)/2)) + 1)
+#define N_X_FRAC(n) ((n) == 1 ? 1 : (1 << ((n)/2)) + 1)
#define STEP_Y_SMALL(n) (pixman_fixed_1 / N_Y_FRAC(n))
#define STEP_Y_BIG(n) (pixman_fixed_1 - (N_Y_FRAC(n) - 1) * STEP_Y_SMALL(n))
commit 1d89bac5a7a5693911d8a74701bd1c0292160478
Author: Bertram Felgenhauer <int-e at gmx.de>
Date: Sat Jan 19 13:29:56 2008 +0100
fix cairo's a1-image-sample test
Move the sampling point for image surfaces very slightly so that it's in
the upper left quadrant of the pixel.
diff --git a/pixman/pixman-compose.c b/pixman/pixman-compose.c
index c3f50e2..e240850 100644
--- a/pixman/pixman-compose.c
+++ b/pixman/pixman-compose.c
@@ -3695,8 +3695,8 @@ static void fbFetchTransformed(bits_image_t * pict, int x, int y, int width, uin
stride = pict->rowstride;
/* reference point is the center of the pixel */
- v.vector[0] = pixman_int_to_fixed(x) + pixman_fixed_1 / 2;
- v.vector[1] = pixman_int_to_fixed(y) + pixman_fixed_1 / 2;
+ v.vector[0] = pixman_int_to_fixed(x) + pixman_fixed_1 / 2 - 1;
+ v.vector[1] = pixman_int_to_fixed(y) + pixman_fixed_1 / 2 - 1;
v.vector[2] = pixman_fixed_1;
/* when using convolution filters one might get here without a transform */
More information about the xorg-commit
mailing list