summaryrefslogtreecommitdiff
path: root/hw/kdrive/mach64
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2003-11-10 20:35:05 +0000
committerKeith Packard <keithp@keithp.com>2003-11-10 20:35:05 +0000
commit5dc119b73ffcae32c2d470b734dfa2f8af58e77e (patch)
treed8a45c66d90b47014bdf376ab7f80fdce23c869f /hw/kdrive/mach64
parente500986657ea8b4e14a1ff4730ecda4583c75277 (diff)
Fix KdXv interface to pass drawable down so that bits can be put into
drawable pixmap rather than directly into the frame buffer. Rewrite logic in kdoffscreen to make space for new allocations, now deals correctly with locked areas.
Diffstat (limited to 'hw/kdrive/mach64')
-rw-r--r--hw/kdrive/mach64/mach64video.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/hw/kdrive/mach64/mach64video.c b/hw/kdrive/mach64/mach64video.c
index 64e5fb795..23d671580 100644
--- a/hw/kdrive/mach64/mach64video.c
+++ b/hw/kdrive/mach64/mach64video.c
@@ -327,9 +327,8 @@ mach64CopyPlanarData(KdScreenInfo *screen,
}
static void
-mach64PaintRegion (ScreenPtr pScreen, RegionPtr pRgn, Pixel fg)
+mach64PaintRegion (DrawablePtr pDraw, RegionPtr pRgn, Pixel fg)
{
- WindowPtr pRoot = WindowTable[pScreen->myNum];
GCPtr pGC;
CARD32 val[2];
xRectangle *rects, *r;
@@ -342,15 +341,15 @@ mach64PaintRegion (ScreenPtr pScreen, RegionPtr pRgn, Pixel fg)
r = rects;
while (nBox--)
{
- r->x = pBox->x1;
- r->y = pBox->y1;
+ r->x = pBox->x1 - pDraw->x;
+ r->y = pBox->y1 - pDraw->y;
r->width = pBox->x2 - pBox->x1;
r->height = pBox->y2 - pBox->y1;
r++;
pBox++;
}
- pGC = GetScratchGC (pRoot->drawable.depth, pScreen);
+ pGC = GetScratchGC (pDraw->depth, pDraw->pScreen);
if (!pGC)
goto bail1;
@@ -358,9 +357,9 @@ mach64PaintRegion (ScreenPtr pScreen, RegionPtr pRgn, Pixel fg)
val[1] = IncludeInferiors;
ChangeGC (pGC, GCForeground|GCSubwindowMode, val);
- ValidateGC (&pRoot->drawable, pGC);
+ ValidateGC (pDraw, pGC);
- (*pGC->ops->PolyFillRect) (&pRoot->drawable, pGC,
+ (*pGC->ops->PolyFillRect) (pDraw, pGC,
REGION_NUM_RECTS (pRgn), rects);
FreeScratchGC (pGC);
@@ -571,6 +570,7 @@ mach64VideoSave (KdOffscreenArea *area)
static int
mach64PutImage(KdScreenInfo *screen,
+ DrawablePtr pDraw,
short src_x,
short src_y,
short drw_x,
@@ -778,7 +778,7 @@ mach64PutImage(KdScreenInfo *screen,
if (!REGION_EQUAL (screen->pScreen, &pPortPriv->clip, clipBoxes))
{
REGION_COPY (screen->pScreen, &pPortPriv->clip, clipBoxes);
- mach64PaintRegion (screen->pScreen, &pPortPriv->clip, pPortPriv->colorKey);
+ mach64PaintRegion (pDraw, &pPortPriv->clip, pPortPriv->colorKey);
}
pPortPriv->videoOn = TRUE;
@@ -880,6 +880,7 @@ static void mach64ResetVideo(KdScreenInfo *screen)
static int
mach64ReputImage (KdScreenInfo *screen,
+ DrawablePtr pDraw,
short drw_x,
short drw_y,
RegionPtr clipBoxes,
@@ -898,7 +899,7 @@ mach64ReputImage (KdScreenInfo *screen,
if (!REGION_EQUAL (screen->pScreen, &pPortPriv->clip, clipBoxes))
{
REGION_COPY (screen->pScreen, &pPortPriv->clip, clipBoxes);
- mach64PaintRegion (screen->pScreen, &pPortPriv->clip, pPortPriv->colorKey);
+ mach64PaintRegion (pDraw, &pPortPriv->clip, pPortPriv->colorKey);
}
return Success;
}