diff options
Diffstat (limited to 'src/wsfb_driver.c')
-rw-r--r-- | src/wsfb_driver.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/wsfb_driver.c b/src/wsfb_driver.c index dcaa3c4..c6ad4d4 100644 --- a/src/wsfb_driver.c +++ b/src/wsfb_driver.c @@ -820,6 +820,17 @@ WsfbScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv) fPtr->fbstart = fPtr->fbmem; + if (fPtr->shadowFB) { + fPtr->shadow = xcalloc(1, pScrn->virtualX * pScrn->virtualY * + pScrn->bitsPerPixel); + + if (!fPtr->shadow) { + xf86DrvMsg(pScrn->scrnIndex, X_ERROR, + "Failed to allocate shadow framebuffer\n"); + return FALSE; + } + } + switch (pScrn->bitsPerPixel) { case 1: ret = xf1bppScreenInit(pScreen, fPtr->fbstart, |