Fix allocation size of shadow framebuffer. Use byes, not bits.

Since the shadowfb is only used for bitsPerPixel >= 8, bitsPerPixel/8
is always the correct amount of bytes. ok miod@.
This commit is contained in:
matthieu 2010-07-18 20:10:12 +00:00
parent 3ad3fc2056
commit dd67e97c72
2 changed files with 4 additions and 4 deletions

View File

@ -1,4 +1,4 @@
/* $OpenBSD: wildcatfb_driver.c,v 1.4 2010/07/18 17:49:46 matthieu Exp $ */
/* $OpenBSD: wildcatfb_driver.c,v 1.5 2010/07/18 20:10:12 matthieu Exp $ */
/*
* Copyright (c) 2009 Miodrag Vallat.
@ -685,7 +685,7 @@ WildcatFBScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
return FALSE;
fPtr->shadow = xcalloc(1, pScrn->virtualX * pScrn->virtualY *
pScrn->bitsPerPixel);
pScrn->bitsPerPixel/8);
if (!fPtr->shadow) {
xf86DrvMsg(pScrn->scrnIndex, X_ERROR,

View File

@ -1,4 +1,4 @@
/* $OpenBSD: wsfb_driver.c,v 1.21 2010/07/17 17:15:14 matthieu Exp $ */
/* $OpenBSD: wsfb_driver.c,v 1.22 2010/07/18 20:10:12 matthieu Exp $ */
/*
* Copyright (c) 2001 Matthieu Herrb
* All rights reserved.
@ -917,7 +917,7 @@ WsfbScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
if (fPtr->shadowFB) {
fPtr->shadow = xcalloc(1, pScrn->virtualX * pScrn->virtualY *
pScrn->bitsPerPixel);
pScrn->bitsPerPixel/8);
if (!fPtr->shadow) {
xf86DrvMsg(pScrn->scrnIndex, X_ERROR,