summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Airlie <airlied@linux.ie>2006-01-18 06:49:17 +0000
committerDave Airlie <airlied@linux.ie>2006-01-18 06:49:17 +0000
commit8ccf4f2b8fdb5e57d2ec5f2d54731fbf83fb9d8c (patch)
treee0c6fe80697a2ca19486ece390735d48085fc84a
parenta1f9262c6acd195c0fcf5f602d5ca0c252993521 (diff)
This is a fix from David Reveman from the xserver tree, Make fbPadPixmap
work with negative stride
-rw-r--r--ChangeLog8
-rw-r--r--fb/fbgc.c11
2 files changed, 16 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 8e753f66f..f6919d6a2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2006-01-18 Dave Airlie <airlied@linux.ie>
+
+ reviewed by: keithp, ajax, anholt (well they all read it...)
+
+ * fb/fbgc.c: (fbPadPixmap):
+ This is a fix from David Reveman from the xserver tree,
+ Make fbPadPixmap work with negative stride
+
Thu Jan 12 17:09:18 2006 Søren Sandmann <sandmann@redhat.com>
* include/window.[ch]: Add new functions to enable and disable
diff --git a/fb/fbgc.c b/fb/fbgc.c
index 4c581a630..5a0d0bcb3 100644
--- a/fb/fbgc.c
+++ b/fb/fbgc.c
@@ -21,7 +21,7 @@
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $XdotOrg: xc/programs/Xserver/fb/fbgc.c,v 1.3 2004/12/04 00:42:50 kuhn Exp $ */
+/* $XdotOrg: xserver/xorg/fb/fbgc.c,v 1.5 2005/07/03 07:01:23 daniels Exp $ */
/* $XFree86: xc/programs/Xserver/fb/fbgc.c,v 1.14 2003/12/18 15:22:32 alanh Exp $ */
#ifdef HAVE_DIX_CONFIG_H
@@ -101,9 +101,13 @@ fbPadPixmap (PixmapPtr pPixmap)
FbBits mask;
int height;
int w;
+ int stride;
+ int bpp;
+ int xOff, yOff;
+
+ fbGetDrawable (&pPixmap->drawable, bits, stride, bpp, xOff, yOff);
width = pPixmap->drawable.width * pPixmap->drawable.bitsPerPixel;
- bits = pPixmap->devPrivate.ptr;
height = pPixmap->drawable.height;
mask = FbBitsMask (0, width);
while (height--)
@@ -115,7 +119,8 @@ fbPadPixmap (PixmapPtr pPixmap)
b = b | FbScrRight(b, w);
w <<= 1;
}
- *bits++ = b;
+ *bits = b;
+ bits += stride;
}
}