First import
[xorg_rtime.git] / xorg-server-1.4 / hw / xfree86 / xaa / xaa.h
blobc8d0467e9223dbdfbf375c74efb6a0483f779ae8
2 #ifndef _XAA_H
3 #define _XAA_H
5 /*
7 ******** OPERATION SPECIFIC FLAGS *********
9 **** solid/dashed line flags ****
11 --------- --------
12 23 LINE_PATTERN_LSBFIRST_MSBJUSTIFIED
13 22 LINE_PATTERN_LSBFIRST_LSBJUSTIFIED
14 21 LINE_PATTERN_MSBFIRST_MSBJUSTIFIED
15 20 LINE_PATTERN_MSBFIRST_LSBJUSTIFIED
16 19 LINE_PATTERN_POWER_OF_2_ONLY
17 18 LINE_LIMIT_COORDS
18 17 .
19 16 .
20 --------- -------
22 **** screen to screen copy flags ****
24 --------- --------
25 23 ONLY_LEFT_TO_RIGHT_BITBLT
26 22 ONLY_TWO_BITBLT_DIRECTIONS
27 21 .
28 20 .
29 19 .
30 18 .
31 17 .
32 16 .
33 --------- -------
35 **** clipping flags ****
37 --------- --------
38 23 .
39 22 HARDWARE_CLIP_SCREEN_TO_SCREEN_COLOR_EXPAND
40 21 HARDWARE_CLIP_SCREEN_TO_SCREEN_COPY
41 20 HARDWARE_CLIP_MONO_8x8_FILL
42 19 HARDWARE_CLIP_COLOR_8x8_FILL
43 18 HARDWARE_CLIP_SOLID_FILL
44 17 HARDWARE_CLIP_DASHED_LINE
45 16 HARDWARE_CLIP_SOLID_LINE
46 --------- -------
49 **** hardware pattern flags ****
51 --------- --------
52 23 .
53 22 .
54 21 HARDWARE_PATTERN_SCREEN_ORIGIN
55 20 .
56 19 .
57 18 .
58 17 HARDWARE_PATTERN_PROGRAMMED_ORIGIN
59 16 HARDWARE_PATTERN_PROGRAMMED_BITS
60 --------- -------
62 **** write pixmap flags ****
64 --------- --------
65 23 .
66 22 .
67 21 .
68 20 .
69 19 .
70 18 .
71 17 .
72 16 CONVERT_32BPP_TO_24BPP
73 --------- -------
76 ******** GENERIC FLAGS *********
78 --------- -------
79 15 SYNC_AFTER_COLOR_EXPAND
80 14 CPU_TRANSFER_PAD_QWORD
81 13 .
82 12 LEFT_EDGE_CLIPPING_NEGATIVE_X
83 11 LEFT_EDGE_CLIPPING
84 10 CPU_TRANSFER_BASE_FIXED
85 9 BIT_ORDER_IN_BYTE_MSBFIRST
86 8 TRANSPARENCY_GXCOPY_ONLY
87 --------- -------
88 7 NO_TRANSPARENCY
89 6 TRANSPARENCY_ONLY
90 5 ROP_NEEDS_SOURCE
91 4 TRIPLE_BITS_24BPP
92 3 RGB_EQUAL
93 2 NO_PLANEMASK
94 1 NO_GXCOPY
95 0 GXCOPY_ONLY
96 --------- -------
101 #include "gcstruct.h"
102 #include "pixmapstr.h"
103 #include "xf86str.h"
104 #include "regionstr.h"
105 #include "xf86fbman.h"
107 #ifdef RENDER
108 #include "picturestr.h"
109 #endif
111 /* Flags */
112 #define PIXMAP_CACHE 0x00000001
113 #define MICROSOFT_ZERO_LINE_BIAS 0x00000002
114 #define OFFSCREEN_PIXMAPS 0x00000004
115 #define LINEAR_FRAMEBUFFER 0x00000008
118 /* GC fg, bg, and planemask restrictions */
119 #define GXCOPY_ONLY 0x00000001
120 #define NO_GXCOPY 0x00000002
121 #define NO_PLANEMASK 0x00000004
122 #define RGB_EQUAL 0x00000008
123 #define TRIPLE_BITS_24BPP 0x00000010
124 #define ROP_NEEDS_SOURCE 0x00000020
126 /* transparency restrictions */
127 #define TRANSPARENCY_ONLY 0x00000040
128 #define NO_TRANSPARENCY 0x00000080
129 #define TRANSPARENCY_GXCOPY_ONLY 0x00000100
131 /* bit order restrictions */
132 #define BIT_ORDER_IN_BYTE_MSBFIRST 0x00000200
133 #define BIT_ORDER_IN_BYTE_LSBFIRST 0x00000000
135 /* transfer base restriction */
136 #define CPU_TRANSFER_BASE_FIXED 0x00000400
138 /* skipleft restrictions */
139 #define LEFT_EDGE_CLIPPING 0x00000800
140 #define LEFT_EDGE_CLIPPING_NEGATIVE_X 0x00001000
142 /* data padding */
143 #define CPU_TRANSFER_PAD_DWORD 0x00000000
144 #define CPU_TRANSFER_PAD_QWORD 0x00004000
145 #define SCANLINE_PAD_DWORD 0x00000000
147 #define SYNC_AFTER_COLOR_EXPAND 0x00008000
148 #define SYNC_AFTER_IMAGE_WRITE SYNC_AFTER_COLOR_EXPAND
150 /* hardware pattern */
151 #define HARDWARE_PATTERN_PROGRAMMED_BITS 0x00010000
152 #define HARDWARE_PATTERN_PROGRAMMED_ORIGIN 0x00020000
153 #define HARDWARE_PATTERN_SCREEN_ORIGIN 0x00200000
155 /* copyarea flags */
156 #define ONLY_TWO_BITBLT_DIRECTIONS 0x00400000
157 #define ONLY_LEFT_TO_RIGHT_BITBLT 0x00800000
159 /* line flags */
160 #define LINE_PATTERN_LSBFIRST_MSBJUSTIFIED 0x00800000
161 #define LINE_PATTERN_LSBFIRST_LSBJUSTIFIED 0x00400000
162 #define LINE_PATTERN_MSBFIRST_MSBJUSTIFIED 0x00200000
163 #define LINE_PATTERN_MSBFIRST_LSBJUSTIFIED 0x00100000
164 #define LINE_PATTERN_POWER_OF_2_ONLY 0x00080000
165 #define LINE_LIMIT_COORDS 0x00040000
167 /* clipping flags */
168 #define HARDWARE_CLIP_SCREEN_TO_SCREEN_COLOR_EXPAND 0x00400000
169 #define HARDWARE_CLIP_SCREEN_TO_SCREEN_COPY 0x00200000
170 #define HARDWARE_CLIP_MONO_8x8_FILL 0x00100000
171 #define HARDWARE_CLIP_COLOR_8x8_FILL 0x00080000
172 #define HARDWARE_CLIP_SOLID_FILL 0x00040000
173 #define HARDWARE_CLIP_DASHED_LINE 0x00020000
174 #define HARDWARE_CLIP_SOLID_LINE 0x00010000
176 #define HARDWARE_CLIP_LINE 0x00000000
179 /* image write flags */
180 #define CONVERT_32BPP_TO_24BPP 0x00010000
182 /* pixmap cache flags */
183 #define CACHE_MONO_8x8 0x00000001
184 #define CACHE_COLOR_8x8 0x00000002
185 #define DO_NOT_BLIT_STIPPLES 0x00000004
186 #define DO_NOT_TILE_MONO_DATA 0x00000008
187 #define DO_NOT_TILE_COLOR_DATA 0x00000010
190 #define DEGREES_0 0
191 #define DEGREES_90 1
192 #define DEGREES_180 2
193 #define DEGREES_270 3
195 #define OMIT_LAST 1
197 /* render flags */
199 #define XAA_RENDER_POWER_OF_2_TILE_ONLY 0x00000008
200 #define XAA_RENDER_NO_SRC_ALPHA 0x00000004
201 #define XAA_RENDER_IMPRECISE_ONLY 0x00000002
202 #define XAA_RENDER_NO_TILE 0x00000001
204 #define XAA_RENDER_REPEAT 0x00000001
206 typedef void (* ValidateGCProcPtr)(
207 GCPtr pGC,
208 unsigned long changes,
209 DrawablePtr pDraw
212 typedef struct {
213 unsigned char *bits;
214 int width;
215 int height;
216 int yoff;
217 int srcwidth;
218 int start;
219 int end;
220 } NonTEGlyphInfo, *NonTEGlyphPtr;
223 typedef struct {
224 int x;
225 int y;
226 int w;
227 int h;
228 int orig_w;
229 int orig_h;
230 unsigned long serialNumber;
231 int pat0;
232 int pat1;
233 int fg;
234 int bg;
235 int trans_color;
236 DDXPointPtr offsets;
237 DevUnion devPrivate;
238 } XAACacheInfoRec, *XAACacheInfoPtr;
241 typedef struct _PixmapLink {
242 PixmapPtr pPix;
243 struct _PixmapLink *next;
244 FBAreaPtr area;
245 } PixmapLink, *PixmapLinkPtr;
247 typedef struct _XAAInfoRec {
248 ScrnInfoPtr pScrn;
249 int Flags;
251 void (*Sync)(
252 ScrnInfoPtr pScrn
255 /* Restore Accel State is a driver callback that is used
256 * when another screen on the same device has been active.
257 * This allows multihead on a single device to work.
258 * If The entityProp has IS_SHARED_ACCEL defined then this
259 * function is required.
262 void (*RestoreAccelState)(
263 ScrnInfoPtr pScrn
266 /***************** Low Level *****************/
268 /* Blits */
269 void (*SetupForScreenToScreenCopy)(
270 ScrnInfoPtr pScrn,
271 int xdir, int ydir,
272 int rop,
273 unsigned int planemask,
274 int trans_color
276 int ScreenToScreenCopyFlags;
278 void (*SubsequentScreenToScreenCopy)(
279 ScrnInfoPtr pScrn,
280 int xsrc, int ysrc,
281 int xdst, int ydst,
282 int w, int h
286 /* Solid fills */
287 void (*SetupForSolidFill)(
288 ScrnInfoPtr pScrn,
289 int color,
290 int rop,
291 unsigned int planemask
293 int SolidFillFlags;
295 void (*SubsequentSolidFillRect)(
296 ScrnInfoPtr pScrn,
297 int x, int y, int w, int h
300 void (*SubsequentSolidFillTrap)(
301 ScrnInfoPtr pScrn,
302 int y, int h,
303 int left, int dxL, int dyL, int eL,
304 int right, int dxR, int dyR, int eR
308 /* Solid lines */
310 void (*SetupForSolidLine)(
311 ScrnInfoPtr pScrn,
312 int color,
313 int rop,
314 unsigned int planemask
316 int SolidLineFlags;
318 void (*SubsequentSolidTwoPointLine)(
319 ScrnInfoPtr pScrn,
320 int xa, int ya, int xb, int yb, int flags
323 void (*SubsequentSolidBresenhamLine)(
324 ScrnInfoPtr pScrn,
325 int x, int y, int absmaj, int absmin, int err, int len, int octant
327 int SolidBresenhamLineErrorTermBits;
329 void (*SubsequentSolidHorVertLine)(
330 ScrnInfoPtr pScrn,
331 int x, int y, int len, int dir
334 /* Dashed lines */
336 void (*SetupForDashedLine)(
337 ScrnInfoPtr pScrn,
338 int fg, int bg,
339 int rop,
340 unsigned int planemask,
341 int length,
342 unsigned char *pattern
344 int DashedLineFlags;
345 int DashPatternMaxLength;
347 void (*SubsequentDashedTwoPointLine)(
348 ScrnInfoPtr pScrn,
349 int xa, int ya, int xb, int yb, int flags, int phase
352 void (*SubsequentDashedBresenhamLine)(
353 ScrnInfoPtr pScrn,
354 int x, int y, int absmaj, int absmin, int err, int len, int flags,
355 int phase
357 int DashedBresenhamLineErrorTermBits;
359 /* Clipper */
361 void (*SetClippingRectangle) (
362 ScrnInfoPtr pScrn,
363 int left, int top, int right, int bottom
365 int ClippingFlags;
367 void (*DisableClipping)(ScrnInfoPtr pScrn);
369 /* 8x8 mono pattern fills */
370 void (*SetupForMono8x8PatternFill)(
371 ScrnInfoPtr pScrn,
372 int patx, int paty,
373 int fg, int bg,
374 int rop,
375 unsigned int planemask
377 int Mono8x8PatternFillFlags;
379 void (*SubsequentMono8x8PatternFillRect)(
380 ScrnInfoPtr pScrn,
381 int patx, int paty,
382 int x, int y, int w, int h
385 void (*SubsequentMono8x8PatternFillTrap)(
386 ScrnInfoPtr pScrn,
387 int patx, int paty,
388 int y, int h,
389 int left, int dxL, int dyL, int eL,
390 int right, int dxR, int dyR, int eR
393 /* 8x8 color pattern fills */
395 void (*SetupForColor8x8PatternFill)(
396 ScrnInfoPtr pScrn,
397 int patx, int paty,
398 int rop,
399 unsigned int planemask,
400 int transparency_color
402 int Color8x8PatternFillFlags;
404 void (*SubsequentColor8x8PatternFillRect)(
405 ScrnInfoPtr pScrn,
406 int patx, int paty,
407 int x, int y, int w, int h
410 void (*SubsequentColor8x8PatternFillTrap)(
411 ScrnInfoPtr pScrn,
412 int patx, int paty,
413 int y, int h,
414 int left, int dxL, int dyL, int eL,
415 int right, int dxR, int dyR, int eR
419 /* Color expansion */
421 void (*SetupForCPUToScreenColorExpandFill)(
422 ScrnInfoPtr pScrn,
423 int fg, int bg,
424 int rop,
425 unsigned int planemask
427 int CPUToScreenColorExpandFillFlags;
429 void (*SubsequentCPUToScreenColorExpandFill)(
430 ScrnInfoPtr pScrn,
431 int x, int y, int w, int h,
432 int skipleft
435 unsigned char *ColorExpandBase;
436 int ColorExpandRange;
439 /* Scanline color expansion */
441 void (*SetupForScanlineCPUToScreenColorExpandFill)(
442 ScrnInfoPtr pScrn,
443 int fg, int bg,
444 int rop,
445 unsigned int planemask
447 int ScanlineCPUToScreenColorExpandFillFlags;
449 void (*SubsequentScanlineCPUToScreenColorExpandFill)(
450 ScrnInfoPtr pScrn,
451 int x, int y, int w, int h,
452 int skipleft
455 void (*SubsequentColorExpandScanline)(
456 ScrnInfoPtr pScrn,
457 int bufno
460 int NumScanlineColorExpandBuffers;
461 unsigned char **ScanlineColorExpandBuffers;
463 /* Screen to screen color expansion */
465 void (*SetupForScreenToScreenColorExpandFill) (
466 ScrnInfoPtr pScrn,
467 int fg, int bg,
468 int rop,
469 unsigned int planemask
471 int ScreenToScreenColorExpandFillFlags;
473 void (*SubsequentScreenToScreenColorExpandFill)(
474 ScrnInfoPtr pScrn,
475 int x, int y, int w, int h,
476 int srcx, int srcy, int skipleft
480 /* Image transfers */
482 void (*SetupForImageWrite)(
483 ScrnInfoPtr pScrn,
484 int rop,
485 unsigned int planemask,
486 int transparency_color,
487 int bpp, int depth
489 int ImageWriteFlags;
491 void (*SubsequentImageWriteRect)(
492 ScrnInfoPtr pScrn,
493 int x, int y, int w, int h,
494 int skipleft
496 unsigned char *ImageWriteBase;
497 int ImageWriteRange;
499 /* Scanline Image transfers */
501 void (*SetupForScanlineImageWrite)(
502 ScrnInfoPtr pScrn,
503 int rop,
504 unsigned int planemask,
505 int transparency_color,
506 int bpp, int depth
508 int ScanlineImageWriteFlags;
510 void (*SubsequentScanlineImageWriteRect)(
511 ScrnInfoPtr pScrn,
512 int x, int y, int w, int h,
513 int skipleft
516 void (*SubsequentImageWriteScanline) (
517 ScrnInfoPtr pScrn,
518 int bufno
521 int NumScanlineImageWriteBuffers;
522 unsigned char **ScanlineImageWriteBuffers;
524 /* Image Reads - OBSOLETE AND NOT USED */
526 void (*SetupForImageRead) (
527 ScrnInfoPtr pScrn,
528 int bpp, int depth
530 int ImageReadFlags;
532 unsigned char *ImageReadBase;
533 int ImageReadRange;
535 void (*SubsequentImageReadRect)(
536 ScrnInfoPtr pScrn,
537 int x, int y, int w, int h
541 /***************** Mid Level *****************/
542 void (*ScreenToScreenBitBlt)(
543 ScrnInfoPtr pScrn,
544 int nbox,
545 DDXPointPtr pptSrc,
546 BoxPtr pbox,
547 int xdir, int ydir,
548 int alu,
549 unsigned int planmask
551 int ScreenToScreenBitBltFlags;
553 void (*WriteBitmap) (
554 ScrnInfoPtr pScrn,
555 int x, int y, int w, int h,
556 unsigned char *src,
557 int srcwidth,
558 int skipleft,
559 int fg, int bg,
560 int rop,
561 unsigned int planemask
563 int WriteBitmapFlags;
565 void (*FillSolidRects)(
566 ScrnInfoPtr pScrn,
567 int fg, int rop,
568 unsigned int planemask,
569 int nBox,
570 BoxPtr pBox
572 int FillSolidRectsFlags;
574 void (*FillMono8x8PatternRects)(
575 ScrnInfoPtr pScrn,
576 int fg, int bg, int rop,
577 unsigned int planemask,
578 int nBox,
579 BoxPtr pBox,
580 int pat0, int pat1,
581 int xorg, int yorg
583 int FillMono8x8PatternRectsFlags;
585 void (*FillColor8x8PatternRects)(
586 ScrnInfoPtr pScrn,
587 int rop,
588 unsigned int planemask,
589 int nBox,
590 BoxPtr pBox,
591 int xorg, int yorg,
592 XAACacheInfoPtr pCache
594 int FillColor8x8PatternRectsFlags;
596 void (*FillCacheBltRects)(
597 ScrnInfoPtr pScrn,
598 int rop,
599 unsigned int planemask,
600 int nBox,
601 BoxPtr pBox,
602 int xorg, int yorg,
603 XAACacheInfoPtr pCache
605 int FillCacheBltRectsFlags;
607 void (*FillColorExpandRects)(
608 ScrnInfoPtr pScrn,
609 int fg, int bg, int rop,
610 unsigned int planemask,
611 int nBox,
612 BoxPtr pBox,
613 int xorg, int yorg,
614 PixmapPtr pPix
616 int FillColorExpandRectsFlags;
618 void (*FillCacheExpandRects)(
619 ScrnInfoPtr pScrn,
620 int fg, int bg, int rop,
621 unsigned int planemask,
622 int nBox,
623 BoxPtr pBox,
624 int xorg, int yorg,
625 PixmapPtr pPix
627 int FillCacheExpandRectsFlags;
629 void (*FillImageWriteRects)(
630 ScrnInfoPtr pScrn,
631 int rop,
632 unsigned int planemask,
633 int nBox,
634 BoxPtr pBox,
635 int xorg, int yorg,
636 PixmapPtr pPix
638 int FillImageWriteRectsFlags;
641 void (*FillSolidSpans)(
642 ScrnInfoPtr pScrn,
643 int fg, int rop,
644 unsigned int planemask,
645 int n,
646 DDXPointPtr points,
647 int *widths,
648 int fSorted
650 int FillSolidSpansFlags;
652 void (*FillMono8x8PatternSpans)(
653 ScrnInfoPtr pScrn,
654 int fg, int bg, int rop,
655 unsigned int planemask,
656 int n,
657 DDXPointPtr points,
658 int *widths,
659 int fSorted,
660 int pat0, int pat1,
661 int xorg, int yorg
663 int FillMono8x8PatternSpansFlags;
665 void (*FillColor8x8PatternSpans)(
666 ScrnInfoPtr pScrn,
667 int rop,
668 unsigned int planemask,
669 int n,
670 DDXPointPtr points,
671 int *widths,
672 int fSorted,
673 XAACacheInfoPtr pCache,
674 int xorg, int yorg
676 int FillColor8x8PatternSpansFlags;
678 void (*FillCacheBltSpans)(
679 ScrnInfoPtr pScrn,
680 int rop,
681 unsigned int planemask,
682 int n,
683 DDXPointPtr points,
684 int *widths,
685 int fSorted,
686 XAACacheInfoPtr pCache,
687 int xorg, int yorg
689 int FillCacheBltSpansFlags;
691 void (*FillColorExpandSpans)(
692 ScrnInfoPtr pScrn,
693 int fg, int bg, int rop,
694 unsigned int planemask,
695 int n,
696 DDXPointPtr points,
697 int *widths,
698 int fSorted,
699 int xorg, int yorg,
700 PixmapPtr pPix
702 int FillColorExpandSpansFlags;
704 void (*FillCacheExpandSpans)(
705 ScrnInfoPtr pScrn,
706 int fg, int bg, int rop,
707 unsigned int planemask,
708 int n,
709 DDXPointPtr ppt,
710 int *pwidth,
711 int fSorted,
712 int xorg, int yorg,
713 PixmapPtr pPix
715 int FillCacheExpandSpansFlags;
717 void (*TEGlyphRenderer)(
718 ScrnInfoPtr pScrn,
719 int x, int y, int w, int h, int skipleft, int startline,
720 unsigned int **glyphs, int glyphWidth,
721 int fg, int bg, int rop, unsigned planemask
723 int TEGlyphRendererFlags;
725 void (*NonTEGlyphRenderer)(
726 ScrnInfoPtr pScrn,
727 int x, int y, int n,
728 NonTEGlyphPtr glyphs,
729 BoxPtr pbox,
730 int fg, int rop,
731 unsigned int planemask
733 int NonTEGlyphRendererFlags;
735 void (*WritePixmap) (
736 ScrnInfoPtr pScrn,
737 int x, int y, int w, int h,
738 unsigned char *src,
739 int srcwidth,
740 int rop,
741 unsigned int planemask,
742 int transparency_color,
743 int bpp, int depth
745 int WritePixmapFlags;
747 void (*ReadPixmap) (
748 ScrnInfoPtr pScrn,
749 int x, int y, int w, int h,
750 unsigned char *dst,
751 int dstwidth,
752 int bpp, int depth
754 int ReadPixmapFlags;
756 /***************** GC Level *****************/
757 RegionPtr (*CopyArea)(
758 DrawablePtr pSrcDrawable,
759 DrawablePtr pDstDrawable,
760 GC *pGC,
761 int srcx, int srcy,
762 int width, int height,
763 int dstx, int dsty
765 int CopyAreaFlags;
767 RegionPtr (*CopyPlane)(
768 DrawablePtr pSrc,
769 DrawablePtr pDst,
770 GCPtr pGC,
771 int srcx, int srcy,
772 int width, int height,
773 int dstx, int dsty,
774 unsigned long bitPlane
776 int CopyPlaneFlags;
778 void (*PushPixelsSolid) (
779 GCPtr pGC,
780 PixmapPtr pBitMap,
781 DrawablePtr pDrawable,
782 int dx, int dy,
783 int xOrg, int yOrg
785 int PushPixelsFlags;
787 /** PolyFillRect **/
789 void (*PolyFillRectSolid)(
790 DrawablePtr pDraw,
791 GCPtr pGC,
792 int nrectFill,
793 xRectangle *prectInit
795 int PolyFillRectSolidFlags;
797 void (*PolyFillRectStippled)(
798 DrawablePtr pDraw,
799 GCPtr pGC,
800 int nrectFill,
801 xRectangle *prectInit
803 int PolyFillRectStippledFlags;
805 void (*PolyFillRectOpaqueStippled)(
806 DrawablePtr pDraw,
807 GCPtr pGC,
808 int nrectFill,
809 xRectangle *prectInit
811 int PolyFillRectOpaqueStippledFlags;
813 void (*PolyFillRectTiled)(
814 DrawablePtr pDraw,
815 GCPtr pGC,
816 int nrectFill,
817 xRectangle *prectInit
819 int PolyFillRectTiledFlags;
821 /** FillSpans **/
823 void (*FillSpansSolid)(
824 DrawablePtr pDraw,
825 GCPtr pGC,
826 int nInit,
827 DDXPointPtr ppt,
828 int *pwidth,
829 int fSorted
831 int FillSpansSolidFlags;
833 void (*FillSpansStippled)(
834 DrawablePtr pDraw,
835 GCPtr pGC,
836 int nInit,
837 DDXPointPtr ppt,
838 int *pwidth,
839 int fSorted
841 int FillSpansStippledFlags;
843 void (*FillSpansOpaqueStippled)(
844 DrawablePtr pDraw,
845 GCPtr pGC,
846 int nInit,
847 DDXPointPtr ppt,
848 int *pwidth,
849 int fSorted
851 int FillSpansOpaqueStippledFlags;
853 void (*FillSpansTiled)(
854 DrawablePtr pDraw,
855 GCPtr pGC,
856 int nInit,
857 DDXPointPtr ppt,
858 int *pwidth,
859 int fSorted
861 int FillSpansTiledFlags;
863 int (*PolyText8TE) (
864 DrawablePtr pDraw,
865 GCPtr pGC,
866 int x, int y,
867 int count,
868 char *chars
870 int PolyText8TEFlags;
872 int (*PolyText16TE) (
873 DrawablePtr pDraw,
874 GCPtr pGC,
875 int x, int y,
876 int count,
877 unsigned short *chars
879 int PolyText16TEFlags;
881 void (*ImageText8TE) (
882 DrawablePtr pDraw,
883 GCPtr pGC,
884 int x, int y,
885 int count,
886 char *chars
888 int ImageText8TEFlags;
890 void (*ImageText16TE) (
891 DrawablePtr pDraw,
892 GCPtr pGC,
893 int x, int y,
894 int count,
895 unsigned short *chars
897 int ImageText16TEFlags;
899 void (*ImageGlyphBltTE) (
900 DrawablePtr pDrawable,
901 GCPtr pGC,
902 int xInit, int yInit,
903 unsigned int nglyph,
904 CharInfoPtr *ppci,
905 pointer pglyphBase
907 int ImageGlyphBltTEFlags;
909 void (*PolyGlyphBltTE) (
910 DrawablePtr pDrawable,
911 GCPtr pGC,
912 int xInit, int yInit,
913 unsigned int nglyph,
914 CharInfoPtr *ppci,
915 pointer pglyphBase
917 int PolyGlyphBltTEFlags;
919 int (*PolyText8NonTE) (
920 DrawablePtr pDraw,
921 GCPtr pGC,
922 int x, int y,
923 int count,
924 char *chars
926 int PolyText8NonTEFlags;
928 int (*PolyText16NonTE) (
929 DrawablePtr pDraw,
930 GCPtr pGC,
931 int x, int y,
932 int count,
933 unsigned short *chars
935 int PolyText16NonTEFlags;
937 void (*ImageText8NonTE) (
938 DrawablePtr pDraw,
939 GCPtr pGC,
940 int x, int y,
941 int count,
942 char *chars
944 int ImageText8NonTEFlags;
946 void (*ImageText16NonTE) (
947 DrawablePtr pDraw,
948 GCPtr pGC,
949 int x, int y,
950 int count,
951 unsigned short *chars
953 int ImageText16NonTEFlags;
955 void (*ImageGlyphBltNonTE) (
956 DrawablePtr pDrawable,
957 GCPtr pGC,
958 int xInit, int yInit,
959 unsigned int nglyph,
960 CharInfoPtr *ppci,
961 pointer pglyphBase
963 int ImageGlyphBltNonTEFlags;
965 void (*PolyGlyphBltNonTE) (
966 DrawablePtr pDrawable,
967 GCPtr pGC,
968 int xInit, int yInit,
969 unsigned int nglyph,
970 CharInfoPtr *ppci,
971 pointer pglyphBase
973 int PolyGlyphBltNonTEFlags;
975 void (*PolyRectangleThinSolid)(
976 DrawablePtr pDrawable,
977 GCPtr pGC,
978 int nRectsInit,
979 xRectangle *pRectsInit
981 int PolyRectangleThinSolidFlags;
983 void (*PolylinesWideSolid)(
984 DrawablePtr pDrawable,
985 GCPtr pGC,
986 int mode,
987 int npt,
988 DDXPointPtr pPts
990 int PolylinesWideSolidFlags;
992 void (*PolylinesThinSolid)(
993 DrawablePtr pDrawable,
994 GCPtr pGC,
995 int mode,
996 int npt,
997 DDXPointPtr pPts
999 int PolylinesThinSolidFlags;
1001 void (*PolySegmentThinSolid)(
1002 DrawablePtr pDrawable,
1003 GCPtr pGC,
1004 int nseg,
1005 xSegment *pSeg
1007 int PolySegmentThinSolidFlags;
1009 void (*PolylinesThinDashed)(
1010 DrawablePtr pDrawable,
1011 GCPtr pGC,
1012 int mode,
1013 int npt,
1014 DDXPointPtr pPts
1016 int PolylinesThinDashedFlags;
1018 void (*PolySegmentThinDashed)(
1019 DrawablePtr pDrawable,
1020 GCPtr pGC,
1021 int nseg,
1022 xSegment *pSeg
1024 int PolySegmentThinDashedFlags;
1026 void (*FillPolygonSolid)(
1027 DrawablePtr pDrawable,
1028 GCPtr pGC,
1029 int shape,
1030 int mode,
1031 int count,
1032 DDXPointPtr ptsIn
1034 int FillPolygonSolidFlags;
1036 void (*FillPolygonStippled)(
1037 DrawablePtr pDrawable,
1038 GCPtr pGC,
1039 int shape,
1040 int mode,
1041 int count,
1042 DDXPointPtr ptsIn
1044 int FillPolygonStippledFlags;
1046 void (*FillPolygonOpaqueStippled)(
1047 DrawablePtr pDrawable,
1048 GCPtr pGC,
1049 int shape,
1050 int mode,
1051 int count,
1052 DDXPointPtr ptsIn
1054 int FillPolygonOpaqueStippledFlags;
1056 void (*FillPolygonTiled)(
1057 DrawablePtr pDrawable,
1058 GCPtr pGC,
1059 int shape,
1060 int mode,
1061 int count,
1062 DDXPointPtr ptsIn
1064 int FillPolygonTiledFlags;
1066 void (*PolyFillArcSolid)(
1067 DrawablePtr pDraw,
1068 GCPtr pGC,
1069 int narcs,
1070 xArc *parcs
1072 int PolyFillArcSolidFlags;
1074 void (*PutImage)(
1075 DrawablePtr pDraw,
1076 GCPtr pGC,
1077 int depth,
1078 int x,
1079 int y,
1080 int w,
1081 int h,
1082 int leftPad,
1083 int format,
1084 char *pImage
1086 int PutImageFlags;
1088 /* Validation masks */
1090 unsigned long FillSpansMask;
1091 ValidateGCProcPtr ValidateFillSpans;
1092 unsigned long SetSpansMask;
1093 ValidateGCProcPtr ValidateSetSpans;
1094 unsigned long PutImageMask;
1095 ValidateGCProcPtr ValidatePutImage;
1096 unsigned long CopyAreaMask;
1097 ValidateGCProcPtr ValidateCopyArea;
1098 unsigned long CopyPlaneMask;
1099 ValidateGCProcPtr ValidateCopyPlane;
1100 unsigned long PolyPointMask;
1101 ValidateGCProcPtr ValidatePolyPoint;
1102 unsigned long PolylinesMask;
1103 ValidateGCProcPtr ValidatePolylines;
1104 unsigned long PolySegmentMask;
1105 ValidateGCProcPtr ValidatePolySegment;
1106 unsigned long PolyRectangleMask;
1107 ValidateGCProcPtr ValidatePolyRectangle;
1108 unsigned long PolyArcMask;
1109 ValidateGCProcPtr ValidatePolyArc;
1110 unsigned long FillPolygonMask;
1111 ValidateGCProcPtr ValidateFillPolygon;
1112 unsigned long PolyFillRectMask;
1113 ValidateGCProcPtr ValidatePolyFillRect;
1114 unsigned long PolyFillArcMask;
1115 ValidateGCProcPtr ValidatePolyFillArc;
1116 unsigned long PolyText8Mask;
1117 ValidateGCProcPtr ValidatePolyText8;
1118 unsigned long PolyText16Mask;
1119 ValidateGCProcPtr ValidatePolyText16;
1120 unsigned long ImageText8Mask;
1121 ValidateGCProcPtr ValidateImageText8;
1122 unsigned long ImageText16Mask;
1123 ValidateGCProcPtr ValidateImageText16;
1124 unsigned long PolyGlyphBltMask;
1125 ValidateGCProcPtr ValidatePolyGlyphBlt;
1126 unsigned long ImageGlyphBltMask;
1127 ValidateGCProcPtr ValidateImageGlyphBlt;
1128 unsigned long PushPixelsMask;
1129 ValidateGCProcPtr ValidatePushPixels;
1131 void (*ComputeDash)(GCPtr pGC);
1133 /* Pixmap Cache */
1135 int PixmapCacheFlags;
1136 Bool UsingPixmapCache;
1137 Bool CanDoMono8x8;
1138 Bool CanDoColor8x8;
1140 void (*InitPixmapCache)(
1141 ScreenPtr pScreen,
1142 RegionPtr areas,
1143 pointer data
1145 void (*ClosePixmapCache)(
1146 ScreenPtr pScreen
1149 int (*StippledFillChooser)(GCPtr pGC);
1150 int (*OpaqueStippledFillChooser)(GCPtr pGC);
1151 int (*TiledFillChooser)(GCPtr pGC);
1153 int CachePixelGranularity;
1154 int MaxCacheableTileWidth;
1155 int MaxCacheableTileHeight;
1156 int MaxCacheableStippleWidth;
1157 int MaxCacheableStippleHeight;
1159 XAACacheInfoPtr (*CacheTile)(
1160 ScrnInfoPtr Scrn, PixmapPtr pPix
1162 XAACacheInfoPtr (*CacheStipple)(
1163 ScrnInfoPtr Scrn, PixmapPtr pPix,
1164 int fg, int bg
1166 XAACacheInfoPtr (*CacheMonoStipple)(
1167 ScrnInfoPtr Scrn, PixmapPtr pPix
1169 XAACacheInfoPtr (*CacheMono8x8Pattern)(
1170 ScrnInfoPtr Scrn, int pat0, int pat1
1172 XAACacheInfoPtr (*CacheColor8x8Pattern)(
1173 ScrnInfoPtr Scrn, PixmapPtr pPix,
1174 int fg, int bg
1178 int MonoPatternPitch;
1179 int CacheWidthMono8x8Pattern;
1180 int CacheHeightMono8x8Pattern;
1182 int ColorPatternPitch;
1183 int CacheWidthColor8x8Pattern;
1184 int CacheHeightColor8x8Pattern;
1186 int CacheColorExpandDensity;
1188 void (*WriteBitmapToCache) (
1189 ScrnInfoPtr pScrn,
1190 int x, int y, int w, int h,
1191 unsigned char *src,
1192 int srcwidth,
1193 int fg, int bg
1195 void (*WritePixmapToCache) (
1196 ScrnInfoPtr pScrn,
1197 int x, int y, int w, int h,
1198 unsigned char *src,
1199 int srcwidth,
1200 int bpp, int depth
1202 void (*WriteMono8x8PatternToCache)(
1203 ScrnInfoPtr pScrn,
1204 XAACacheInfoPtr pCache
1206 void (*WriteColor8x8PatternToCache)(
1207 ScrnInfoPtr pScrn,
1208 PixmapPtr pPix,
1209 XAACacheInfoPtr pCache
1212 char* PixmapCachePrivate;
1214 /* Miscellaneous */
1216 GC ScratchGC;
1217 int PreAllocSize;
1218 unsigned char *PreAllocMem;
1220 CharInfoPtr CharInfo[255];
1221 NonTEGlyphInfo GlyphInfo[255];
1223 unsigned int FullPlanemask; /* deprecated */
1225 PixmapLinkPtr OffscreenPixmaps;
1226 int maxOffPixWidth;
1227 int maxOffPixHeight;
1229 XAACacheInfoRec ScratchCacheInfoRec;
1231 BoxPtr ClipBox;
1233 Bool NeedToSync;
1235 char *dgaSaves;
1237 /* These can be supplied to override the defaults */
1239 GetImageProcPtr GetImage;
1240 GetSpansProcPtr GetSpans;
1241 PaintWindowBackgroundProcPtr PaintWindowBackground;
1242 PaintWindowBorderProcPtr PaintWindowBorder;
1243 CopyWindowProcPtr CopyWindow;
1244 BackingStoreSaveAreasProcPtr SaveAreas;
1245 BackingStoreRestoreAreasProcPtr RestoreAreas;
1247 unsigned int offscreenDepths;
1248 Bool offscreenDepthsInitialized;
1250 CARD32 FullPlanemasks[32];
1252 #ifdef RENDER
1253 Bool (*Composite) (
1254 CARD8 op,
1255 PicturePtr pSrc,
1256 PicturePtr pMask,
1257 PicturePtr pDst,
1258 INT16 xSrc,
1259 INT16 ySrc,
1260 INT16 xMask,
1261 INT16 yMask,
1262 INT16 xDst,
1263 INT16 yDst,
1264 CARD16 width,
1265 CARD16 height
1268 Bool (*Glyphs) (
1269 CARD8 op,
1270 PicturePtr pSrc,
1271 PicturePtr pDst,
1272 PictFormatPtr maskFormat,
1273 INT16 xSrc,
1274 INT16 ySrc,
1275 int nlist,
1276 GlyphListPtr list,
1277 GlyphPtr *glyphs
1280 /* The old SetupForCPUToScreenAlphaTexture function is no longer used because
1281 * it doesn't pass in enough information to write a conforming
1282 * implementation. See SetupForCPUToScreenAlphaTexture2.
1284 Bool (*SetupForCPUToScreenAlphaTexture) (
1285 ScrnInfoPtr pScrn,
1286 int op,
1287 CARD16 red,
1288 CARD16 green,
1289 CARD16 blue,
1290 CARD16 alpha,
1291 int alphaType,
1292 CARD8 *alphaPtr,
1293 int alphaPitch,
1294 int width,
1295 int height,
1296 int flags
1298 void (*SubsequentCPUToScreenAlphaTexture) (
1299 ScrnInfoPtr pScrn,
1300 int dstx,
1301 int dsty,
1302 int srcx,
1303 int srcy,
1304 int width,
1305 int height
1307 int CPUToScreenAlphaTextureFlags;
1308 CARD32 * CPUToScreenAlphaTextureFormats;
1310 /* The old SetupForCPUToScreenTexture function is no longer used because
1311 * it doesn't pass in enough information to write a conforming
1312 * implementation. See SetupForCPUToScreenTexture2.
1314 Bool (*SetupForCPUToScreenTexture) (
1315 ScrnInfoPtr pScrn,
1316 int op,
1317 int texType,
1318 CARD8 *texPtr,
1319 int texPitch,
1320 int width,
1321 int height,
1322 int flags
1324 void (*SubsequentCPUToScreenTexture) (
1325 ScrnInfoPtr pScrn,
1326 int dstx,
1327 int dsty,
1328 int srcx,
1329 int srcy,
1330 int width,
1331 int height
1333 int CPUToScreenTextureFlags;
1334 CARD32 * CPUToScreenTextureFormats;
1337 #endif
1339 /* these were added for 4.3.0 */
1340 BoxRec SolidLineLimits;
1341 BoxRec DashedLineLimits;
1343 #ifdef RENDER
1344 /* These were added for X.Org 6.8.0 */
1345 Bool (*SetupForCPUToScreenAlphaTexture2) (
1346 ScrnInfoPtr pScrn,
1347 int op,
1348 CARD16 red,
1349 CARD16 green,
1350 CARD16 blue,
1351 CARD16 alpha,
1352 CARD32 maskFormat,
1353 CARD32 dstFormat,
1354 CARD8 *alphaPtr,
1355 int alphaPitch,
1356 int width,
1357 int height,
1358 int flags
1360 CARD32 *CPUToScreenAlphaTextureDstFormats;
1362 Bool (*SetupForCPUToScreenTexture2) (
1363 ScrnInfoPtr pScrn,
1364 int op,
1365 CARD32 srcFormat,
1366 CARD32 dstFormat,
1367 CARD8 *texPtr,
1368 int texPitch,
1369 int width,
1370 int height,
1371 int flags
1373 CARD32 *CPUToScreenTextureDstFormats;
1374 #endif /* RENDER */
1375 } XAAInfoRec, *XAAInfoRecPtr;
1377 #define SET_SYNC_FLAG(infoRec) (infoRec)->NeedToSync = TRUE
1380 Bool
1381 XAAInit(
1382 ScreenPtr pScreen,
1383 XAAInfoRecPtr infoRec
1386 XAAInfoRecPtr XAACreateInfoRec(void);
1388 void
1389 XAADestroyInfoRec(
1390 XAAInfoRecPtr infoRec
1393 typedef void (*DepthChangeFuncPtr) (ScrnInfoPtr pScrn, int depth);
1395 Bool
1396 XAAInitDualFramebufferOverlay(
1397 ScreenPtr pScreen,
1398 DepthChangeFuncPtr callback
1401 #endif /* _XAA_H */