VirtualBox

source: vbox/trunk/src/VBox/Additions/x11/x11include/xorg-server-1.7.7/xaa.h@ 78416

Last change on this file since 78416 was 43272, checked in by vboxsync, 12 years ago

Additions/x11: more original X server headers.

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

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