本文整理汇总了C++中ScreenPtr::SourceValidate方法的典型用法代码示例。如果您正苦于以下问题:C++ ScreenPtr::SourceValidate方法的具体用法?C++ ScreenPtr::SourceValidate怎么用?C++ ScreenPtr::SourceValidate使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ScreenPtr
的用法示例。
在下文中一共展示了ScreenPtr::SourceValidate方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ExaScreenPriv
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);
}
}
示例2:
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);
}
}
示例3: if
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);
}
}