static void ExaSrcValidate(DrawablePtr pDrawable, int x, int y, int width, int height) { ScreenPtr pScreen = pDrawable->pScreen; ExaScreenPriv(pScreen); PixmapPtr pPix = exaGetDrawablePixmap (pDrawable); BoxRec box; RegionRec reg; RegionPtr dst; int xoff, yoff; exaGetDrawableDeltas(pDrawable, pPix, &xoff, &yoff); box.x1 = x + xoff; box.y1 = y + yoff; box.x2 = box.x1 + width; box.y2 = box.y1 + height; dst = (pExaScr->srcPix == pPix) ? &pExaScr->srcReg : &pExaScr->maskReg; REGION_INIT(pScreen, ®, &box, 1); REGION_UNION(pScreen, dst, dst, ®); REGION_UNINIT(pScreen, ®); if (pExaScr->SavedSourceValidate) { swap(pExaScr, pScreen, SourceValidate); pScreen->SourceValidate(pDrawable, x, y, width, height); swap(pExaScr, pScreen, SourceValidate); } }
static void SourceValidateOnePicture(PicturePtr pPicture) { DrawablePtr pDrawable = pPicture->pDrawable; ScreenPtr pScreen; if (!pDrawable) return; pScreen = pDrawable->pScreen; if (pScreen->SourceValidate) { pScreen->SourceValidate(pDrawable, 0, 0, pDrawable->width, pDrawable->height, pPicture->subWindowMode); } }
static void ExaSrcValidate(DrawablePtr pDrawable, int x, int y, int width, int height, unsigned int subWindowMode) { ScreenPtr pScreen = pDrawable->pScreen; ExaScreenPriv(pScreen); PixmapPtr pPix = exaGetDrawablePixmap(pDrawable); BoxRec box; RegionRec reg; RegionPtr dst; int xoff, yoff; if (pExaScr->srcPix == pPix) dst = &pExaScr->srcReg; else if (pExaScr->maskPix == pPix) dst = &pExaScr->maskReg; else return; exaGetDrawableDeltas(pDrawable, pPix, &xoff, &yoff); box.x1 = x + xoff; box.y1 = y + yoff; box.x2 = box.x1 + width; box.y2 = box.y1 + height; RegionInit(®, &box, 1); RegionUnion(dst, dst, ®); RegionUninit(®); if (pExaScr->SavedSourceValidate) { swap(pExaScr, pScreen, SourceValidate); pScreen->SourceValidate(pDrawable, x, y, width, height, subWindowMode); swap(pExaScr, pScreen, SourceValidate); } }