aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/kdrive/src/kshadow.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-03-23 10:05:55 +0100
committermarha <marha@users.sourceforge.net>2012-03-23 10:05:55 +0100
commit0f834b91a4768673833ab4917e87d86c237bb1a6 (patch)
tree363489504ed4b2d360259b8de4c9e392918e5d02 /xorg-server/hw/kdrive/src/kshadow.c
parentfc72edebf875378459368c5383d9023730cbca54 (diff)
downloadvcxsrv-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.c43
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));
}