aboutsummaryrefslogtreecommitdiff
path: root/pixman/pixman/pixman-edge-imp.h
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2010-02-27 16:02:46 +0000
committermarha <marha@users.sourceforge.net>2010-02-27 16:02:46 +0000
commit65fbbe1531c1e09cd40014374fdd93cff3a1d33a (patch)
tree98646568c7171fb4d51b0043b29d52f57c358ea4 /pixman/pixman/pixman-edge-imp.h
parent1ab2f9be54d01fc145e8f25d2e35a59636a2c0bf (diff)
downloadvcxsrv-65fbbe1531c1e09cd40014374fdd93cff3a1d33a.tar.gz
vcxsrv-65fbbe1531c1e09cd40014374fdd93cff3a1d33a.tar.bz2
vcxsrv-65fbbe1531c1e09cd40014374fdd93cff3a1d33a.zip
Updated to pixman-0.17.8
Diffstat (limited to 'pixman/pixman/pixman-edge-imp.h')
-rw-r--r--pixman/pixman/pixman-edge-imp.h20
1 files changed, 8 insertions, 12 deletions
diff --git a/pixman/pixman/pixman-edge-imp.h b/pixman/pixman/pixman-edge-imp.h
index a30f82108..a4698eddb 100644
--- a/pixman/pixman/pixman-edge-imp.h
+++ b/pixman/pixman/pixman-edge-imp.h
@@ -49,10 +49,14 @@ RASTERIZE_EDGES (pixman_image_t *image,
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 RENDER_SAMPLES_X) */
- lx += X_FRAC_FIRST(1);
- rx += X_FRAC_FIRST(1);
+ * sampling just slightly to the left of the pixel. This is so that
+ * when the sample point lies exactly on the line, we round towards
+ * north-west.
+ *
+ * (The AA case does a similar adjustment in RENDER_SAMPLES_X)
+ */
+ lx += X_FRAC_FIRST(1) - pixman_fixed_e;
+ rx += X_FRAC_FIRST(1) - pixman_fixed_e;
#endif
/* clip X */
if (lx < 0)
@@ -79,14 +83,6 @@ RASTERIZE_EDGES (pixman_image_t *image,
#if N_BITS == 1
{
-#ifdef WORDS_BIGENDIAN
-# define SCREEN_SHIFT_LEFT(x,n) ((x) << (n))
-# define SCREEN_SHIFT_RIGHT(x,n) ((x) >> (n))
-#else
-# define SCREEN_SHIFT_LEFT(x,n) ((x) >> (n))
-# define SCREEN_SHIFT_RIGHT(x,n) ((x) << (n))
-#endif
-
#define LEFT_MASK(x) \
(((x) & 0x1f) ? \
SCREEN_SHIFT_RIGHT (0xffffffff, (x) & 0x1f) : 0)