[xserver-commit] xserver/hw/kdrive/src kaa.c,1.21.2.1,1.21.2.2
Eric Anholt
xserver-commit@pdx.freedesktop.org
Sun, 28 Dec 2003 01:22:03 -0800
Committed by: anholt
Update of /cvs/xserver/xserver/hw/kdrive/src
In directory pdx:/home/anholt/xserver-dri/hw/kdrive/src
Modified Files:
Tag: dri-0-1-branch
kaa.c
Log Message:
Previous revision fixed the "pitch" variable to be the pitch in bytes
rather than pixels, as the offscreenPitch kaa private would indicate,
but failed to remove multiplication by bytes per pixel where the pitch
was used. This wasted memory.
Index: kaa.c
===================================================================
RCS file: /cvs/xserver/xserver/hw/kdrive/src/kaa.c,v
retrieving revision 1.21.2.1
retrieving revision 1.21.2.2
diff -u -d -r1.21.2.1 -r1.21.2.2
--- kaa.c 23 Dec 2003 22:29:38 -0000 1.21.2.1
+++ kaa.c 28 Dec 2003 09:22:01 -0000 1.21.2.2
@@ -127,7 +127,7 @@
pKaaPixmap->devKind = pPixmap->devKind;
pKaaPixmap->devPrivate = pPixmap->devPrivate;
- pKaaPixmap->area = KdOffscreenAlloc (pScreen, pitch * h * (bpp >> 3),
+ pKaaPixmap->area = KdOffscreenAlloc (pScreen, pitch * h,
pKaaScr->info->offscreenByteAlign,
FALSE,
kaaPixmapSave, (pointer) pPixmap);
@@ -140,7 +140,7 @@
KaaGetPixmapPriv(pPixmap)->area->offset : -1,
pPixmap->drawable.width,
pPixmap->drawable.height));
- pPixmap->devKind = pitch * (bpp >> 3);
+ pPixmap->devKind = pitch;
pPixmap->devPrivate.ptr = (pointer) ((CARD8 *) pScreenPriv->screen->memory_base + pKaaPixmap->area->offset);
pPixmap->drawable.serialNumber = NEXT_SERIAL_NUMBER;
return TRUE;