VirtualBox

source: vbox/trunk/src/VBox/Additions/x11/x11include/xorg-server-1.4.2/xaalocal.h@ 62425

最後變更 在這個檔案從62425是 43272,由 vboxsync 提交於 12 年 前

Additions/x11: more original X server headers.

  • 屬性 svn:eol-style 設為 native
檔案大小: 34.3 KB
 
1
2#ifndef _XAALOCAL_H
3#define _XAALOCAL_H
4
5/* This file is very unorganized ! */
6
7
8#include "gcstruct.h"
9#include "regionstr.h"
10#include "xf86fbman.h"
11#include "xaa.h"
12#include "mi.h"
13#ifdef RENDER
14#include "picturestr.h"
15#endif
16
17#define GCWhenForced (GCArcMode << 1)
18
19#define DO_COLOR_8x8 0x00000001
20#define DO_MONO_8x8 0x00000002
21#define DO_CACHE_BLT 0x00000003
22#define DO_COLOR_EXPAND 0x00000004
23#define DO_CACHE_EXPAND 0x00000005
24#define DO_IMAGE_WRITE 0x00000006
25#define DO_PIXMAP_COPY 0x00000007
26#define DO_SOLID 0x00000008
27
28
29typedef CARD32 * (*GlyphScanlineFuncPtr)(
30 CARD32 *base, unsigned int **glyphp, int line, int nglyph, int width
31);
32
33typedef CARD32 *(*StippleScanlineProcPtr)(CARD32*, CARD32*, int, int, int);
34
35typedef void (*RectFuncPtr) (ScrnInfoPtr, int, int, int, int, int, int,
36 XAACacheInfoPtr);
37typedef void (*TrapFuncPtr) (ScrnInfoPtr, int, int, int, int, int, int,
38 int, int, int, int, int, int,
39 XAACacheInfoPtr);
40
41
42
43typedef struct _XAAScreen {
44 CreateGCProcPtr CreateGC;
45 CloseScreenProcPtr CloseScreen;
46 GetImageProcPtr GetImage;
47 GetSpansProcPtr GetSpans;
48 PaintWindowBackgroundProcPtr PaintWindowBackground;
49 PaintWindowBorderProcPtr PaintWindowBorder;
50 CopyWindowProcPtr CopyWindow;
51 WindowExposuresProcPtr WindowExposures;
52 BSFuncRec BackingStoreFuncs;
53 CreatePixmapProcPtr CreatePixmap;
54 DestroyPixmapProcPtr DestroyPixmap;
55 ChangeWindowAttributesProcPtr ChangeWindowAttributes;
56 XAAInfoRecPtr AccelInfoRec;
57 Bool (*EnterVT)(int, int);
58 void (*LeaveVT)(int, int);
59 int (*SetDGAMode)(int, int, DGADevicePtr);
60 void (*EnableDisableFBAccess)(int, Bool);
61#ifdef RENDER
62 CompositeProcPtr Composite;
63 GlyphsProcPtr Glyphs;
64#endif
65} XAAScreenRec, *XAAScreenPtr;
66
67#define OPS_ARE_PIXMAP 0x00000001
68#define OPS_ARE_ACCEL 0x00000002
69
70typedef struct _XAAGC {
71 GCOps *wrapOps;
72 GCFuncs *wrapFuncs;
73 GCOps *XAAOps;
74 int DashLength;
75 unsigned char* DashPattern;
76 unsigned long changes;
77 unsigned long flags;
78} XAAGCRec, *XAAGCPtr;
79
80#define REDUCIBILITY_CHECKED 0x00000001
81#define REDUCIBLE_TO_8x8 0x00000002
82#define REDUCIBLE_TO_2_COLOR 0x00000004
83#define DIRTY 0x00010000
84#define OFFSCREEN 0x00020000
85#define DGA_PIXMAP 0x00040000
86#define SHARED_PIXMAP 0x00080000
87#define LOCKED_PIXMAP 0x00100000
88
89#define REDUCIBILITY_MASK \
90 (REDUCIBILITY_CHECKED | REDUCIBLE_TO_8x8 | REDUCIBLE_TO_2_COLOR)
91
92typedef struct _XAAPixmap {
93 unsigned long flags;
94 CARD32 pattern0;
95 CARD32 pattern1;
96 int fg;
97 int bg;
98 FBAreaPtr offscreenArea;
99 Bool freeData;
100} XAAPixmapRec, *XAAPixmapPtr;
101
102
103Bool
104XAACreateGC(
105 GCPtr pGC
106);
107
108Bool
109XAAInitAccel(
110 ScreenPtr pScreen,
111 XAAInfoRecPtr infoRec
112);
113
114RegionPtr
115XAABitBlt(
116 DrawablePtr pSrcDrawable,
117 DrawablePtr pDstDrawable,
118 GC *pGC,
119 int srcx,
120 int srcy,
121 int width,
122 int height,
123 int dstx,
124 int dsty,
125 void (*doBitBlt)(DrawablePtr, DrawablePtr, GCPtr, RegionPtr, DDXPointPtr),
126 unsigned long bitPlane
127);
128
129void
130XAAScreenToScreenBitBlt(
131 ScrnInfoPtr pScrn,
132 int nbox,
133 DDXPointPtr pptSrc,
134 BoxPtr pbox,
135 int xdir,
136 int ydir,
137 int alu,
138 unsigned int planemask
139);
140
141void
142XAADoBitBlt(
143 DrawablePtr pSrc,
144 DrawablePtr pDst,
145 GC *pGC,
146 RegionPtr prgnDst,
147 DDXPointPtr pptSrc
148);
149
150void
151XAADoImageWrite(
152 DrawablePtr pSrc,
153 DrawablePtr pDst,
154 GC *pGC,
155 RegionPtr prgnDst,
156 DDXPointPtr pptSrc
157);
158
159void
160XAADoImageRead(
161 DrawablePtr pSrc,
162 DrawablePtr pDst,
163 GC *pGC,
164 RegionPtr prgnDst,
165 DDXPointPtr pptSrc
166);
167
168void
169XAACopyWindow(
170 WindowPtr pWin,
171 DDXPointRec ptOldOrg,
172 RegionPtr prgnSrc
173);
174
175
176RegionPtr
177XAACopyArea(
178 DrawablePtr pSrcDrawable,
179 DrawablePtr pDstDrawable,
180 GC *pGC,
181 int srcx,
182 int srcy,
183 int width,
184 int height,
185 int dstx,
186 int dsty
187);
188
189void
190XAAValidateCopyArea(
191 GCPtr pGC,
192 unsigned long changes,
193 DrawablePtr pDraw
194);
195
196void
197XAAValidatePutImage(
198 GCPtr pGC,
199 unsigned long changes,
200 DrawablePtr pDraw
201);
202
203void
204XAAValidateCopyPlane(
205 GCPtr pGC,
206 unsigned long changes,
207 DrawablePtr pDraw
208);
209
210void
211XAAValidatePushPixels(
212 GCPtr pGC,
213 unsigned long changes,
214 DrawablePtr pDraw
215);
216
217void
218XAAValidateFillSpans(
219 GCPtr pGC,
220 unsigned long changes,
221 DrawablePtr pDraw
222);
223
224void
225XAAValidatePolyGlyphBlt(
226 GCPtr pGC,
227 unsigned long changes,
228 DrawablePtr pDraw
229);
230
231void
232XAAValidateImageGlyphBlt(
233 GCPtr pGC,
234 unsigned long changes,
235 DrawablePtr pDraw
236);
237
238void
239XAAValidatePolylines(
240 GCPtr pGC,
241 unsigned long changes,
242 DrawablePtr pDraw
243);
244
245
246RegionPtr
247XAACopyPlaneColorExpansion(
248 DrawablePtr pSrc,
249 DrawablePtr pDst,
250 GCPtr pGC,
251 int srcx,
252 int srcy,
253 int width,
254 int height,
255 int dstx,
256 int dsty,
257 unsigned long bitPlane
258);
259
260
261void
262XAAPushPixelsSolidColorExpansion(
263 GCPtr pGC,
264 PixmapPtr pBitMap,
265 DrawablePtr pDrawable,
266 int dx,
267 int dy,
268 int xOrg,
269 int yOrg
270);
271
272void
273XAAWriteBitmapColorExpandMSBFirstFixedBase (
274 ScrnInfoPtr pScrn,
275 int x, int y, int w, int h,
276 unsigned char *src,
277 int srcwidth,
278 int skipleft,
279 int fg, int bg,
280 int rop,
281 unsigned int planemask
282);
283
284void
285XAAWriteBitmapColorExpand3MSBFirstFixedBase (
286 ScrnInfoPtr pScrn,
287 int x, int y, int w, int h,
288 unsigned char *src,
289 int srcwidth,
290 int skipleft,
291 int fg, int bg,
292 int rop,
293 unsigned int planemask
294);
295
296void
297XAAWriteBitmapColorExpandMSBFirst (
298 ScrnInfoPtr pScrn,
299 int x, int y, int w, int h,
300 unsigned char *src,
301 int srcwidth,
302 int skipleft,
303 int fg, int bg,
304 int rop,
305 unsigned int planemask
306);
307
308void
309XAAWriteBitmapColorExpand3MSBFirst (
310 ScrnInfoPtr pScrn,
311 int x, int y, int w, int h,
312 unsigned char *src,
313 int srcwidth,
314 int skipleft,
315 int fg, int bg,
316 int rop,
317 unsigned int planemask
318);
319
320void
321XAAWriteBitmapColorExpandLSBFirstFixedBase (
322 ScrnInfoPtr pScrn,
323 int x, int y, int w, int h,
324 unsigned char *src,
325 int srcwidth,
326 int skipleft,
327 int fg, int bg,
328 int rop,
329 unsigned int planemask
330);
331
332void
333XAAWriteBitmapColorExpand3LSBFirstFixedBase (
334 ScrnInfoPtr pScrn,
335 int x, int y, int w, int h,
336 unsigned char *src,
337 int srcwidth,
338 int skipleft,
339 int fg, int bg,
340 int rop,
341 unsigned int planemask
342);
343
344void
345XAAWriteBitmapColorExpandLSBFirst (
346 ScrnInfoPtr pScrn,
347 int x, int y, int w, int h,
348 unsigned char *src,
349 int srcwidth,
350 int skipleft,
351 int fg, int bg,
352 int rop,
353 unsigned int planemask
354);
355
356void
357XAAWriteBitmapColorExpand3LSBFirst (
358 ScrnInfoPtr pScrn,
359 int x, int y, int w, int h,
360 unsigned char *src,
361 int srcwidth,
362 int skipleft,
363 int fg, int bg,
364 int rop,
365 unsigned int planemask
366);
367
368
369void
370XAAWriteBitmapScanlineColorExpandMSBFirst (
371 ScrnInfoPtr pScrn,
372 int x, int y, int w, int h,
373 unsigned char *src,
374 int srcwidth,
375 int skipleft,
376 int fg, int bg,
377 int rop,
378 unsigned int planemask
379);
380
381void
382XAAWriteBitmapScanlineColorExpand3MSBFirst (
383 ScrnInfoPtr pScrn,
384 int x, int y, int w, int h,
385 unsigned char *src,
386 int srcwidth,
387 int skipleft,
388 int fg, int bg,
389 int rop,
390 unsigned int planemask
391);
392
393void
394XAAWriteBitmapScanlineColorExpandMSBFirstFixedBase (
395 ScrnInfoPtr pScrn,
396 int x, int y, int w, int h,
397 unsigned char *src,
398 int srcwidth,
399 int skipleft,
400 int fg, int bg,
401 int rop,
402 unsigned int planemask
403);
404
405void
406XAAWriteBitmapScanlineColorExpand3MSBFirstFixedBase (
407 ScrnInfoPtr pScrn,
408 int x, int y, int w, int h,
409 unsigned char *src,
410 int srcwidth,
411 int skipleft,
412 int fg, int bg,
413 int rop,
414 unsigned int planemask
415);
416
417void
418XAAWriteBitmapScanlineColorExpandLSBFirst (
419 ScrnInfoPtr pScrn,
420 int x, int y, int w, int h,
421 unsigned char *src,
422 int srcwidth,
423 int skipleft,
424 int fg, int bg,
425 int rop,
426 unsigned int planemask
427);
428
429void
430XAAWriteBitmapScanlineColorExpand3LSBFirst (
431 ScrnInfoPtr pScrn,
432 int x, int y, int w, int h,
433 unsigned char *src,
434 int srcwidth,
435 int skipleft,
436 int fg, int bg,
437 int rop,
438 unsigned int planemask
439);
440
441void
442XAAWriteBitmapScanlineColorExpandLSBFirstFixedBase (
443 ScrnInfoPtr pScrn,
444 int x, int y, int w, int h,
445 unsigned char *src,
446 int srcwidth,
447 int skipleft,
448 int fg, int bg,
449 int rop,
450 unsigned int planemask
451);
452
453void
454XAAWriteBitmapScanlineColorExpand3LSBFirstFixedBase (
455 ScrnInfoPtr pScrn,
456 int x, int y, int w, int h,
457 unsigned char *src,
458 int srcwidth,
459 int skipleft,
460 int fg, int bg,
461 int rop,
462 unsigned int planemask
463);
464
465void
466XAAWritePixmap (
467 ScrnInfoPtr pScrn,
468 int x, int y, int w, int h,
469 unsigned char *src,
470 int srcwidth,
471 int rop,
472 unsigned int planemask,
473 int transparency_color,
474 int bpp, int depth
475);
476
477void
478XAAWritePixmapScanline (
479 ScrnInfoPtr pScrn,
480 int x, int y, int w, int h,
481 unsigned char *src,
482 int srcwidth,
483 int rop,
484 unsigned int planemask,
485 int transparency_color,
486 int bpp, int depth
487);
488
489typedef void (*ClipAndRenderRectsFunc)(GCPtr, int, BoxPtr, int, int);
490
491
492void
493XAAClipAndRenderRects(
494 GCPtr pGC,
495 ClipAndRenderRectsFunc func,
496 int nrectFill,
497 xRectangle *prectInit,
498 int xorg, int yorg
499);
500
501
502typedef void (*ClipAndRenderSpansFunc)(GCPtr, int, DDXPointPtr, int*,
503 int, int, int);
504
505void
506XAAClipAndRenderSpans(
507 GCPtr pGC,
508 DDXPointPtr ppt,
509 int *pwidth,
510 int nspans,
511 int fSorted,
512 ClipAndRenderSpansFunc func,
513 int xorg,
514 int yorg
515);
516
517
518void
519XAAFillSolidRects(
520 ScrnInfoPtr pScrn,
521 int fg, int rop,
522 unsigned int planemask,
523 int nBox,
524 BoxPtr pBox
525);
526
527void
528XAAFillMono8x8PatternRects(
529 ScrnInfoPtr pScrn,
530 int fg, int bg, int rop,
531 unsigned int planemask,
532 int nBox,
533 BoxPtr pBox,
534 int pat0, int pat1,
535 int xorg, int yorg
536);
537
538void
539XAAFillMono8x8PatternRectsScreenOrigin(
540 ScrnInfoPtr pScrn,
541 int fg, int bg, int rop,
542 unsigned int planemask,
543 int nBox,
544 BoxPtr pBox,
545 int pat0, int pat1,
546 int xorg, int yorg
547);
548
549
550void
551XAAFillColor8x8PatternRectsScreenOrigin(
552 ScrnInfoPtr pScrn,
553 int rop,
554 unsigned int planemask,
555 int nBox,
556 BoxPtr pBox,
557 int xorigin, int yorigin,
558 XAACacheInfoPtr pCache
559);
560
561void
562XAAFillColor8x8PatternRects(
563 ScrnInfoPtr pScrn,
564 int rop,
565 unsigned int planemask,
566 int nBox,
567 BoxPtr pBox,
568 int xorigin, int yorigin,
569 XAACacheInfoPtr pCache
570);
571
572void
573XAAFillCacheBltRects(
574 ScrnInfoPtr pScrn,
575 int rop,
576 unsigned int planemask,
577 int nBox,
578 BoxPtr pBox,
579 int xorg, int yorg,
580 XAACacheInfoPtr pCache
581);
582
583void
584XAAFillCacheExpandRects(
585 ScrnInfoPtr pScrn,
586 int fg, int bg, int rop,
587 unsigned int planemask,
588 int nBox,
589 BoxPtr pBox,
590 int xorg, int yorg,
591 PixmapPtr pPix
592);
593
594void
595XAAFillImageWriteRects(
596 ScrnInfoPtr pScrn,
597 int rop,
598 unsigned int planemask,
599 int nBox,
600 BoxPtr pBox,
601 int xorg, int yorg,
602 PixmapPtr pPix
603);
604
605void
606XAAPolyFillRect(
607 DrawablePtr pDraw,
608 GCPtr pGC,
609 int nrectFill,
610 xRectangle *prectInit
611);
612
613
614void
615XAATEGlyphRendererMSBFirstFixedBase (
616 ScrnInfoPtr pScrn,
617 int x, int y, int w, int h, int skipleft, int startline,
618 unsigned int **glyphs, int glyphWidth,
619 int fg, int bg, int rop, unsigned planemask
620);
621
622void
623XAATEGlyphRenderer3MSBFirstFixedBase (
624 ScrnInfoPtr pScrn,
625 int x, int y, int w, int h, int skipleft, int startline,
626 unsigned int **glyphs, int glyphWidth,
627 int fg, int bg, int rop, unsigned planemask
628);
629
630void
631XAATEGlyphRendererMSBFirst (
632 ScrnInfoPtr pScrn,
633 int x, int y, int w, int h, int skipleft, int startline,
634 unsigned int **glyphs, int glyphWidth,
635 int fg, int bg, int rop, unsigned planemask
636);
637
638void
639XAATEGlyphRenderer3MSBFirst (
640 ScrnInfoPtr pScrn,
641 int x, int y, int w, int h, int skipleft, int startline,
642 unsigned int **glyphs, int glyphWidth,
643 int fg, int bg, int rop, unsigned planemask
644);
645
646void
647XAATEGlyphRendererLSBFirstFixedBase (
648 ScrnInfoPtr pScrn,
649 int x, int y, int w, int h, int skipleft, int startline,
650 unsigned int **glyphs, int glyphWidth,
651 int fg, int bg, int rop, unsigned planemask
652);
653
654
655void
656XAATEGlyphRenderer3LSBFirstFixedBase (
657 ScrnInfoPtr pScrn,
658 int x, int y, int w, int h, int skipleft, int startline,
659 unsigned int **glyphs, int glyphWidth,
660 int fg, int bg, int rop, unsigned planemask
661);
662
663void
664XAATEGlyphRendererLSBFirst (
665 ScrnInfoPtr pScrn,
666 int x, int y, int w, int h, int skipleft, int startline,
667 unsigned int **glyphs, int glyphWidth,
668 int fg, int bg, int rop, unsigned planemask
669);
670
671void
672XAATEGlyphRenderer3LSBFirst (
673 ScrnInfoPtr pScrn,
674 int x, int y, int w, int h, int skipleft, int startline,
675 unsigned int **glyphs, int glyphWidth,
676 int fg, int bg, int rop, unsigned planemask
677);
678
679
680void
681XAATEGlyphRendererScanlineMSBFirst (
682 ScrnInfoPtr pScrn,
683 int x, int y, int w, int h, int skipleft, int startline,
684 unsigned int **glyphs, int glyphWidth,
685 int fg, int bg, int rop, unsigned planemask
686);
687
688void
689XAATEGlyphRendererScanline3MSBFirst (
690 ScrnInfoPtr pScrn,
691 int x, int y, int w, int h, int skipleft, int startline,
692 unsigned int **glyphs, int glyphWidth,
693 int fg, int bg, int rop, unsigned planemask
694);
695
696void
697XAATEGlyphRendererScanlineLSBFirst (
698 ScrnInfoPtr pScrn,
699 int x, int y, int w, int h, int skipleft, int startline,
700 unsigned int **glyphs, int glyphWidth,
701 int fg, int bg, int rop, unsigned planemask
702);
703
704void
705XAATEGlyphRendererScanline3LSBFirst (
706 ScrnInfoPtr pScrn,
707 int x, int y, int w, int h, int skipleft, int startline,
708 unsigned int **glyphs, int glyphWidth,
709 int fg, int bg, int rop, unsigned planemask
710);
711
712
713extern CARD32 *(*XAAGlyphScanlineFuncMSBFirstFixedBase[32])(
714 CARD32 *base, unsigned int **glyphp, int line, int nglyph, int width
715);
716
717extern CARD32 *(*XAAGlyphScanlineFuncMSBFirst[32])(
718 CARD32 *base, unsigned int **glyphp, int line, int nglyph, int width
719);
720
721extern CARD32 *(*XAAGlyphScanlineFuncLSBFirstFixedBase[32])(
722 CARD32 *base, unsigned int **glyphp, int line, int nglyph, int width
723);
724
725extern CARD32 *(*XAAGlyphScanlineFuncLSBFirst[32])(
726 CARD32 *base, unsigned int **glyphp, int line, int nglyph, int width
727);
728
729GlyphScanlineFuncPtr *XAAGetGlyphScanlineFuncMSBFirstFixedBase(void);
730GlyphScanlineFuncPtr *XAAGetGlyphScanlineFuncMSBFirst(void);
731GlyphScanlineFuncPtr *XAAGetGlyphScanlineFuncLSBFirstFixedBase(void);
732GlyphScanlineFuncPtr *XAAGetGlyphScanlineFuncLSBFirst(void);
733
734void
735XAAFillColorExpandRectsLSBFirst(
736 ScrnInfoPtr pScrn,
737 int fg, int bg, int rop,
738 unsigned int planemask,
739 int nBox,
740 BoxPtr pBox,
741 int xorg, int yorg,
742 PixmapPtr pPix
743);
744
745void
746XAAFillColorExpandRects3LSBFirst(
747 ScrnInfoPtr pScrn,
748 int fg, int bg, int rop,
749 unsigned int planemask,
750 int nBox,
751 BoxPtr pBox,
752 int xorg, int yorg,
753 PixmapPtr pPix
754);
755
756void
757XAAFillColorExpandRectsLSBFirstFixedBase(
758 ScrnInfoPtr pScrn,
759 int fg, int bg, int rop,
760 unsigned int planemask,
761 int nBox,
762 BoxPtr pBox,
763 int xorg, int yorg,
764 PixmapPtr pPix
765);
766
767void
768XAAFillColorExpandRects3LSBFirstFixedBase(
769 ScrnInfoPtr pScrn,
770 int fg, int bg, int rop,
771 unsigned int planemask,
772 int nBox,
773 BoxPtr pBox,
774 int xorg, int yorg,
775 PixmapPtr pPix
776);
777
778void
779XAAFillColorExpandRectsMSBFirst(
780 ScrnInfoPtr pScrn,
781 int fg, int bg, int rop,
782 unsigned int planemask,
783 int nBox,
784 BoxPtr pBox,
785 int xorg, int yorg,
786 PixmapPtr pPix
787);
788
789void
790XAAFillColorExpandRects3MSBFirst(
791 ScrnInfoPtr pScrn,
792 int fg, int bg, int rop,
793 unsigned int planemask,
794 int nBox,
795 BoxPtr pBox,
796 int xorg, int yorg,
797 PixmapPtr pPix
798);
799
800void
801XAAFillColorExpandRectsMSBFirstFixedBase(
802 ScrnInfoPtr pScrn,
803 int fg, int bg, int rop,
804 unsigned int planemask,
805 int nBox,
806 BoxPtr pBox,
807 int xorg, int yorg,
808 PixmapPtr pPix
809);
810
811void
812XAAFillColorExpandRects3MSBFirstFixedBase(
813 ScrnInfoPtr pScrn,
814 int fg, int bg, int rop,
815 unsigned int planemask,
816 int nBox,
817 BoxPtr pBox,
818 int xorg, int yorg,
819 PixmapPtr pPix
820);
821
822void
823XAAFillScanlineColorExpandRectsLSBFirst(
824 ScrnInfoPtr pScrn,
825 int fg, int bg, int rop,
826 unsigned int planemask,
827 int nBox,
828 BoxPtr pBox,
829 int xorg, int yorg,
830 PixmapPtr pPix
831);
832
833void
834XAAFillScanlineColorExpandRects3LSBFirst(
835 ScrnInfoPtr pScrn,
836 int fg, int bg, int rop,
837 unsigned int planemask,
838 int nBox,
839 BoxPtr pBox,
840 int xorg, int yorg,
841 PixmapPtr pPix
842);
843
844void
845XAAFillScanlineColorExpandRectsMSBFirst(
846 ScrnInfoPtr pScrn,
847 int fg, int bg, int rop,
848 unsigned int planemask,
849 int nBox,
850 BoxPtr pBox,
851 int xorg, int yorg,
852 PixmapPtr pPix
853);
854
855void
856XAAFillScanlineColorExpandRects3MSBFirst(
857 ScrnInfoPtr pScrn,
858 int fg, int bg, int rop,
859 unsigned int planemask,
860 int nBox,
861 BoxPtr pBox,
862 int xorg, int yorg,
863 PixmapPtr pPix
864);
865
866void
867XAAFillColorExpandSpansLSBFirst(
868 ScrnInfoPtr pScrn,
869 int fg, int bg, int rop,
870 unsigned int planemask,
871 int n,
872 DDXPointPtr ppt,
873 int *pwidth,
874 int fSorted,
875 int xorg, int yorg,
876 PixmapPtr pPix
877);
878
879void
880XAAFillColorExpandSpans3LSBFirst(
881 ScrnInfoPtr pScrn,
882 int fg, int bg, int rop,
883 unsigned int planemask,
884 int n,
885 DDXPointPtr ppt,
886 int *pwidth,
887 int fSorted,
888 int xorg, int yorg,
889 PixmapPtr pPix
890);
891
892void
893XAAFillColorExpandSpansLSBFirstFixedBase(
894 ScrnInfoPtr pScrn,
895 int fg, int bg, int rop,
896 unsigned int planemask,
897 int n,
898 DDXPointPtr ppt,
899 int *pwidth,
900 int fSorted,
901 int xorg, int yorg,
902 PixmapPtr pPix
903);
904
905void
906XAAFillColorExpandSpans3LSBFirstFixedBase(
907 ScrnInfoPtr pScrn,
908 int fg, int bg, int rop,
909 unsigned int planemask,
910 int n,
911 DDXPointPtr ppt,
912 int *pwidth,
913 int fSorted,
914 int xorg, int yorg,
915 PixmapPtr pPix
916);
917
918void
919XAAFillColorExpandSpansMSBFirst(
920 ScrnInfoPtr pScrn,
921 int fg, int bg, int rop,
922 unsigned int planemask,
923 int n,
924 DDXPointPtr ppt,
925 int *pwidth,
926 int fSorted,
927 int xorg, int yorg,
928 PixmapPtr pPix
929);
930
931void
932XAAFillColorExpandSpans3MSBFirst(
933 ScrnInfoPtr pScrn,
934 int fg, int bg, int rop,
935 unsigned int planemask,
936 int n,
937 DDXPointPtr ppt,
938 int *pwidth,
939 int fSorted,
940 int xorg, int yorg,
941 PixmapPtr pPix
942);
943
944void
945XAAFillColorExpandSpansMSBFirstFixedBase(
946 ScrnInfoPtr pScrn,
947 int fg, int bg, int rop,
948 unsigned int planemask,
949 int n,
950 DDXPointPtr ppt,
951 int *pwidth,
952 int fSorted,
953 int xorg, int yorg,
954 PixmapPtr pPix
955);
956
957void
958XAAFillColorExpandSpans3MSBFirstFixedBase(
959 ScrnInfoPtr pScrn,
960 int fg, int bg, int rop,
961 unsigned int planemask,
962 int n,
963 DDXPointPtr ppt,
964 int *pwidth,
965 int fSorted,
966 int xorg, int yorg,
967 PixmapPtr pPix
968);
969
970void
971XAAFillScanlineColorExpandSpansLSBFirst(
972 ScrnInfoPtr pScrn,
973 int fg, int bg, int rop,
974 unsigned int planemask,
975 int n,
976 DDXPointPtr ppt,
977 int *pwidth,
978 int fSorted,
979 int xorg, int yorg,
980 PixmapPtr pPix
981);
982
983void
984XAAFillScanlineColorExpandSpans3LSBFirst(
985 ScrnInfoPtr pScrn,
986 int fg, int bg, int rop,
987 unsigned int planemask,
988 int n,
989 DDXPointPtr ppt,
990 int *pwidth,
991 int fSorted,
992 int xorg, int yorg,
993 PixmapPtr pPix
994);
995
996void
997XAAPutImage(
998 DrawablePtr pDraw,
999 GCPtr pGC,
1000 int depth,
1001 int x,
1002 int y,
1003 int w,
1004 int h,
1005 int leftPad,
1006 int format,
1007 char *pImage
1008);
1009
1010void
1011XAAFillScanlineColorExpandSpansMSBFirst(
1012 ScrnInfoPtr pScrn,
1013 int fg, int bg, int rop,
1014 unsigned int planemask,
1015 int n,
1016 DDXPointPtr ppt,
1017 int *pwidth,
1018 int fSorted,
1019 int xorg, int yorg,
1020 PixmapPtr pPix
1021);
1022
1023void
1024XAAFillScanlineColorExpandSpans3MSBFirst(
1025 ScrnInfoPtr pScrn,
1026 int fg, int bg, int rop,
1027 unsigned int planemask,
1028 int n,
1029 DDXPointPtr ppt,
1030 int *pwidth,
1031 int fSorted,
1032 int xorg, int yorg,
1033 PixmapPtr pPix
1034);
1035
1036
1037extern CARD32 *(*XAAStippleScanlineFuncMSBFirstFixedBase[6])(
1038 CARD32* base, CARD32* src, int offset, int width, int dwords
1039);
1040
1041extern CARD32 *(*XAAStippleScanlineFuncMSBFirst[6])(
1042 CARD32* base, CARD32* src, int offset, int width, int dwords
1043);
1044
1045extern CARD32 *(*XAAStippleScanlineFuncLSBFirstFixedBase[6])(
1046 CARD32* base, CARD32* src, int offset, int width, int dwords
1047);
1048
1049extern CARD32 *(*XAAStippleScanlineFuncLSBFirst[6])(
1050 CARD32* base, CARD32* src, int offset, int width, int dwords
1051);
1052
1053StippleScanlineProcPtr *XAAGetStippleScanlineFuncMSBFirstFixedBase(void);
1054StippleScanlineProcPtr *XAAGetStippleScanlineFuncMSBFirst(void);
1055StippleScanlineProcPtr *XAAGetStippleScanlineFuncLSBFirstFixedBase(void);
1056StippleScanlineProcPtr *XAAGetStippleScanlineFuncLSBFirst(void);
1057
1058int
1059XAAPolyText8TEColorExpansion(
1060 DrawablePtr pDraw,
1061 GCPtr pGC,
1062 int x, int y,
1063 int count,
1064 char *chars
1065);
1066
1067int
1068XAAPolyText16TEColorExpansion(
1069 DrawablePtr pDraw,
1070 GCPtr pGC,
1071 int x, int y,
1072 int count,
1073 unsigned short *chars
1074);
1075
1076void
1077XAAImageText8TEColorExpansion(
1078 DrawablePtr pDraw,
1079 GCPtr pGC,
1080 int x, int y,
1081 int count,
1082 char *chars
1083);
1084
1085void
1086XAAImageText16TEColorExpansion(
1087 DrawablePtr pDraw,
1088 GCPtr pGC,
1089 int x, int y,
1090 int count,
1091 unsigned short *chars
1092);
1093
1094void
1095XAAImageGlyphBltTEColorExpansion(
1096 DrawablePtr pDrawable,
1097 GCPtr pGC,
1098 int xInit, int yInit,
1099 unsigned int nglyph,
1100 CharInfoPtr *ppci,
1101 pointer pglyphBase
1102);
1103
1104void
1105XAAPolyGlyphBltTEColorExpansion(
1106 DrawablePtr pDrawable,
1107 GCPtr pGC,
1108 int xInit, int yInit,
1109 unsigned int nglyph,
1110 CharInfoPtr *ppci,
1111 pointer pglyphBase
1112);
1113
1114
1115int
1116XAAPolyText8NonTEColorExpansion(
1117 DrawablePtr pDraw,
1118 GCPtr pGC,
1119 int x, int y,
1120 int count,
1121 char *chars
1122);
1123
1124int
1125XAAPolyText16NonTEColorExpansion(
1126 DrawablePtr pDraw,
1127 GCPtr pGC,
1128 int x, int y,
1129 int count,
1130 unsigned short *chars
1131);
1132
1133void
1134XAAImageText8NonTEColorExpansion(
1135 DrawablePtr pDraw,
1136 GCPtr pGC,
1137 int x, int y,
1138 int count,
1139 char *chars
1140);
1141
1142void
1143XAAImageText16NonTEColorExpansion(
1144 DrawablePtr pDraw,
1145 GCPtr pGC,
1146 int x, int y,
1147 int count,
1148 unsigned short *chars
1149);
1150
1151void
1152XAAImageGlyphBltNonTEColorExpansion(
1153 DrawablePtr pDrawable,
1154 GCPtr pGC,
1155 int xInit, int yInit,
1156 unsigned int nglyph,
1157 CharInfoPtr *ppci,
1158 pointer pglyphBase
1159);
1160
1161void
1162XAAPolyGlyphBltNonTEColorExpansion(
1163 DrawablePtr pDrawable,
1164 GCPtr pGC,
1165 int xInit, int yInit,
1166 unsigned int nglyph,
1167 CharInfoPtr *ppci,
1168 pointer pglyphBase
1169);
1170
1171
1172void XAANonTEGlyphRenderer(
1173 ScrnInfoPtr pScrn,
1174 int x, int y, int n,
1175 NonTEGlyphPtr glyphs,
1176 BoxPtr pbox,
1177 int fg, int rop,
1178 unsigned int planemask
1179);
1180
1181void
1182XAAFillSolidSpans(
1183 ScrnInfoPtr pScrn,
1184 int fg, int rop,
1185 unsigned int planemask,
1186 int n,
1187 DDXPointPtr ppt,
1188 int *pwidth, int fSorted
1189);
1190
1191void
1192XAAFillMono8x8PatternSpans(
1193 ScrnInfoPtr pScrn,
1194 int fg, int bg, int rop,
1195 unsigned int planemask,
1196 int n,
1197 DDXPointPtr ppt,
1198 int *pwidth, int fSorted,
1199 int patx, int paty,
1200 int xorg, int yorg
1201);
1202
1203void
1204XAAFillMono8x8PatternSpansScreenOrigin(
1205 ScrnInfoPtr pScrn,
1206 int fg, int bg, int rop,
1207 unsigned int planemask,
1208 int n,
1209 DDXPointPtr ppt,
1210 int *pwidth, int fSorted,
1211 int patx, int paty,
1212 int xorg, int yorg
1213);
1214
1215void
1216XAAFillColor8x8PatternSpansScreenOrigin(
1217 ScrnInfoPtr pScrn,
1218 int rop,
1219 unsigned int planemask,
1220 int n,
1221 DDXPointPtr ppt,
1222 int *pwidth, int fSorted,
1223 XAACacheInfoPtr,
1224 int xorigin, int yorigin
1225);
1226
1227void
1228XAAFillColor8x8PatternSpans(
1229 ScrnInfoPtr pScrn,
1230 int rop,
1231 unsigned int planemask,
1232 int n,
1233 DDXPointPtr ppt,
1234 int *pwidth, int fSorted,
1235 XAACacheInfoPtr,
1236 int xorigin, int yorigin
1237);
1238
1239void
1240XAAFillCacheBltSpans(
1241 ScrnInfoPtr pScrn,
1242 int rop,
1243 unsigned int planemask,
1244 int n,
1245 DDXPointPtr points,
1246 int *widths,
1247 int fSorted,
1248 XAACacheInfoPtr pCache,
1249 int xorg, int yorg
1250);
1251
1252void
1253XAAFillCacheExpandSpans(
1254 ScrnInfoPtr pScrn,
1255 int fg, int bg, int rop,
1256 unsigned int planemask,
1257 int n,
1258 DDXPointPtr ppt,
1259 int *pwidth,
1260 int fSorted,
1261 int xorg, int yorg,
1262 PixmapPtr pPix
1263);
1264
1265void
1266XAAFillSpans(
1267 DrawablePtr pDrawable,
1268 GC *pGC,
1269 int nInit,
1270 DDXPointPtr pptInit,
1271 int *pwidth,
1272 int fSorted
1273);
1274
1275
1276void
1277XAAInitPixmapCache(
1278 ScreenPtr pScreen,
1279 RegionPtr areas,
1280 pointer data
1281);
1282
1283void
1284XAAWriteBitmapToCache(
1285 ScrnInfoPtr pScrn,
1286 int x, int y, int w, int h,
1287 unsigned char *src,
1288 int srcwidth,
1289 int fg, int bg
1290);
1291
1292void
1293XAAWriteBitmapToCacheLinear(
1294 ScrnInfoPtr pScrn,
1295 int x, int y, int w, int h,
1296 unsigned char *src,
1297 int srcwidth,
1298 int fg, int bg
1299);
1300
1301void
1302XAAWritePixmapToCache(
1303 ScrnInfoPtr pScrn,
1304 int x, int y, int w, int h,
1305 unsigned char *src,
1306 int srcwidth,
1307 int bpp, int depth
1308);
1309
1310void
1311XAAWritePixmapToCacheLinear(
1312 ScrnInfoPtr pScrn,
1313 int x, int y, int w, int h,
1314 unsigned char *src,
1315 int srcwidth,
1316 int bpp, int depth
1317);
1318
1319
1320void
1321XAAPaintWindow(
1322 WindowPtr pWin,
1323 RegionPtr prgn,
1324 int what
1325);
1326
1327void
1328XAASolidHorVertLineAsRects(
1329 ScrnInfoPtr pScrn,
1330 int x, int y, int len, int dir
1331);
1332
1333void
1334XAASolidHorVertLineAsTwoPoint(
1335 ScrnInfoPtr pScrn,
1336 int x, int y, int len, int dir
1337);
1338
1339void
1340XAASolidHorVertLineAsBresenham(
1341 ScrnInfoPtr pScrn,
1342 int x, int y, int len, int dir
1343);
1344
1345
1346void
1347XAAPolyRectangleThinSolid(
1348 DrawablePtr pDrawable,
1349 GCPtr pGC,
1350 int nRectsInit,
1351 xRectangle *pRectsInit
1352);
1353
1354
1355void
1356XAAPolylinesWideSolid (
1357 DrawablePtr pDrawable,
1358 GCPtr pGC,
1359 int mode,
1360 int npt,
1361 DDXPointPtr pPts
1362);
1363
1364void
1365XAAFillPolygonSolid(
1366 DrawablePtr pDrawable,
1367 GCPtr pGC,
1368 int shape,
1369 int mode,
1370 int count,
1371 DDXPointPtr ptsIn
1372);
1373
1374void
1375XAAFillPolygonStippled(
1376 DrawablePtr pDrawable,
1377 GCPtr pGC,
1378 int shape,
1379 int mode,
1380 int count,
1381 DDXPointPtr ptsIn
1382);
1383
1384
1385void
1386XAAFillPolygonTiled(
1387 DrawablePtr pDrawable,
1388 GCPtr pGC,
1389 int shape,
1390 int mode,
1391 int count,
1392 DDXPointPtr ptsIn
1393);
1394
1395
1396int
1397XAAIsEasyPolygon(
1398 DDXPointPtr ptsIn,
1399 int count,
1400 BoxPtr extents,
1401 int origin,
1402 DDXPointPtr *topPoint,
1403 int *topY, int *bottomY,
1404 int shape
1405);
1406
1407void
1408XAAFillPolygonHelper(
1409 ScrnInfoPtr pScrn,
1410 DDXPointPtr ptsIn,
1411 int count,
1412 DDXPointPtr topPoint,
1413 int y,
1414 int maxy,
1415 int origin,
1416 RectFuncPtr RectFunc,
1417 TrapFuncPtr TrapFunc,
1418 int xorg,
1419 int yorg,
1420 XAACacheInfoPtr pCache
1421);
1422
1423void
1424XAAPolySegment(
1425 DrawablePtr pDrawable,
1426 GCPtr pGC,
1427 int nseg,
1428 xSegment *pSeg
1429);
1430
1431void
1432XAAPolyLines(
1433 DrawablePtr pDrawable,
1434 GCPtr pGC,
1435 int mode,
1436 int npt,
1437 DDXPointPtr pptInit
1438);
1439
1440void
1441XAAPolySegmentDashed(
1442 DrawablePtr pDrawable,
1443 GCPtr pGC,
1444 int nseg,
1445 xSegment *pSeg
1446);
1447
1448void
1449XAAPolyLinesDashed(
1450 DrawablePtr pDrawable,
1451 GCPtr pGC,
1452 int mode,
1453 int npt,
1454 DDXPointPtr pptInit
1455);
1456
1457
1458void
1459XAAWriteMono8x8PatternToCache(ScrnInfoPtr pScrn, XAACacheInfoPtr pCache);
1460
1461void
1462XAAWriteColor8x8PatternToCache(
1463 ScrnInfoPtr pScrn,
1464 PixmapPtr pPix,
1465 XAACacheInfoPtr pCache
1466);
1467
1468void
1469XAARotateMonoPattern(
1470 int *pat0, int *pat1,
1471 int xoffset, int yoffset,
1472 Bool msbfirst
1473);
1474
1475void XAAComputeDash(GCPtr pGC);
1476
1477void XAAMoveDWORDS_FixedBase(
1478 register CARD32* dest,
1479 register CARD32* src,
1480 register int dwords
1481);
1482
1483void XAAMoveDWORDS_FixedSrc(
1484 register CARD32* dest,
1485 register CARD32* src,
1486 register int dwords
1487);
1488
1489void XAAMoveDWORDS(
1490 register CARD32* dest,
1491 register CARD32* src,
1492 register int dwords
1493);
1494
1495int
1496XAAGetRectClipBoxes(
1497 GCPtr pGC,
1498 BoxPtr pboxClippedBase,
1499 int nrectFill,
1500 xRectangle *prectInit
1501);
1502
1503void
1504XAASetupOverlay8_32Planar(ScreenPtr);
1505
1506void
1507XAAPolyFillArcSolid(DrawablePtr pDraw, GCPtr pGC, int narcs, xArc *parcs);
1508
1509XAACacheInfoPtr
1510XAACacheTile(ScrnInfoPtr Scrn, PixmapPtr pPix);
1511
1512XAACacheInfoPtr
1513XAACacheMonoStipple(ScrnInfoPtr Scrn, PixmapPtr pPix);
1514
1515XAACacheInfoPtr
1516XAACachePlanarMonoStipple(ScrnInfoPtr Scrn, PixmapPtr pPix);
1517
1518typedef XAACacheInfoPtr (*XAACachePlanarMonoStippleProc)(ScrnInfoPtr, PixmapPtr);
1519XAACachePlanarMonoStippleProc XAAGetCachePlanarMonoStipple(void);
1520
1521XAACacheInfoPtr
1522XAACacheStipple(ScrnInfoPtr Scrn, PixmapPtr pPix, int fg, int bg);
1523
1524XAACacheInfoPtr
1525XAACacheMono8x8Pattern(ScrnInfoPtr Scrn, int pat0, int pat1);
1526
1527XAACacheInfoPtr
1528XAACacheColor8x8Pattern(ScrnInfoPtr Scrn, PixmapPtr pPix, int fg, int bg);
1529
1530void
1531XAATileCache(ScrnInfoPtr pScrn, XAACacheInfoPtr pCache, int w, int h);
1532
1533void XAAClosePixmapCache(ScreenPtr pScreen);
1534void XAAInvalidatePixmapCache(ScreenPtr pScreen);
1535
1536Bool XAACheckStippleReducibility(PixmapPtr pPixmap);
1537Bool XAACheckTileReducibility(PixmapPtr pPixmap, Bool checkMono);
1538
1539int XAAStippledFillChooser(GCPtr pGC);
1540int XAAOpaqueStippledFillChooser(GCPtr pGC);
1541int XAATiledFillChooser(GCPtr pGC);
1542
1543void XAAMoveInOffscreenPixmaps(ScreenPtr pScreen);
1544void XAAMoveOutOffscreenPixmaps(ScreenPtr pScreen);
1545void XAARemoveAreaCallback(FBAreaPtr area);
1546void XAAMoveOutOffscreenPixmap(PixmapPtr pPix);
1547Bool XAAInitStateWrap(ScreenPtr pScreen, XAAInfoRecPtr infoRec);
1548
1549#ifdef RENDER
1550void
1551XAAComposite (CARD8 op,
1552 PicturePtr pSrc,
1553 PicturePtr pMask,
1554 PicturePtr pDst,
1555 INT16 xSrc,
1556 INT16 ySrc,
1557 INT16 xMask,
1558 INT16 yMask,
1559 INT16 xDst,
1560 INT16 yDst,
1561 CARD16 width,
1562 CARD16 height);
1563
1564
1565Bool
1566XAADoComposite (CARD8 op,
1567 PicturePtr pSrc,
1568 PicturePtr pMask,
1569 PicturePtr pDst,
1570 INT16 xSrc,
1571 INT16 ySrc,
1572 INT16 xMask,
1573 INT16 yMask,
1574 INT16 xDst,
1575 INT16 yDst,
1576 CARD16 width,
1577 CARD16 height);
1578
1579
1580void
1581XAAGlyphs (CARD8 op,
1582 PicturePtr pSrc,
1583 PicturePtr pDst,
1584 PictFormatPtr maskFormat,
1585 INT16 xSrc,
1586 INT16 ySrc,
1587 int nlist,
1588 GlyphListPtr list,
1589 GlyphPtr *glyphs);
1590
1591Bool
1592XAADoGlyphs (CARD8 op,
1593 PicturePtr pSrc,
1594 PicturePtr pDst,
1595 PictFormatPtr maskFormat,
1596 INT16 xSrc,
1597 INT16 ySrc,
1598 int nlist,
1599 GlyphListPtr list,
1600 GlyphPtr *glyphs);
1601
1602
1603
1604/* helpers */
1605void
1606XAA_888_plus_PICT_a8_to_8888 (
1607 CARD32 color,
1608 CARD8 *alphaPtr, /* in bytes */
1609 int alphaPitch,
1610 CARD32 *dstPtr,
1611 int dstPitch, /* in dwords */
1612 int width,
1613 int height
1614);
1615
1616Bool
1617XAAGetRGBAFromPixel(
1618 CARD32 pixel,
1619 CARD16 *red,
1620 CARD16 *green,
1621 CARD16 *blue,
1622 CARD16 *alpha,
1623 CARD32 format
1624);
1625
1626
1627Bool
1628XAAGetPixelFromRGBA (
1629 CARD32 *pixel,
1630 CARD16 red,
1631 CARD16 green,
1632 CARD16 blue,
1633 CARD16 alpha,
1634 CARD32 format
1635);
1636
1637#endif
1638
1639/* XXX should be static */
1640extern GCOps XAAFallbackOps;
1641extern GCOps *XAAGetFallbackOps(void);
1642extern GCFuncs XAAGCFuncs;
1643extern int XAAGetScreenIndex(void);
1644extern int XAAGetGCIndex(void);
1645extern int XAAGetPixmapIndex(void);
1646
1647extern unsigned int XAAShiftMasks[32];
1648
1649extern unsigned int byte_expand3[256], byte_reversed_expand3[256];
1650
1651CARD32 XAAReverseBitOrder(CARD32 data);
1652
1653#define GET_XAASCREENPTR_FROM_SCREEN(pScreen)\
1654 (pScreen)->devPrivates[XAAGetScreenIndex()].ptr
1655
1656#define GET_XAASCREENPTR_FROM_GC(pGC)\
1657 (pGC)->pScreen->devPrivates[XAAGetScreenIndex()].ptr
1658
1659#define GET_XAASCREENPTR_FROM_DRAWABLE(pDraw)\
1660 (pDraw)->pScreen->devPrivates[XAAGetScreenIndex()].ptr
1661
1662#define GET_XAAINFORECPTR_FROM_SCREEN(pScreen)\
1663 ((XAAScreenPtr)((pScreen)->devPrivates[XAAGetScreenIndex()].ptr))->AccelInfoRec
1664
1665#define GET_XAAINFORECPTR_FROM_GC(pGC)\
1666((XAAScreenPtr)((pGC)->pScreen->devPrivates[XAAGetScreenIndex()].ptr))->AccelInfoRec
1667
1668#define GET_XAAINFORECPTR_FROM_DRAWABLE(pDraw)\
1669((XAAScreenPtr)((pDraw)->pScreen->devPrivates[XAAGetScreenIndex()].ptr))->AccelInfoRec
1670
1671#define GET_XAAINFORECPTR_FROM_SCRNINFOPTR(pScrn)\
1672((XAAScreenPtr)((pScrn)->pScreen->devPrivates[XAAGetScreenIndex()].ptr))->AccelInfoRec
1673
1674#define XAA_GET_PIXMAP_PRIVATE(pix)\
1675 (XAAPixmapPtr)((pix)->devPrivates[XAAGetPixmapIndex()].ptr)
1676
1677#define CHECK_RGB_EQUAL(c) (!((((c) >> 8) ^ (c)) & 0xffff))
1678
1679#define CHECK_FG(pGC, flags) \
1680 (!(flags & RGB_EQUAL) || CHECK_RGB_EQUAL(pGC->fgPixel))
1681
1682#define CHECK_BG(pGC, flags) \
1683 (!(flags & RGB_EQUAL) || CHECK_RGB_EQUAL(pGC->bgPixel))
1684
1685#define CHECK_ROP(pGC, flags) \
1686 (!(flags & GXCOPY_ONLY) || (pGC->alu == GXcopy))
1687
1688#define CHECK_ROPSRC(pGC, flags) \
1689 (!(flags & ROP_NEEDS_SOURCE) || ((pGC->alu != GXclear) && \
1690 (pGC->alu != GXnoop) && (pGC->alu != GXinvert) && \
1691 (pGC->alu != GXset)))
1692
1693#define CHECK_PLANEMASK(pGC, flags) \
1694 (!(flags & NO_PLANEMASK) || \
1695 ((pGC->planemask & infoRec->FullPlanemasks[pGC->depth - 1]) == \
1696 infoRec->FullPlanemasks[pGC->depth - 1]))
1697
1698#define CHECK_COLORS(pGC, flags) \
1699 (!(flags & RGB_EQUAL) || \
1700 (CHECK_RGB_EQUAL(pGC->fgPixel) && CHECK_RGB_EQUAL(pGC->bgPixel)))
1701
1702#define CHECK_NO_GXCOPY(pGC, flags) \
1703 ((pGC->alu != GXcopy) || !(flags & NO_GXCOPY) || \
1704 ((pGC->planemask & infoRec->FullPlanemask) != infoRec->FullPlanemask))
1705
1706#define IS_OFFSCREEN_PIXMAP(pPix)\
1707 ((XAA_GET_PIXMAP_PRIVATE((PixmapPtr)(pPix)))->offscreenArea)
1708
1709#define PIXMAP_IS_SHARED(pPix)\
1710 ((XAA_GET_PIXMAP_PRIVATE((PixmapPtr)(pPix)))->flags & SHARED_PIXMAP)
1711
1712#define OFFSCREEN_PIXMAP_LOCKED(pPix)\
1713 ((XAA_GET_PIXMAP_PRIVATE((PixmapPtr)(pPix)))->flags & LOCKED_PIXMAP)
1714
1715#define XAA_DEPTH_BUG(pGC) \
1716 ((pGC->depth == 32) && (pGC->bgPixel == 0xffffffff))
1717
1718#define DELIST_OFFSCREEN_PIXMAP(pPix) { \
1719 PixmapLinkPtr _pLink, _prev; \
1720 _pLink = infoRec->OffscreenPixmaps; \
1721 _prev = NULL; \
1722 while(_pLink) { \
1723 if(_pLink->pPix == pPix) { \
1724 if(_prev) _prev->next = _pLink->next; \
1725 else infoRec->OffscreenPixmaps = _pLink->next; \
1726 xfree(_pLink); \
1727 break; \
1728 } \
1729 _prev = _pLink; \
1730 _pLink = _pLink->next; \
1731 }}
1732
1733
1734#define SWAP_BITS_IN_BYTES(v) \
1735 (((0x01010101 & (v)) << 7) | ((0x02020202 & (v)) << 5) | \
1736 ((0x04040404 & (v)) << 3) | ((0x08080808 & (v)) << 1) | \
1737 ((0x10101010 & (v)) >> 1) | ((0x20202020 & (v)) >> 3) | \
1738 ((0x40404040 & (v)) >> 5) | ((0x80808080 & (v)) >> 7))
1739
1740/*
1741 * Moved XAAPixmapCachePrivate here from xaaPCache.c, since driver
1742 * replacements for CacheMonoStipple need access to it
1743 */
1744
1745typedef struct {
1746 int Num512x512;
1747 int Current512;
1748 XAACacheInfoPtr Info512;
1749 int Num256x256;
1750 int Current256;
1751 XAACacheInfoPtr Info256;
1752 int Num128x128;
1753 int Current128;
1754 XAACacheInfoPtr Info128;
1755 int NumMono;
1756 int CurrentMono;
1757 XAACacheInfoPtr InfoMono;
1758 int NumColor;
1759 int CurrentColor;
1760 XAACacheInfoPtr InfoColor;
1761 int NumPartial;
1762 int CurrentPartial;
1763 XAACacheInfoPtr InfoPartial;
1764 DDXPointRec MonoOffsets[64];
1765 DDXPointRec ColorOffsets[64];
1766} XAAPixmapCachePrivate, *XAAPixmapCachePrivatePtr;
1767
1768
1769#endif /* _XAALOCAL_H */
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette