2 #ifdef HAVE_XORG_CONFIG_H
3 #include <xorg-config.h>
10 #include "pixmapstr.h"
11 #include "scrnintstr.h"
21 #include "panoramiX.h"
22 #include "panoramiXsrv.h"
36 switch (pWin
->backgroundState
) {
42 } while (pWin
->backgroundState
== ParentRelative
);
43 (*pWin
->drawable
.pScreen
->PaintWindowBackground
)(
46 case BackgroundPixmap
:
47 xorg
= pWin
->drawable
.x
;
48 yorg
= pWin
->drawable
.y
;
50 if(!noPanoramiXExtension
) {
51 int index
= pWin
->drawable
.pScreen
->myNum
;
52 if(WindowTable
[index
] == pWin
) {
53 xorg
-= panoramiXdataPtr
[index
].x
;
54 yorg
-= panoramiXdataPtr
[index
].y
;
58 cfb32FillBoxTileOddGeneral ((DrawablePtr
)pWin
,
59 (int)REGION_NUM_RECTS(pRegion
), REGION_RECTS(pRegion
),
60 pWin
->background
.pixmap
, xorg
, yorg
, GXcopy
,
61 (pWin
->drawable
.depth
== 24) ? 0x00ffffff : 0xff000000);
64 if(pWin
->drawable
.depth
== 24)
65 cfb8_32FillBoxSolid32 ((DrawablePtr
)pWin
,
66 (int)REGION_NUM_RECTS(pRegion
),
67 REGION_RECTS(pRegion
),
68 pWin
->background
.pixel
);
70 cfb8_32FillBoxSolid8 ((DrawablePtr
)pWin
,
71 (int)REGION_NUM_RECTS(pRegion
),
72 REGION_RECTS(pRegion
),
73 pWin
->background
.pixel
);
78 if (pWin
->borderIsPixel
) {
79 if(pWin
->drawable
.depth
== 24) {
80 cfb8_32FillBoxSolid32 ((DrawablePtr
)pWin
,
81 (int)REGION_NUM_RECTS(pRegion
),
82 REGION_RECTS(pRegion
),
85 cfb8_32FillBoxSolid8 ((DrawablePtr
)pWin
,
86 (int)REGION_NUM_RECTS(pRegion
),
87 REGION_RECTS(pRegion
),
91 pBgWin
->backgroundState
== ParentRelative
;
92 pBgWin
= pBgWin
->parent
);
94 xorg
= pBgWin
->drawable
.x
;
95 yorg
= pBgWin
->drawable
.y
;
98 if(!noPanoramiXExtension
) {
99 int index
= pWin
->drawable
.pScreen
->myNum
;
100 if(WindowTable
[index
] == pBgWin
) {
101 xorg
-= panoramiXdataPtr
[index
].x
;
102 yorg
-= panoramiXdataPtr
[index
].y
;
106 cfb32FillBoxTileOddGeneral ((DrawablePtr
)pWin
,
107 (int)REGION_NUM_RECTS(pRegion
), REGION_RECTS(pRegion
),
108 pWin
->border
.pixmap
, xorg
, yorg
, GXcopy
,
109 (pWin
->drawable
.depth
== 24) ? 0x00ffffff : 0xff000000);
117 cfb8_32FillBoxSolid8(
124 int pitch
, height
, width
, i
;
125 CARD8 c
= (CARD8
)color
;
127 cfbGetByteWidthAndPointer(pDraw
, pitch
, ptr
);
128 ptr
+= 3; /* point to the top byte */
131 data
= ptr
+ (pbox
->y1
* pitch
) + (pbox
->x1
<< 2);
132 width
= (pbox
->x2
- pbox
->x1
) << 2;
133 height
= pbox
->y2
- pbox
->y1
;
136 for(i
= 0; i
< width
; i
+=4)
146 cfb8_32FillBoxSolid32(
153 CARD16
*ptr2
, *data2
;
155 int height
, width
, i
;
156 CARD8 c
= (CARD8
)(color
>> 16);
157 CARD16 c2
= (CARD16
)color
;
159 cfbGetByteWidthAndPointer(pDraw
, pitch
, ptr
);
160 cfbGetTypedWidthAndPointer(pDraw
, pitch2
, ptr2
, CARD16
, CARD16
);
161 ptr
+= 2; /* point to the third byte */
164 data
= ptr
+ (pbox
->y1
* pitch
) + (pbox
->x1
<< 2);
165 data2
= ptr2
+ (pbox
->y1
* pitch2
) + (pbox
->x1
<< 1);
166 width
= (pbox
->x2
- pbox
->x1
) << 1;
167 height
= pbox
->y2
- pbox
->y1
;
170 for(i
= 0; i
< width
; i
+=2) {