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
1 From 10aaa5d2ffa62df99f03c857dc78e6ff2b33c183 Mon Sep 17 00:00:00 2001
2 From: Julien Cristau <jcristau@debian.org>
3 Date: Sun, 30 Sep 2012 12:02:11 +0200
4 Subject: [PATCH] Revert "fb: reorder Bresenham error correction to avoid
5 overshoot."
6
7 This reverts commit 3e62f48edf47a59d923ac58b6d4262b02456a556.
8
9 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=54168
10 Debian: http://buss.debian.org/688908
11
12 Signed-off-by: Julien Cristau <jcristau@debian.org>
13 ---
14 fb/fbseg.c | 18 +++++++++---------
15 1 file changed, 9 insertions(+), 9 deletions(-)
16
17 diff --git a/fb/fbseg.c b/fb/fbseg.c
18 index 1848387..0e4e0a9 100644
19 --- a/fb/fbseg.c
20 +++ b/fb/fbseg.c
21 @@ -65,12 +65,6 @@ fbBresSolid(DrawablePtr pDrawable,
22 if (axis == X_AXIS) {
23 bits = 0;
24 while (len--) {
25 - if (e >= 0) {
26 - WRITE(dst, FbDoMaskRRop (READ(dst), and, xor, bits));
27 - bits = 0;
28 - dst += dstStride;
29 - e += e3;
30 - }
31 bits |= mask;
32 mask = fbBresShiftMask(mask, signdx, dstBpp);
33 if (!mask) {
34 @@ -80,12 +74,21 @@ fbBresSolid(DrawablePtr pDrawable,
35 mask = mask0;
36 }
37 e += e1;
38 + if (e >= 0) {
39 + WRITE(dst, FbDoMaskRRop(READ(dst), and, xor, bits));
40 + bits = 0;
41 + dst += dstStride;
42 + e += e3;
43 + }
44 }
45 if (bits)
46 WRITE(dst, FbDoMaskRRop(READ(dst), and, xor, bits));
47 }
48 else {
49 while (len--) {
50 + WRITE(dst, FbDoMaskRRop(READ(dst), and, xor, mask));
51 + dst += dstStride;
52 + e += e1;
53 if (e >= 0) {
54 e += e3;
55 mask = fbBresShiftMask(mask, signdx, dstBpp);
56 @@ -94,9 +97,6 @@ fbBresSolid(DrawablePtr pDrawable,
57 mask = mask0;
58 }
59 }
60 - WRITE(dst, FbDoMaskRRop(READ(dst), and, xor, mask));
61 - dst += dstStride;
62 - e += e1;
63 }
64 }
65
66 --
67 1.7.10.4
68