EXA: Remove superfluous manual damage tracking.
These should all be covered by damage wrappers.
This commit is contained in:
parent
a634c9b034
commit
aa2ed73e0e
|
@ -394,8 +394,6 @@ exaCopyNtoNTwoDir (DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable,
|
||||||
dst_off_y + pbox->y1 + i,
|
dst_off_y + pbox->y1 + i,
|
||||||
pbox->x2 - pbox->x1, 1);
|
pbox->x2 - pbox->x1, 1);
|
||||||
}
|
}
|
||||||
exaPixmapDirty(pDstPixmap, dst_off_x + pbox->x1, dst_off_y + pbox->y1,
|
|
||||||
dst_off_x + pbox->x2, dst_off_y + pbox->y2);
|
|
||||||
}
|
}
|
||||||
if (dirsetup != 0)
|
if (dirsetup != 0)
|
||||||
pExaScr->info->DoneCopy(pDstPixmap);
|
pExaScr->info->DoneCopy(pDstPixmap);
|
||||||
|
@ -421,7 +419,6 @@ exaCopyNtoN (DrawablePtr pSrcDrawable,
|
||||||
int src_off_x, src_off_y;
|
int src_off_x, src_off_y;
|
||||||
int dst_off_x, dst_off_y;
|
int dst_off_x, dst_off_y;
|
||||||
ExaMigrationRec pixmaps[2];
|
ExaMigrationRec pixmaps[2];
|
||||||
Bool fallback = FALSE;
|
|
||||||
|
|
||||||
pixmaps[0].as_dst = TRUE;
|
pixmaps[0].as_dst = TRUE;
|
||||||
pixmaps[0].as_src = FALSE;
|
pixmaps[0].as_src = FALSE;
|
||||||
|
@ -441,18 +438,18 @@ exaCopyNtoN (DrawablePtr pSrcDrawable,
|
||||||
pDstPixmap->drawable.width > pExaScr->info->maxX ||
|
pDstPixmap->drawable.width > pExaScr->info->maxX ||
|
||||||
pDstPixmap->drawable.height > pExaScr->info->maxY)
|
pDstPixmap->drawable.height > pExaScr->info->maxY)
|
||||||
{
|
{
|
||||||
fallback = TRUE;
|
goto fallback;
|
||||||
} else {
|
} else {
|
||||||
exaDoMigration (pixmaps, 2, TRUE);
|
exaDoMigration (pixmaps, 2, TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Mixed directions must be handled specially if the card is lame */
|
/* Mixed directions must be handled specially if the card is lame */
|
||||||
if (!fallback && (pExaScr->info->flags & EXA_TWO_BITBLT_DIRECTIONS) &&
|
if ((pExaScr->info->flags & EXA_TWO_BITBLT_DIRECTIONS) &&
|
||||||
reverse != upsidedown) {
|
reverse != upsidedown) {
|
||||||
if (exaCopyNtoNTwoDir(pSrcDrawable, pDstDrawable, pGC, pbox, nbox,
|
if (exaCopyNtoNTwoDir(pSrcDrawable, pDstDrawable, pGC, pbox, nbox,
|
||||||
dx, dy))
|
dx, dy))
|
||||||
return;
|
return;
|
||||||
fallback = TRUE;
|
goto fallback;
|
||||||
}
|
}
|
||||||
|
|
||||||
pSrcPixmap = exaGetDrawablePixmap (pSrcDrawable);
|
pSrcPixmap = exaGetDrawablePixmap (pSrcDrawable);
|
||||||
|
@ -461,43 +458,40 @@ exaCopyNtoN (DrawablePtr pSrcDrawable,
|
||||||
exaGetDrawableDeltas (pSrcDrawable, pSrcPixmap, &src_off_x, &src_off_y);
|
exaGetDrawableDeltas (pSrcDrawable, pSrcPixmap, &src_off_x, &src_off_y);
|
||||||
exaGetDrawableDeltas (pDstDrawable, pDstPixmap, &dst_off_x, &dst_off_y);
|
exaGetDrawableDeltas (pDstDrawable, pDstPixmap, &dst_off_x, &dst_off_y);
|
||||||
|
|
||||||
if (fallback || !exaPixmapIsOffscreen(pSrcPixmap) ||
|
if (!exaPixmapIsOffscreen(pSrcPixmap) ||
|
||||||
!exaPixmapIsOffscreen(pDstPixmap) ||
|
!exaPixmapIsOffscreen(pDstPixmap) ||
|
||||||
!(*pExaScr->info->PrepareCopy) (pSrcPixmap, pDstPixmap, reverse ? -1 : 1,
|
!(*pExaScr->info->PrepareCopy) (pSrcPixmap, pDstPixmap, reverse ? -1 : 1,
|
||||||
upsidedown ? -1 : 1,
|
upsidedown ? -1 : 1,
|
||||||
pGC ? pGC->alu : GXcopy,
|
pGC ? pGC->alu : GXcopy,
|
||||||
pGC ? pGC->planemask : FB_ALLONES)) {
|
pGC ? pGC->planemask : FB_ALLONES)) {
|
||||||
fallback = TRUE;
|
goto fallback;
|
||||||
EXA_FALLBACK(("from %p to %p (%c,%c)\n", pSrcDrawable, pDstDrawable,
|
|
||||||
exaDrawableLocation(pSrcDrawable),
|
|
||||||
exaDrawableLocation(pDstDrawable)));
|
|
||||||
exaPrepareAccessReg (pDstDrawable, EXA_PREPARE_DEST, pixmaps[0].pReg);
|
|
||||||
exaPrepareAccess (pSrcDrawable, EXA_PREPARE_SRC);
|
|
||||||
fbCopyNtoN (pSrcDrawable, pDstDrawable, pGC,
|
|
||||||
pbox, nbox, dx, dy, reverse, upsidedown,
|
|
||||||
bitplane, closure);
|
|
||||||
exaFinishAccess (pSrcDrawable, EXA_PREPARE_SRC);
|
|
||||||
exaFinishAccess (pDstDrawable, EXA_PREPARE_DEST);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
while (nbox--)
|
while (nbox--)
|
||||||
{
|
{
|
||||||
if (!fallback)
|
(*pExaScr->info->Copy) (pDstPixmap,
|
||||||
(*pExaScr->info->Copy) (pDstPixmap,
|
pbox->x1 + dx + src_off_x,
|
||||||
pbox->x1 + dx + src_off_x,
|
pbox->y1 + dy + src_off_y,
|
||||||
pbox->y1 + dy + src_off_y,
|
pbox->x1 + dst_off_x, pbox->y1 + dst_off_y,
|
||||||
pbox->x1 + dst_off_x, pbox->y1 + dst_off_y,
|
pbox->x2 - pbox->x1, pbox->y2 - pbox->y1);
|
||||||
pbox->x2 - pbox->x1, pbox->y2 - pbox->y1);
|
|
||||||
exaPixmapDirty (pDstPixmap, pbox->x1 + dst_off_x, pbox->y1 + dst_off_y,
|
|
||||||
pbox->x2 + dst_off_x, pbox->y2 + dst_off_y);
|
|
||||||
pbox++;
|
pbox++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (fallback)
|
|
||||||
return;
|
|
||||||
|
|
||||||
(*pExaScr->info->DoneCopy) (pDstPixmap);
|
(*pExaScr->info->DoneCopy) (pDstPixmap);
|
||||||
exaMarkSync (pDstDrawable->pScreen);
|
exaMarkSync (pDstDrawable->pScreen);
|
||||||
|
|
||||||
|
return;
|
||||||
|
|
||||||
|
fallback:
|
||||||
|
EXA_FALLBACK(("from %p to %p (%c,%c)\n", pSrcDrawable, pDstDrawable,
|
||||||
|
exaDrawableLocation(pSrcDrawable),
|
||||||
|
exaDrawableLocation(pDstDrawable)));
|
||||||
|
exaPrepareAccessReg (pDstDrawable, EXA_PREPARE_DEST, pixmaps[0].pReg);
|
||||||
|
exaPrepareAccess (pSrcDrawable, EXA_PREPARE_SRC);
|
||||||
|
fbCopyNtoN (pSrcDrawable, pDstDrawable, pGC, pbox, nbox, dx, dy, reverse,
|
||||||
|
upsidedown, bitplane, closure);
|
||||||
|
exaFinishAccess (pSrcDrawable, EXA_PREPARE_SRC);
|
||||||
|
exaFinishAccess (pDstDrawable, EXA_PREPARE_DEST);
|
||||||
}
|
}
|
||||||
|
|
||||||
RegionPtr
|
RegionPtr
|
||||||
|
@ -1204,12 +1198,8 @@ void
|
||||||
exaPaintWindow(WindowPtr pWin, RegionPtr pRegion, int what)
|
exaPaintWindow(WindowPtr pWin, RegionPtr pRegion, int what)
|
||||||
{
|
{
|
||||||
ExaScreenPriv (pWin->drawable.pScreen);
|
ExaScreenPriv (pWin->drawable.pScreen);
|
||||||
PixmapPtr pPixmap = exaGetDrawablePixmap((DrawablePtr)pWin);
|
|
||||||
int xoff, yoff;
|
|
||||||
BoxPtr pBox;
|
|
||||||
int nbox = REGION_NUM_RECTS(pRegion);
|
|
||||||
|
|
||||||
if (!nbox)
|
if (REGION_NIL(pRegion))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (!pExaScr->swappedOut) {
|
if (!pExaScr->swappedOut) {
|
||||||
|
@ -1230,39 +1220,27 @@ exaPaintWindow(WindowPtr pWin, RegionPtr pRegion, int what)
|
||||||
case BackgroundPixel:
|
case BackgroundPixel:
|
||||||
exaFillRegionSolid((DrawablePtr)pWin, pRegion, pWin->background.pixel,
|
exaFillRegionSolid((DrawablePtr)pWin, pRegion, pWin->background.pixel,
|
||||||
FB_ALLONES, GXcopy);
|
FB_ALLONES, GXcopy);
|
||||||
goto damage;
|
return;
|
||||||
case BackgroundPixmap:
|
case BackgroundPixmap:
|
||||||
exaFillRegionTiled((DrawablePtr)pWin, pRegion, pWin->background.pixmap,
|
exaFillRegionTiled((DrawablePtr)pWin, pRegion, pWin->background.pixmap,
|
||||||
&zeros, FB_ALLONES, GXcopy);
|
&zeros, FB_ALLONES, GXcopy);
|
||||||
goto damage;
|
return;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case PW_BORDER:
|
case PW_BORDER:
|
||||||
if (pWin->borderIsPixel) {
|
if (pWin->borderIsPixel) {
|
||||||
exaFillRegionSolid((DrawablePtr)pWin, pRegion, pWin->border.pixel,
|
exaFillRegionSolid((DrawablePtr)pWin, pRegion, pWin->border.pixel,
|
||||||
FB_ALLONES, GXcopy);
|
FB_ALLONES, GXcopy);
|
||||||
goto damage;
|
return;
|
||||||
} else {
|
} else {
|
||||||
exaFillRegionTiled((DrawablePtr)pWin, pRegion, pWin->border.pixmap,
|
exaFillRegionTiled((DrawablePtr)pWin, pRegion, pWin->border.pixmap,
|
||||||
&zeros, FB_ALLONES, GXcopy);
|
&zeros, FB_ALLONES, GXcopy);
|
||||||
goto damage;
|
return;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ExaCheckPaintWindow (pWin, pRegion, what);
|
ExaCheckPaintWindow (pWin, pRegion, what);
|
||||||
|
|
||||||
damage:
|
|
||||||
exaGetDrawableDeltas((DrawablePtr)pWin, pPixmap, &xoff, &yoff);
|
|
||||||
|
|
||||||
pBox = REGION_RECTS(pRegion);
|
|
||||||
|
|
||||||
while (nbox--)
|
|
||||||
{
|
|
||||||
exaPixmapDirty (pPixmap, pBox->x1 + xoff, pBox->y1 + yoff,
|
|
||||||
pBox->x2 + xoff, pBox->y2 + yoff);
|
|
||||||
pBox++;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -105,7 +105,6 @@ ExaCheckPutImage (DrawablePtr pDrawable, GCPtr pGC, int depth,
|
||||||
fbPutImage (pDrawable, pGC, depth, x, y, w, h, leftPad, format, bits);
|
fbPutImage (pDrawable, pGC, depth, x, y, w, h, leftPad, format, bits);
|
||||||
exaFinishAccess (pDrawable, EXA_PREPARE_DEST);
|
exaFinishAccess (pDrawable, EXA_PREPARE_DEST);
|
||||||
exaGetDrawableDeltas(pDrawable, pPixmap, &xoff, &yoff);
|
exaGetDrawableDeltas(pDrawable, pPixmap, &xoff, &yoff);
|
||||||
exaPixmapDirty(pPixmap, x + xoff, y + yoff, x + xoff + w, y + yoff + h);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
RegionPtr
|
RegionPtr
|
||||||
|
|
Loading…
Reference in New Issue