aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/kdrive/src/kshadow.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2010-01-08 13:17:02 +0000
committermarha <marha@users.sourceforge.net>2010-01-08 13:17:02 +0000
commit91a30d5622174febaa2107b010effcf2fb5b9a2e (patch)
treebef04beb0812925c8d343813b26be65073a53c3f /xorg-server/hw/kdrive/src/kshadow.c
parent20f59c125afe31a8bdb0ae6a74dd408e5fa00237 (diff)
downloadvcxsrv-91a30d5622174febaa2107b010effcf2fb5b9a2e.tar.gz
vcxsrv-91a30d5622174febaa2107b010effcf2fb5b9a2e.tar.bz2
vcxsrv-91a30d5622174febaa2107b010effcf2fb5b9a2e.zip
Git update 8 jan 2010
Diffstat (limited to 'xorg-server/hw/kdrive/src/kshadow.c')
-rw-r--r--xorg-server/hw/kdrive/src/kshadow.c34
1 files changed, 16 insertions, 18 deletions
diff --git a/xorg-server/hw/kdrive/src/kshadow.c b/xorg-server/hw/kdrive/src/kshadow.c
index ea44812db..cf3391dba 100644
--- a/xorg-server/hw/kdrive/src/kshadow.c
+++ b/xorg-server/hw/kdrive/src/kshadow.c
@@ -26,36 +26,36 @@
#include "kdrive.h"
Bool
-KdShadowFbAlloc (KdScreenInfo *screen, int fb, 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[fb].bitsPerPixel;
+ int bpp = screen->fb.bitsPerPixel;
/* use fb computation for width */
paddedWidth = ((width * bpp + FB_MASK) >> FB_SHIFT) * sizeof (FbBits);
buf = xalloc (paddedWidth * height);
if (!buf)
return FALSE;
- if (screen->fb[fb].shadow)
- xfree (screen->fb[fb].frameBuffer);
- screen->fb[fb].shadow = TRUE;
- screen->fb[fb].frameBuffer = buf;
- screen->fb[fb].byteStride = paddedWidth;
- screen->fb[fb].pixelStride = paddedWidth * 8 / bpp;
+ if (screen->fb.shadow)
+ xfree (screen->fb.frameBuffer);
+ screen->fb.shadow = TRUE;
+ screen->fb.frameBuffer = buf;
+ screen->fb.byteStride = paddedWidth;
+ screen->fb.pixelStride = paddedWidth * 8 / bpp;
return TRUE;
}
void
-KdShadowFbFree (KdScreenInfo *screen, int fb)
+KdShadowFbFree (KdScreenInfo *screen)
{
- if (screen->fb[fb].shadow)
+ if (screen->fb.shadow)
{
- xfree (screen->fb[fb].frameBuffer);
- screen->fb[fb].frameBuffer = 0;
- screen->fb[fb].shadow = FALSE;
+ xfree (screen->fb.frameBuffer);
+ screen->fb.frameBuffer = 0;
+ screen->fb.shadow = FALSE;
}
}
@@ -64,14 +64,12 @@ KdShadowSet (ScreenPtr pScreen, int randr, ShadowUpdateProc update, ShadowWindow
{
KdScreenPriv(pScreen);
KdScreenInfo *screen = pScreenPriv->screen;
- int fb;
shadowRemove (pScreen, pScreen->GetScreenPixmap(pScreen));
- for (fb = 0; fb < KD_MAX_FB && screen->fb[fb].depth; fb++)
+ if(screen->fb.shadow)
{
- if (screen->fb[fb].shadow)
- return shadowAdd (pScreen, pScreen->GetScreenPixmap(pScreen),
- update, window, randr, 0);
+ return shadowAdd (pScreen, pScreen->GetScreenPixmap(pScreen),
+ update, window, randr, 0);
}
return TRUE;
}