本文整理汇总了C++中ScreenPtr::GetImage方法的典型用法代码示例。如果您正苦于以下问题:C++ ScreenPtr::GetImage方法的具体用法?C++ ScreenPtr::GetImage怎么用?C++ ScreenPtr::GetImage使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ScreenPtr
的用法示例。
在下文中一共展示了ScreenPtr::GetImage方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
static void
xf86_dga_sync(ScrnInfoPtr scrn)
{
ScreenPtr pScreen = scrn->pScreen;
WindowPtr pRoot = WindowTable [pScreen->myNum];
char buffer[4];
pScreen->GetImage (&pRoot->drawable, 0, 0, 1, 1, ZPixmap, ~0L, buffer);
}
示例2: RootlessRedisplayScreen
static void
RootlessGetImage(DrawablePtr pDrawable, int sx, int sy, int w, int h,
unsigned int format, unsigned long planeMask, char *pdstLine)
{
ScreenPtr pScreen = pDrawable->pScreen;
SCREEN_UNWRAP(pScreen, GetImage);
if (pDrawable->type == DRAWABLE_WINDOW) {
int x0, y0, x1, y1;
RootlessWindowRec *winRec;
// Many apps use GetImage to sync with the visible frame buffer
// FIXME: entire screen or just window or all screens?
RootlessRedisplayScreen(pScreen);
// RedisplayScreen stops drawing, so we need to start it again
RootlessStartDrawing((WindowPtr)pDrawable);
/* Check that we have some place to read from. */
winRec = WINREC(TopLevelParent((WindowPtr) pDrawable));
if (winRec == NULL)
goto out;
/* Clip to top-level window bounds. */
/* FIXME: fbGetImage uses the width parameter to calculate the
stride of the destination pixmap. If w is clipped, the data
returned will be garbage, although we will not crash. */
x0 = pDrawable->x + sx;
y0 = pDrawable->y + sy;
x1 = x0 + w;
y1 = y0 + h;
x0 = max (x0, winRec->x);
y0 = max (y0, winRec->y);
x1 = min (x1, winRec->x + winRec->width);
y1 = min (y1, winRec->y + winRec->height);
sx = x0 - pDrawable->x;
sy = y0 - pDrawable->y;
w = x1 - x0;
h = y1 - y0;
if (w <= 0 || h <= 0)
goto out;
}
pScreen->GetImage(pDrawable, sx, sy, w, h, format, planeMask, pdstLine);
out:
SCREEN_WRAP(pScreen, GetImage);
}
示例3: shadowBuf
static void
shadowGetImage(DrawablePtr pDrawable, int sx, int sy, int w, int h,
unsigned int format, unsigned long planeMask, char *pdstLine)
{
ScreenPtr pScreen = pDrawable->pScreen;
shadowBuf(pScreen);
/* Many apps use GetImage to sync with the visable frame buffer */
if (pDrawable->type == DRAWABLE_WINDOW)
shadowRedisplay(pScreen);
unwrap(pBuf, pScreen, GetImage);
pScreen->GetImage(pDrawable, sx, sy, w, h, format, planeMask, pdstLine);
wrap(pBuf, pScreen, GetImage);
}
示例4: exaDrawableLocation
void
ExaCheckGetImage(DrawablePtr pDrawable, int x, int y, int w, int h,
unsigned int format, unsigned long planeMask, char *d)
{
ScreenPtr pScreen = pDrawable->pScreen;
EXA_PRE_FALLBACK(pScreen);
EXA_FALLBACK(("from %p (%c)\n", pDrawable, exaDrawableLocation(pDrawable)));
ExaFallbackPrepareReg(pDrawable, NULL, x, y, w, h, EXA_PREPARE_SRC, FALSE);
swap(pExaScr, pScreen, GetImage);
pScreen->GetImage(pDrawable, x, y, w, h, format, planeMask, d);
swap(pExaScr, pScreen, GetImage);
exaFinishAccess(pDrawable, EXA_PREPARE_SRC);
EXA_POST_FALLBACK(pScreen);
}
示例5: RootlessRedisplayScreen
static void
RootlessGetImage(DrawablePtr pDrawable, int sx, int sy, int w, int h,
unsigned int format, unsigned long planeMask, char *pdstLine)
{
ScreenPtr pScreen = pDrawable->pScreen;
SCREEN_UNWRAP(pScreen, GetImage);
if (pDrawable->type == DRAWABLE_WINDOW) {
/* Many apps use GetImage to sync with the visible frame buffer */
// fixme entire screen or just window or all screens?
RootlessRedisplayScreen(pScreen);
}
pScreen->GetImage(pDrawable, sx, sy, w, h, format, planeMask, pdstLine);
SCREEN_WRAP(pScreen, GetImage);
}