VirtualBox

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

Last change on this file since 33983 was 17471, checked in by vboxsync, 16 years ago

export to OSE

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