summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2003-10-22 06:52:44 +0000
committerKeith Packard <keithp@keithp.com>2003-10-22 06:52:44 +0000
commitf2f834700118f4289bf38ceedd2acd9289b16141 (patch)
treeb2c24c17da774ca1709293fe3e1d1d8686717cc8
parent52ada03edb1367928de62050d98e61b8dc9bda48 (diff)
oops. Failed to set window offsets in kaaGetOffscreenPixmap
Initialized shadow too early; acceleration stomped damage
-rw-r--r--hw/kdrive/src/kaa.c20
-rw-r--r--hw/kdrive/vesa/vesa.c5
2 files changed, 12 insertions, 13 deletions
diff --git a/hw/kdrive/src/kaa.c b/hw/kdrive/src/kaa.c
index 652e2a898..b4891fa03 100644
--- a/hw/kdrive/src/kaa.c
+++ b/hw/kdrive/src/kaa.c
@@ -232,9 +232,6 @@ kaaPixmapUseMemory (PixmapPtr pPixmap)
static Bool
kaaDestroyPixmap (PixmapPtr pPixmap)
{
- ScreenPtr pScreen = pPixmap->drawable.pScreen;
- Bool ret;
-
if (pPixmap->refcnt == 1)
{
KaaPixmapPriv (pPixmap);
@@ -251,10 +248,7 @@ kaaDestroyPixmap (PixmapPtr pPixmap)
pPixmap->devKind = pKaaPixmap->devKind;
}
}
-
- ret = fbDestroyPixmap (pPixmap);
-
- return ret;
+ return fbDestroyPixmap (pPixmap);
}
static PixmapPtr
@@ -304,17 +298,19 @@ static PixmapPtr
kaaGetOffscreenPixmap (DrawablePtr pDrawable, int *xp, int *yp)
{
PixmapPtr pPixmap;
- int x = 0, y = 0;
+ int x, y;
if (pDrawable->type == DRAWABLE_WINDOW) {
pPixmap = (*pDrawable->pScreen->GetWindowPixmap) ((WindowPtr) pDrawable);
- if (x)
- x += pDrawable->x;
- if (y)
- y += pDrawable->y;
+ x = pDrawable->x;
+ y = pDrawable->y;
}
else
+ {
pPixmap = (PixmapPtr) pDrawable;
+ x = 0;
+ y = 0;
+ }
if (kaaPixmapIsOffscreen (pPixmap))
{
x += pPixmap->drawable.x;
diff --git a/hw/kdrive/vesa/vesa.c b/hw/kdrive/vesa/vesa.c
index 9bd7de8b2..38bf609fd 100644
--- a/hw/kdrive/vesa/vesa.c
+++ b/hw/kdrive/vesa/vesa.c
@@ -1334,7 +1334,7 @@ vesaRandRInit (ScreenPtr pScreen)
Bool
vesaInitScreen(ScreenPtr pScreen)
{
- return shadowSetup (pScreen);
+ return TRUE;
}
Bool
@@ -1344,6 +1344,9 @@ vesaFinishInitScreen (ScreenPtr pScreen)
vesaConfigureScreen (pScreen);
+ if (!shadowSetup (pScreen))
+ return FALSE;
+
pPixmap = vesaGetPixmap (pScreen);
if (!pPixmap)
return FALSE;