Lines Matching +full:fetch +full:- +full:depth

49 #include <dix-config.h>
65 /* MICOPYAREA -- public entry for the CopyArea request
84 /* non-0 if we've created a src clip */ in miCopyArea()
92 srcx = xIn + pSrcDrawable->x; in miCopyArea()
93 srcy = yIn + pSrcDrawable->y; in miCopyArea()
96 if (pDstDrawable->type == DRAWABLE_WINDOW && in miCopyArea()
97 !((WindowPtr) pDstDrawable)->realized) in miCopyArea()
101 if (pSrcDrawable->type == DRAWABLE_PIXMAP) { in miCopyArea()
104 box.x1 = pSrcDrawable->x; in miCopyArea()
105 box.y1 = pSrcDrawable->y; in miCopyArea()
106 box.x2 = pSrcDrawable->x + (int) pSrcDrawable->width; in miCopyArea()
107 box.y2 = pSrcDrawable->y + (int) pSrcDrawable->height; in miCopyArea()
113 if (pGC->subWindowMode == IncludeInferiors) { in miCopyArea()
118 prgnSrcClip = &((WindowPtr) pSrcDrawable)->clipList; in miCopyArea()
130 if (pGC->miTranslate) { in miCopyArea()
131 dstx += pDstDrawable->x; in miCopyArea()
132 dsty += pDstDrawable->y; in miCopyArea()
154 ((pGC->subWindowMode != IncludeInferiors) || in miCopyArea()
155 (pSrcDrawable->type == DRAWABLE_PIXMAP) || in miCopyArea()
156 (pDstDrawable->type == DRAWABLE_PIXMAP))) in miCopyArea()
173 for (j--; j >= xMax; j--, i++) in miCopyArea()
180 for (i = numRects - 1, j = i - 1, yMin = i, yMax = 0; in miCopyArea()
181 i >= 0; j = i - 1, yMin = i) { in miCopyArea()
185 j--; in miCopyArea()
187 for (j++; j <= yMin; j++, i--, yMax++) in miCopyArea()
195 for (i = 0, j = numRects - 1; i < numRects; i++, j--) in miCopyArea()
202 xMin = max(prect->x1, srcBox.x1); in miCopyArea()
203 xMax = min(prect->x2, srcBox.x2); in miCopyArea()
204 yMin = max(prect->y1, srcBox.y1); in miCopyArea()
205 yMax = min(prect->y2, srcBox.y2); in miCopyArea()
213 height = yMax - yMin; in miCopyArea()
214 width = xMax - xMin; in miCopyArea()
218 ppt->x = xMin; in miCopyArea()
219 ppt++->y = y++; in miCopyArea()
222 pbits = xallocarray(height, PixmapBytePad(width, pSrcDrawable->depth)); in miCopyArea()
224 (*pSrcDrawable->pScreen->GetSpans) (pSrcDrawable, width, pptFirst, in miCopyArea()
229 xMin -= (srcx - dstx); in miCopyArea()
230 y = yMin - (srcy - dsty); in miCopyArea()
232 ppt->x = xMin; in miCopyArea()
233 ppt++->y = y++; in miCopyArea()
237 (*pGC->ops->SetSpans) (pDstDrawable, pGC, (char *) pbits, pptFirst, in miCopyArea()
253 /* MIGETPLANE -- gets a bitmap representing one plane of pDraw
288 sx += pDraw->x; in miGetPlane()
289 sy += pDraw->y; in miGetPlane()
295 bitsPerPixel = pDraw->bitsPerPixel; in miGetPlane()
302 delta = (widthInBytes / (BITMAP_SCANLINE_UNIT / 8)) - in miGetPlane()
306 planeNum += (32 - bitsPerPixel); in miGetPlane()
310 for (i = h; --i >= 0; pt.y++) { in miGetPlane()
313 (*pDraw->pScreen->GetSpans) (pDraw, width, &pt, &width, 1, in miGetPlane()
319 for (j = w; --j >= 0; pt.x++) { in miGetPlane()
320 /* Fetch the next pixel */ in miGetPlane()
321 (*pDraw->pScreen->GetSpans) (pDraw, width, &pt, &width, 1, in miGetPlane()
332 bit <<= ((BITMAP_SCANLINE_UNIT - 1) - k); in miGetPlane()
339 bit <<= ((screenInfo.bitmapScanlineUnit - 1) - in miGetPlane()
358 /* MIOPQSTIPDRAWABLE -- use pbits as an opaque stipple for pDraw.
383 pPixmap = (*pDraw->pScreen->CreatePixmap) in miOpqStipDrawable()
384 (pDraw->pScreen, w + srcx, h, 1, CREATE_PIXMAP_USAGE_SCRATCH); in miOpqStipDrawable()
389 pGCT = GetScratchGC(1, pDraw->pScreen); in miOpqStipDrawable()
391 (*pDraw->pScreen->DestroyPixmap) (pPixmap); in miOpqStipDrawable()
415 (*pGCT->funcs->ChangeClip) (pGCT, CT_REGION, prgnSrcClip, 0); in miOpqStipDrawable()
421 ppt->x = 0; in miOpqStipDrawable()
422 ppt++->y = i; in miOpqStipDrawable()
426 (*pGCT->ops->SetSpans) ((DrawablePtr) pPixmap, pGCT, (char *) pbits, in miOpqStipDrawable()
432 oldfill = pGC->fillStyle; in miOpqStipDrawable()
433 pStipple = pGC->stipple; in miOpqStipDrawable()
435 pStipple->refcnt++; in miOpqStipDrawable()
436 oldOrg = pGC->patOrg; in miOpqStipDrawable()
441 gcv[2].val = dstx - srcx; in miOpqStipDrawable()
457 (*pGC->ops->PolyFillRect) (pDraw, pGC, 1, &rect); in miOpqStipDrawable()
464 (*pGCT->ops->CopyArea) ((DrawablePtr) pPixmap, (DrawablePtr) pPixmap, in miOpqStipDrawable()
470 oldfg = pGC->fgPixel; in miOpqStipDrawable()
471 gcv[0].val = pGC->bgPixel; in miOpqStipDrawable()
481 (*pGC->ops->PolyFillRect) (pDraw, pGC, 1, &rect); in miOpqStipDrawable()
485 pStipple->refcnt--; in miOpqStipDrawable()
487 gcv[1].val = pGC->fgPixel; in miOpqStipDrawable()
498 (*pGCT->funcs->ChangeClip) (pGCT, CT_NONE, NULL, 0); in miOpqStipDrawable()
500 (*pDraw->pScreen->DestroyPixmap) (pPixmap); in miOpqStipDrawable()
504 /* MICOPYPLANE -- public entry for the CopyPlane request.
524 box.x1 = srcx + pSrcDrawable->x; in miCopyPlane()
525 box.y1 = srcy + pSrcDrawable->y; in miCopyPlane()
529 if (box.x1 < pSrcDrawable->x) in miCopyPlane()
530 box.x1 = pSrcDrawable->x; in miCopyPlane()
531 if (box.y1 < pSrcDrawable->y) in miCopyPlane()
532 box.y1 = pSrcDrawable->y; in miCopyPlane()
533 if (box.x2 > pSrcDrawable->x + (int) pSrcDrawable->width) in miCopyPlane()
534 box.x2 = pSrcDrawable->x + (int) pSrcDrawable->width; in miCopyPlane()
535 if (box.y2 > pSrcDrawable->y + (int) pSrcDrawable->height) in miCopyPlane()
536 box.y2 = pSrcDrawable->y + (int) pSrcDrawable->height; in miCopyPlane()
543 if (pSrcDrawable->type != DRAWABLE_PIXMAP) { in miCopyPlane()
546 if (pGC->subWindowMode == IncludeInferiors) { in miCopyPlane()
554 &((WindowPtr) pSrcDrawable)->clipList); in miCopyPlane()
558 RegionTranslate(prgnSrc, -box.x1, -box.y1); in miCopyPlane()
563 box.x1 -= pSrcDrawable->x; in miCopyPlane()
564 box.x2 -= pSrcDrawable->x; in miCopyPlane()
565 box.y1 -= pSrcDrawable->y; in miCopyPlane()
566 box.y2 -= pSrcDrawable->y; in miCopyPlane()
567 ptile = miGetPlane(pSrcDrawable, ffs(bitPlane) - 1, in miCopyPlane()
569 box.x2 - box.x1, box.y2 - box.y1, (MiBits *) NULL); in miCopyPlane()
572 box.x2 - box.x1, box.y2 - box.y1, in miCopyPlane()
573 dstx + box.x1 - srcx, dsty + box.y1 - srcy); in miCopyPlane()
583 /* MIGETIMAGE -- public entry for the GetImage Request
603 unsigned char depth; in miGetImage() local
609 depth = pDraw->depth; in miGetImage()
611 if ((((1LL << depth) - 1) & planeMask) != (1LL << depth) - 1) { in miGetImage()
615 pGC = GetScratchGC(depth, pDraw->pScreen); in miGetImage()
618 pPixmap = (*pDraw->pScreen->CreatePixmap) in miGetImage()
619 (pDraw->pScreen, w, 1, depth, CREATE_PIXMAP_USAGE_SCRATCH); in miGetImage()
630 (*pGC->ops->FillSpans) ((DrawablePtr) pPixmap, pGC, 1, &xpt, &width, in miGetImage()
639 linelength = PixmapBytePad(w, depth); in miGetImage()
640 srcx = sx + pDraw->x; in miGetImage()
641 srcy = sy + pDraw->y; in miGetImage()
646 (*pDraw->pScreen->GetSpans) (pDraw, w, &pt, &width, 1, pDst); in miGetImage()
651 (*pGC->ops->SetSpans) ((DrawablePtr) pPixmap, pGC, pDst, in miGetImage()
653 (*pDraw->pScreen->GetSpans) ((DrawablePtr) pPixmap, w, &pt, in miGetImage()
659 (*pGC->pScreen->DestroyPixmap) (pPixmap); in miGetImage()
664 (void) miGetPlane(pDraw, ffs(planeMask) - 1, sx, sy, w, h, in miGetImage()
669 /* MIPUTIMAGE -- public entry for the PutImage request
690 miPutImage(DrawablePtr pDraw, GCPtr pGC, int depth, in miPutImage() argument
720 depth = pGC->depth; in miPutImage()
721 oldPlanemask = pGC->planemask; in miPutImage()
722 oldFg = pGC->fgPixel; in miPutImage()
723 oldBg = pGC->bgPixel; in miPutImage()
729 for (i = (unsigned long) 1 << (depth - 1); i != 0; i >>= 1, pImage += bytesPer) { in miPutImage()
734 (*pGC->ops->PutImage) (pDraw, pGC, 1, x, y, w, h, leftPad, in miPutImage()
754 if (pGC->miTranslate) { in miPutImage()
755 x += pDraw->x; in miPutImage()
756 y += pDraw->y; in miPutImage()
760 ppt->x = x; in miPutImage()
761 ppt->y = y + i; in miPutImage()
766 (*pGC->ops->SetSpans) (pDraw, pGC, (char *) pImage, pptFirst, in miPutImage()