Imported Debian patch 2:1.15.1-0ubuntu2.6
[deb_xorg-server.git] / debian / patches / 06_Revert-fb-reorder-Bresenham-error-correction-to-avoi.diff
diff --git a/debian/patches/06_Revert-fb-reorder-Bresenham-error-correction-to-avoi.diff b/debian/patches/06_Revert-fb-reorder-Bresenham-error-correction-to-avoi.diff
new file mode 100644 (file)
index 0000000..c3a6e50
--- /dev/null
@@ -0,0 +1,68 @@
+From 10aaa5d2ffa62df99f03c857dc78e6ff2b33c183 Mon Sep 17 00:00:00 2001
+From: Julien Cristau <jcristau@debian.org>
+Date: Sun, 30 Sep 2012 12:02:11 +0200
+Subject: [PATCH] Revert "fb: reorder Bresenham error correction to avoid
+ overshoot."
+
+This reverts commit 3e62f48edf47a59d923ac58b6d4262b02456a556.
+
+Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=54168
+Debian: http://buss.debian.org/688908
+
+Signed-off-by: Julien Cristau <jcristau@debian.org>
+---
+ fb/fbseg.c |   18 +++++++++---------
+ 1 file changed, 9 insertions(+), 9 deletions(-)
+
+diff --git a/fb/fbseg.c b/fb/fbseg.c
+index 1848387..0e4e0a9 100644
+--- a/fb/fbseg.c
++++ b/fb/fbseg.c
+@@ -65,12 +65,6 @@ fbBresSolid(DrawablePtr pDrawable,
+     if (axis == X_AXIS) {
+         bits = 0;
+         while (len--) {
+-            if (e >= 0) {
+-                WRITE(dst, FbDoMaskRRop (READ(dst), and, xor, bits));
+-                bits = 0;
+-                dst += dstStride;
+-                e += e3;
+-            }
+             bits |= mask;
+             mask = fbBresShiftMask(mask, signdx, dstBpp);
+             if (!mask) {
+@@ -80,12 +74,21 @@ fbBresSolid(DrawablePtr pDrawable,
+                 mask = mask0;
+             }
+             e += e1;
++            if (e >= 0) {
++                WRITE(dst, FbDoMaskRRop(READ(dst), and, xor, bits));
++                bits = 0;
++                dst += dstStride;
++                e += e3;
++            }
+         }
+         if (bits)
+             WRITE(dst, FbDoMaskRRop(READ(dst), and, xor, bits));
+     }
+     else {
+         while (len--) {
++            WRITE(dst, FbDoMaskRRop(READ(dst), and, xor, mask));
++            dst += dstStride;
++            e += e1;
+             if (e >= 0) {
+                 e += e3;
+                 mask = fbBresShiftMask(mask, signdx, dstBpp);
+@@ -94,9 +97,6 @@ fbBresSolid(DrawablePtr pDrawable,
+                     mask = mask0;
+                 }
+             }
+-            WRITE(dst, FbDoMaskRRop(READ(dst), and, xor, mask));
+-            dst += dstStride;
+-            e += e1;
+         }
+     }
+-- 
+1.7.10.4
+