VirtualBox

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

Last change on this file since 78293 was 51223, checked in by vboxsync, 11 years ago

Additions/x11/x11include: added header files for X.Org Server 1.0 and 1.1.

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