diff options
author | marha <marha@users.sourceforge.net> | 2012-03-23 10:05:55 +0100 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2012-03-23 10:05:55 +0100 |
commit | 0f834b91a4768673833ab4917e87d86c237bb1a6 (patch) | |
tree | 363489504ed4b2d360259b8de4c9e392918e5d02 /xorg-server/hw/kdrive/src/kshadow.c | |
parent | fc72edebf875378459368c5383d9023730cbca54 (diff) | |
download | vcxsrv-0f834b91a4768673833ab4917e87d86c237bb1a6.tar.gz vcxsrv-0f834b91a4768673833ab4917e87d86c237bb1a6.tar.bz2 vcxsrv-0f834b91a4768673833ab4917e87d86c237bb1a6.zip |
libX11 xserver fontconfig mesa pixman xkbcomp xkeyboard-config git update
23 Mar 2012
Diffstat (limited to 'xorg-server/hw/kdrive/src/kshadow.c')
-rw-r--r-- | xorg-server/hw/kdrive/src/kshadow.c | 43 |
1 files changed, 21 insertions, 22 deletions
diff --git a/xorg-server/hw/kdrive/src/kshadow.c b/xorg-server/hw/kdrive/src/kshadow.c index 63bb87bc6..828ea19a6 100644 --- a/xorg-server/hw/kdrive/src/kshadow.c +++ b/xorg-server/hw/kdrive/src/kshadow.c @@ -26,21 +26,21 @@ #include "kdrive.h" Bool -KdShadowFbAlloc (KdScreenInfo *screen, Bool rotate) +KdShadowFbAlloc(KdScreenInfo * screen, Bool rotate) { - int paddedWidth; - void *buf; - int width = rotate ? screen->height : screen->width; - int height = rotate ? screen->width : screen->height; - int bpp = screen->fb.bitsPerPixel; + int paddedWidth; + void *buf; + int width = rotate ? screen->height : screen->width; + int height = rotate ? screen->width : screen->height; + int bpp = screen->fb.bitsPerPixel; /* use fb computation for width */ - paddedWidth = ((width * bpp + FB_MASK) >> FB_SHIFT) * sizeof (FbBits); + paddedWidth = ((width * bpp + FB_MASK) >> FB_SHIFT) * sizeof(FbBits); buf = malloc(paddedWidth * height); if (!buf) - return FALSE; + return FALSE; if (screen->fb.shadow) - free(screen->fb.frameBuffer); + free(screen->fb.frameBuffer); screen->fb.shadow = TRUE; screen->fb.frameBuffer = buf; screen->fb.byteStride = paddedWidth; @@ -49,33 +49,32 @@ KdShadowFbAlloc (KdScreenInfo *screen, Bool rotate) } void -KdShadowFbFree (KdScreenInfo *screen) +KdShadowFbFree(KdScreenInfo * screen) { - if (screen->fb.shadow) - { - free(screen->fb.frameBuffer); - screen->fb.frameBuffer = 0; - screen->fb.shadow = FALSE; + if (screen->fb.shadow) { + free(screen->fb.frameBuffer); + screen->fb.frameBuffer = 0; + screen->fb.shadow = FALSE; } } Bool -KdShadowSet (ScreenPtr pScreen, int randr, ShadowUpdateProc update, ShadowWindowProc window) +KdShadowSet(ScreenPtr pScreen, int randr, ShadowUpdateProc update, + ShadowWindowProc window) { KdScreenPriv(pScreen); KdScreenInfo *screen = pScreenPriv->screen; - shadowRemove (pScreen, pScreen->GetScreenPixmap(pScreen)); - if(screen->fb.shadow) - { - return shadowAdd (pScreen, pScreen->GetScreenPixmap(pScreen), - update, window, randr, 0); + shadowRemove(pScreen, pScreen->GetScreenPixmap(pScreen)); + if (screen->fb.shadow) { + return shadowAdd(pScreen, pScreen->GetScreenPixmap(pScreen), + update, window, randr, 0); } return TRUE; } void -KdShadowUnset (ScreenPtr pScreen) +KdShadowUnset(ScreenPtr pScreen) { shadowRemove(pScreen, pScreen->GetScreenPixmap(pScreen)); } |