diff options
author | Eric Anholt <anholt@freebsd.org> | 2003-12-28 09:22:01 +0000 |
---|---|---|
committer | Eric Anholt <anholt@freebsd.org> | 2003-12-28 09:22:01 +0000 |
commit | e13c9f809ad0326a5965bd60836441bd28ce57d2 (patch) | |
tree | 2de0bdcb8fcefd1a4c402b3b53c582ce2e16c28d | |
parent | 4b846df995820fbe22054d6e8f991ca21d295e75 (diff) |
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.
-rw-r--r-- | hw/kdrive/src/kaa.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/kdrive/src/kaa.c b/hw/kdrive/src/kaa.c index 1a39c25e9..9de189c52 100644 --- a/hw/kdrive/src/kaa.c +++ b/hw/kdrive/src/kaa.c @@ -127,7 +127,7 @@ kaaPixmapAllocArea (PixmapPtr pPixmap) 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 @@ kaaPixmapAllocArea (PixmapPtr pPixmap) 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; |