2 * Copyright © 1998 Keith Packard
4 * Permission to use, copy, modify, distribute, and sell this software and its
5 * documentation for any purpose is hereby granted without fee, provided that
6 * the above copyright notice appear in all copies and that both that
7 * copyright notice and this permission notice appear in supporting
8 * documentation, and that the name of Keith Packard not be used in
9 * advertising or publicity pertaining to distribution of the software without
10 * specific, written prior permission. Keith Packard makes no
11 * representations about the suitability of this software for any purpose. It
12 * is provided "as is" without express or implied warranty.
14 * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
15 * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
16 * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
17 * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
18 * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
19 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
20 * PERFORMANCE OF THIS SOFTWARE.
23 #ifdef HAVE_DIX_CONFIG_H
24 #include <dix-config.h>
30 fbPushPattern (DrawablePtr pDrawable
,
43 FbStip
*s
, bitsMask
, bitsMask0
, bits
;
48 src
+= srcX
>> FB_STIP_SHIFT
;
51 bitsMask0
= FbStipMask (srcX
, 1);
71 bitsMask
= FbStipRight (bitsMask
, 1);
75 bitsMask
= FbBitsMask(0,1);
77 } while (bits
& bitsMask
);
78 fbFill (pDrawable
, pGC
, xspan
, y
, lenspan
, 1);
90 bitsMask
= FbStipRight (bitsMask
, 1);
94 bitsMask
= FbBitsMask(0,1);
96 } while (!(bits
& bitsMask
));
104 fbPushFill (DrawablePtr pDrawable
,
116 FbGCPrivPtr pPriv
= fbGetGCPrivate(pGC
);
118 if (pGC
->fillStyle
== FillSolid
)
123 int dstXoff
, dstYoff
;
127 fbGetDrawable (pDrawable
, dst
, dstStride
, dstBpp
, dstXoff
, dstYoff
);
128 dst
= dst
+ (y
+ dstYoff
) * dstStride
;
129 dstX
= (x
+ dstXoff
) * dstBpp
;
130 dstWidth
= width
* dstBpp
;
138 FbBitsStrideToStipStride (dstStride
),
144 FbStipple1Rop(pGC
->alu
,pGC
->fgPixel
),
162 pPriv
->and, pPriv
->xor,
163 fbAnd(GXnoop
,(FbBits
) 0,FB_ALLONES
),
164 fbXor(GXnoop
,(FbBits
) 0,FB_ALLONES
));
166 fbFinishAccess (pDrawable
);
170 fbPushPattern (pDrawable
, pGC
, src
, srcStride
, srcX
,
171 x
, y
, width
, height
);
176 fbPushImage (DrawablePtr pDrawable
,
188 RegionPtr pClip
= fbGetCompositeClip (pGC
);
193 for (nbox
= REGION_NUM_RECTS (pClip
),
194 pbox
= REGION_RECTS(pClip
);
210 if (x1
>= x2
|| y1
>= y2
)
212 fbPushFill (pDrawable
,
215 src
+ (y1
- y
) * srcStride
,
227 fbPushPixels (GCPtr pGC
,
229 DrawablePtr pDrawable
,
238 int stipXoff
, stipYoff
; /* Assumed to be zero */
240 fbGetStipDrawable (&pBitmap
->drawable
, stip
, stipStride
, stipBpp
, stipXoff
, stipYoff
);
242 fbPushImage (pDrawable
, pGC
,