diff options
author | Maarten Maathuis <madman2003@gmail.com> | 2009-01-31 19:57:07 +0100 |
---|---|---|
committer | Maarten Maathuis <madman2003@gmail.com> | 2009-02-06 18:42:39 +0100 |
commit | f06bde3d4bf9a0f245dfa6c65cd98f8e0c7dfdfc (patch) | |
tree | a5cf57807e832521b045465e13b7a0356aa3c749 /exa/exa_unaccel.c | |
parent | 258fc4b106dfd7b583999f97caf4d4a7a11569b6 (diff) |
exa: create ExaCheckGetImage
Diffstat (limited to 'exa/exa_unaccel.c')
-rw-r--r-- | exa/exa_unaccel.c | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/exa/exa_unaccel.c b/exa/exa_unaccel.c index a5214976c..e0f2ae9a9 100644 --- a/exa/exa_unaccel.c +++ b/exa/exa_unaccel.c @@ -283,6 +283,36 @@ ExaCheckPushPixels (GCPtr pGC, PixmapPtr pBitmap, } void +ExaCheckGetImage(DrawablePtr pDrawable, int x, int y, int w, int h, + unsigned int format, unsigned long planeMask, char *d) +{ + BoxRec Box; + RegionRec Reg; + int xoff, yoff; + ScreenPtr pScreen = pDrawable->pScreen; + PixmapPtr pPix = exaGetDrawablePixmap (pDrawable); + ExaScreenPriv(pScreen); + + EXA_FALLBACK(("from %p (%c)\n", pDrawable, + exaDrawableLocation(pDrawable))); + + exaGetDrawableDeltas(pDrawable, pPix, &xoff, &yoff); + + Box.x1 = pDrawable->y + x + xoff; + Box.y1 = pDrawable->y + y + yoff; + Box.x2 = Box.x1 + w; + Box.y2 = Box.y1 + h; + + REGION_INIT(pScreen, &Reg, &Box, 1); + + exaPrepareAccessReg (pDrawable, EXA_PREPARE_SRC, &Reg); + swap(pExaScr, pScreen, GetImage); + pScreen->GetImage (pDrawable, x, y, w, h, format, planeMask, d); + swap(pExaScr, pScreen, GetImage); + exaFinishAccess (pDrawable, EXA_PREPARE_SRC); +} + +void ExaCheckGetSpans (DrawablePtr pDrawable, int wMax, DDXPointPtr ppt, |