summaryrefslogtreecommitdiff
path: root/fb/fbgetsp.c
diff options
context:
space:
mode:
Diffstat (limited to 'fb/fbgetsp.c')
-rw-r--r--fb/fbgetsp.c73
1 files changed, 29 insertions, 44 deletions
diff --git a/fb/fbgetsp.c b/fb/fbgetsp.c
index bf9f51eb4..9a163b27e 100644
--- a/fb/fbgetsp.c
+++ b/fb/fbgetsp.c
@@ -27,59 +27,44 @@
#include "fb.h"
void
-fbGetSpans(DrawablePtr pDrawable,
- int wMax,
- DDXPointPtr ppt,
- int *pwidth,
- int nspans,
- char *pchardstStart)
+fbGetSpans(DrawablePtr pDrawable,
+ int wMax,
+ DDXPointPtr ppt, int *pwidth, int nspans, char *pchardstStart)
{
- FbBits *src, *dst;
- FbStride srcStride;
- int srcBpp;
- int srcXoff, srcYoff;
- int xoff;
-
+ FbBits *src, *dst;
+ FbStride srcStride;
+ int srcBpp;
+ int srcXoff, srcYoff;
+ int xoff;
+
/*
* XFree86 DDX empties the root borderClip when the VT is
* switched away; this checks for that case
*/
if (!fbDrawableEnabled(pDrawable))
- return;
-
- if (pDrawable->bitsPerPixel != BitsPerPixel(pDrawable->depth))
- {
- fb24_32GetSpans (pDrawable, wMax, ppt, pwidth, nspans, pchardstStart);
- return;
- }
-
- fbGetDrawable (pDrawable, src, srcStride, srcBpp, srcXoff, srcYoff);
-
- while (nspans--)
- {
- xoff = (int) (((long) pchardstStart) & (FB_MASK >> 3));
- dst = (FbBits *) (pchardstStart - xoff);
- xoff <<= 3;
- fbBlt (src + (ppt->y + srcYoff) * srcStride, srcStride,
- (ppt->x + srcXoff) * srcBpp,
-
- dst,
- 1,
- xoff,
+ return;
- *pwidth * srcBpp,
- 1,
+ if (pDrawable->bitsPerPixel != BitsPerPixel(pDrawable->depth)) {
+ fb24_32GetSpans(pDrawable, wMax, ppt, pwidth, nspans, pchardstStart);
+ return;
+ }
- GXcopy,
- FB_ALLONES,
- srcBpp,
+ fbGetDrawable(pDrawable, src, srcStride, srcBpp, srcXoff, srcYoff);
- FALSE,
- FALSE);
- pchardstStart += PixmapBytePad(*pwidth, pDrawable->depth);
- ppt++;
- pwidth++;
+ while (nspans--) {
+ xoff = (int) (((long) pchardstStart) & (FB_MASK >> 3));
+ dst = (FbBits *) (pchardstStart - xoff);
+ xoff <<= 3;
+ fbBlt(src + (ppt->y + srcYoff) * srcStride, srcStride,
+ (ppt->x + srcXoff) * srcBpp,
+ dst,
+ 1,
+ xoff,
+ *pwidth * srcBpp, 1, GXcopy, FB_ALLONES, srcBpp, FALSE, FALSE);
+ pchardstStart += PixmapBytePad(*pwidth, pDrawable->depth);
+ ppt++;
+ pwidth++;
}
- fbFinishAccess (pDrawable);
+ fbFinishAccess(pDrawable);
}