aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/kdrive/fake
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/hw/kdrive/fake')
-rw-r--r--xorg-server/hw/kdrive/fake/fake.c84
-rw-r--r--xorg-server/hw/kdrive/fake/fake.h4
-rw-r--r--xorg-server/hw/kdrive/fake/fakeinit.c4
3 files changed, 43 insertions, 49 deletions
diff --git a/xorg-server/hw/kdrive/fake/fake.c b/xorg-server/hw/kdrive/fake/fake.c
index ea88f0edb..809e309a6 100644
--- a/xorg-server/hw/kdrive/fake/fake.c
+++ b/xorg-server/hw/kdrive/fake/fake.c
@@ -69,45 +69,45 @@ fakeScreenInitialize (KdScreenInfo *screen, FakeScrPriv *scrpriv)
if (screen->height <= 0)
screen->height = 1;
- if (!screen->fb[0].depth)
- screen->fb[0].depth = 16;
+ if (!screen->fb.depth)
+ screen->fb.depth = 16;
- if (screen->fb[0].depth <= 8)
+ if (screen->fb.depth <= 8)
{
- screen->fb[0].visuals = ((1 << StaticGray) |
- (1 << GrayScale) |
- (1 << StaticColor) |
- (1 << PseudoColor) |
- (1 << TrueColor) |
- (1 << DirectColor));
+ screen->fb.visuals = ((1 << StaticGray) |
+ (1 << GrayScale) |
+ (1 << StaticColor) |
+ (1 << PseudoColor) |
+ (1 << TrueColor) |
+ (1 << DirectColor));
}
else
{
- screen->fb[0].visuals = (1 << TrueColor);
+ screen->fb.visuals = (1 << TrueColor);
#define Mask(o,l) (((1 << l) - 1) << o)
- if (screen->fb[0].depth <= 15)
+ if (screen->fb.depth <= 15)
{
- screen->fb[0].depth = 15;
- screen->fb[0].bitsPerPixel = 16;
- screen->fb[0].redMask = Mask (10, 5);
- screen->fb[0].greenMask = Mask (5, 5);
- screen->fb[0].blueMask = Mask (0, 5);
+ screen->fb.depth = 15;
+ screen->fb.bitsPerPixel = 16;
+ screen->fb.redMask = Mask (10, 5);
+ screen->fb.greenMask = Mask (5, 5);
+ screen->fb.blueMask = Mask (0, 5);
}
- else if (screen->fb[0].depth <= 16)
+ else if (screen->fb.depth <= 16)
{
- screen->fb[0].depth = 16;
- screen->fb[0].bitsPerPixel = 16;
- screen->fb[0].redMask = Mask (11, 5);
- screen->fb[0].greenMask = Mask (5, 6);
- screen->fb[0].blueMask = Mask (0, 5);
+ screen->fb.depth = 16;
+ screen->fb.bitsPerPixel = 16;
+ screen->fb.redMask = Mask (11, 5);
+ screen->fb.greenMask = Mask (5, 6);
+ screen->fb.blueMask = Mask (0, 5);
}
else
{
- screen->fb[0].depth = 24;
- screen->fb[0].bitsPerPixel = 32;
- screen->fb[0].redMask = Mask (16, 8);
- screen->fb[0].greenMask = Mask (8, 8);
- screen->fb[0].blueMask = Mask (0, 8);
+ screen->fb.depth = 24;
+ screen->fb.bitsPerPixel = 32;
+ screen->fb.redMask = Mask (16, 8);
+ screen->fb.greenMask = Mask (8, 8);
+ screen->fb.blueMask = Mask (0, 8);
}
}
@@ -167,26 +167,22 @@ fakeMapFramebuffer (KdScreenInfo *screen)
KdSetPointerMatrix (&m);
- priv->bytes_per_line = ((screen->width * screen->fb[0].bitsPerPixel + 31) >> 5) << 2;
+ priv->bytes_per_line = ((screen->width * screen->fb.bitsPerPixel + 31) >> 5) << 2;
if (priv->base)
free (priv->base);
priv->base = malloc (priv->bytes_per_line * screen->height);
- screen->memory_base = (CARD8 *) (priv->base);
- screen->memory_size = 0;
- screen->off_screen_base = 0;
if (scrpriv->shadow)
{
- if (!KdShadowFbAlloc (screen, 0,
- scrpriv->randr & (RR_Rotate_90|RR_Rotate_270)))
+ if (!KdShadowFbAlloc (screen, scrpriv->randr & (RR_Rotate_90|RR_Rotate_270)))
return FALSE;
}
else
{
- screen->fb[0].byteStride = priv->bytes_per_line;
- screen->fb[0].pixelStride = (priv->bytes_per_line * 8/
- screen->fb[0].bitsPerPixel);
- screen->fb[0].frameBuffer = (CARD8 *) (priv->base);
+ screen->fb.byteStride = priv->bytes_per_line;
+ screen->fb.pixelStride = (priv->bytes_per_line * 8/
+ screen->fb.bitsPerPixel);
+ screen->fb.frameBuffer = (CARD8 *) (priv->base);
}
return TRUE;
@@ -219,7 +215,7 @@ Bool
fakeUnmapFramebuffer (KdScreenInfo *screen)
{
FakePriv *priv = screen->card->driver;
- KdShadowFbFree (screen, 0);
+ KdShadowFbFree (screen);
if (priv->base)
{
free (priv->base);
@@ -341,10 +337,10 @@ fakeRandRSetConfig (ScreenPtr pScreen,
(*pScreen->ModifyPixmapHeader) (fbGetScreenPixmap (pScreen),
pScreen->width,
pScreen->height,
- screen->fb[0].depth,
- screen->fb[0].bitsPerPixel,
- screen->fb[0].byteStride,
- screen->fb[0].frameBuffer);
+ screen->fb.depth,
+ screen->fb.bitsPerPixel,
+ screen->fb.byteStride,
+ screen->fb.frameBuffer);
/* set the subpixel order */
@@ -463,7 +459,7 @@ fakeCardFini (KdCardInfo *card)
}
void
-fakeGetColors (ScreenPtr pScreen, int fb, int n, xColorItem *pdefs)
+fakeGetColors (ScreenPtr pScreen, int n, xColorItem *pdefs)
{
while (n--)
{
@@ -475,6 +471,6 @@ fakeGetColors (ScreenPtr pScreen, int fb, int n, xColorItem *pdefs)
}
void
-fakePutColors (ScreenPtr pScreen, int fb, int n, xColorItem *pdefs)
+fakePutColors (ScreenPtr pScreen, int n, xColorItem *pdefs)
{
}
diff --git a/xorg-server/hw/kdrive/fake/fake.h b/xorg-server/hw/kdrive/fake/fake.h
index 3c4a51bbc..d5058606a 100644
--- a/xorg-server/hw/kdrive/fake/fake.h
+++ b/xorg-server/hw/kdrive/fake/fake.h
@@ -85,10 +85,10 @@ void
fakeCardFini (KdCardInfo *card);
void
-fakeGetColors (ScreenPtr pScreen, int fb, int n, xColorItem *pdefs);
+fakeGetColors (ScreenPtr pScreen, int n, xColorItem *pdefs);
void
-fakePutColors (ScreenPtr pScreen, int fb, int n, xColorItem *pdefs);
+fakePutColors (ScreenPtr pScreen, int n, xColorItem *pdefs);
Bool
fakeMapFramebuffer (KdScreenInfo *screen);
diff --git a/xorg-server/hw/kdrive/fake/fakeinit.c b/xorg-server/hw/kdrive/fake/fakeinit.c
index 0472a7183..87c221d37 100644
--- a/xorg-server/hw/kdrive/fake/fakeinit.c
+++ b/xorg-server/hw/kdrive/fake/fakeinit.c
@@ -28,9 +28,7 @@
void
InitCard (char *name)
{
- KdCardAttr attr;
-
- KdCardInfoAdd (&fakeFuncs, &attr, 0);
+ KdCardInfoAdd (&fakeFuncs, 0);
}
void