当前位置: 首页>>代码示例>>C++>>正文


C++ ScreenPtr::SourceValidate方法代码示例

本文整理汇总了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, &reg, &box, 1);
    REGION_UNION(pScreen, dst, dst, &reg);
    REGION_UNINIT(pScreen, &reg);

    if (pExaScr->SavedSourceValidate) {
        swap(pExaScr, pScreen, SourceValidate);
        pScreen->SourceValidate(pDrawable, x, y, width, height);
        swap(pExaScr, pScreen, SourceValidate);
    }
}
开发者ID:geekmaster,项目名称:fread-ink,代码行数:35,代码来源:exa_unaccel.c

示例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);
    }
}
开发者ID:balagopalraj,项目名称:clearlinux,代码行数:16,代码来源:mipict.c

示例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(&reg, &box, 1);
    RegionUnion(dst, dst, &reg);
    RegionUninit(&reg);

    if (pExaScr->SavedSourceValidate) {
        swap(pExaScr, pScreen, SourceValidate);
        pScreen->SourceValidate(pDrawable, x, y, width, height, subWindowMode);
        swap(pExaScr, pScreen, SourceValidate);
    }
}
开发者ID:MrKepzie,项目名称:xserver,代码行数:37,代码来源:exa_unaccel.c


注:本文中的ScreenPtr::SourceValidate方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。