diff -ur xorg-server-1.15.0/fb/fbseg.c xorg-server-1.15.0-fix-fbBres/fb/fbseg.c --- xorg-server-1.15.0/fb/fbseg.c 2013-12-15 00:48:08.000000000 -0700 +++ xorg-server-1.15.0-fix-fbBres/fb/fbseg.c 2014-06-13 23:29:32.993019058 -0600 @@ -65,12 +65,6 @@ 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,23 @@ mask = mask0; } e += e1; + if (e >= 0) { + if (bits) { + 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 +99,6 @@ mask = mask0; } } - WRITE(dst, FbDoMaskRRop(READ(dst), and, xor, mask)); - dst += dstStride; - e += e1; } }