pixmap: make PixmapDirtyCopyArea public
PixmapDirtyCopyArea() is about to be used outside of pixmap.c, so fix up its interface by specifying the dirty area directly rather than passing a `PixmapDirtyUpdatePtr`. This makes it easier to use outside of pixmap.c, as the caller doesn't need to create a bulky PixmapDirtyUpdateRec to use this function. Signed-off-by: Sultan Alsawaf <sultan@kerneltoast.com>
This commit is contained in:
parent
bb1711b7fb
commit
08183c66e8
15
dix/pixmap.c
15
dix/pixmap.c
|
@ -262,12 +262,11 @@ PixmapStopDirtyTracking(DrawablePtr src, PixmapPtr secondary_dst)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
void
|
||||||
PixmapDirtyCopyArea(PixmapPtr dst,
|
PixmapDirtyCopyArea(PixmapPtr dst, DrawablePtr src,
|
||||||
PixmapDirtyUpdatePtr dirty,
|
int x, int y, int dst_x, int dst_y,
|
||||||
RegionPtr dirty_region)
|
RegionPtr dirty_region)
|
||||||
{
|
{
|
||||||
DrawablePtr src = dirty->src;
|
|
||||||
ScreenPtr pScreen = src->pScreen;
|
ScreenPtr pScreen = src->pScreen;
|
||||||
int n;
|
int n;
|
||||||
BoxPtr b;
|
BoxPtr b;
|
||||||
|
@ -294,9 +293,8 @@ PixmapDirtyCopyArea(PixmapPtr dst,
|
||||||
h = dst_box.y2 - dst_box.y1;
|
h = dst_box.y2 - dst_box.y1;
|
||||||
|
|
||||||
pGC->ops->CopyArea(src, &dst->drawable, pGC,
|
pGC->ops->CopyArea(src, &dst->drawable, pGC,
|
||||||
dirty->x + dst_box.x1, dirty->y + dst_box.y1, w, h,
|
x + dst_box.x1, y + dst_box.y1, w, h,
|
||||||
dirty->dst_x + dst_box.x1,
|
dst_x + dst_box.x1, dst_y + dst_box.y1);
|
||||||
dirty->dst_y + dst_box.y1);
|
|
||||||
b++;
|
b++;
|
||||||
}
|
}
|
||||||
FreeScratchGC(pGC);
|
FreeScratchGC(pGC);
|
||||||
|
@ -408,7 +406,8 @@ Bool PixmapSyncDirtyHelper(PixmapDirtyUpdatePtr dirty)
|
||||||
RegionTranslate(&pixregion, -dirty->x, -dirty->y);
|
RegionTranslate(&pixregion, -dirty->x, -dirty->y);
|
||||||
|
|
||||||
if (!pScreen->root || dirty->rotation == RR_Rotate_0)
|
if (!pScreen->root || dirty->rotation == RR_Rotate_0)
|
||||||
PixmapDirtyCopyArea(dst, dirty, &pixregion);
|
PixmapDirtyCopyArea(dst, dirty->src, dirty->x, dirty->y,
|
||||||
|
dirty->dst_x, dirty->dst_y, &pixregion);
|
||||||
else
|
else
|
||||||
PixmapDirtyCompositeRotate(dst, dirty, &pixregion);
|
PixmapDirtyCompositeRotate(dst, dirty, &pixregion);
|
||||||
pScreen->SourceValidate = SourceValidate;
|
pScreen->SourceValidate = SourceValidate;
|
||||||
|
|
|
@ -134,4 +134,9 @@ PixmapStopDirtyTracking(DrawablePtr src, PixmapPtr slave_dst);
|
||||||
extern _X_EXPORT Bool
|
extern _X_EXPORT Bool
|
||||||
PixmapSyncDirtyHelper(PixmapDirtyUpdatePtr dirty);
|
PixmapSyncDirtyHelper(PixmapDirtyUpdatePtr dirty);
|
||||||
|
|
||||||
|
extern _X_EXPORT void
|
||||||
|
PixmapDirtyCopyArea(PixmapPtr dst, DrawablePtr src,
|
||||||
|
int x, int y, int dst_x, int dst_y,
|
||||||
|
RegionPtr dirty_region);
|
||||||
|
|
||||||
#endif /* PIXMAP_H */
|
#endif /* PIXMAP_H */
|
||||||
|
|
Loading…
Reference in New Issue