aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/kdrive/src/kshadow.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2010-01-08 13:59:32 +0000
committermarha <marha@users.sourceforge.net>2010-01-08 13:59:32 +0000
commit1ae1f3dee798a8468a415eaa8f1da78e9d3fbae8 (patch)
tree5ff2d27dc0c94b02beedeb4551f677691e606352 /xorg-server/hw/kdrive/src/kshadow.c
parentd5ac51b006c039894e4e35102a8e182d21a52efc (diff)
parent91a30d5622174febaa2107b010effcf2fb5b9a2e (diff)
downloadvcxsrv-1ae1f3dee798a8468a415eaa8f1da78e9d3fbae8.tar.gz
vcxsrv-1ae1f3dee798a8468a415eaa8f1da78e9d3fbae8.tar.bz2
vcxsrv-1ae1f3dee798a8468a415eaa8f1da78e9d3fbae8.zip
svn merge ^/branches/released
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;
}