2 #ifdef HAVE_XORG_CONFIG_H
3 #include <xorg-config.h>
8 #include "xf86_OSproc.h"
11 #include "scrnintstr.h"
12 #include "windowstr.h"
17 #include "pixmapstr.h"
21 Written by Harm Hanemaayer (H.Hanemaayer@inter.nl.net).
30 DDXPointPtr pptSrc
, ppt
;
35 ScreenPtr pScreen
= pWin
->drawable
.pScreen
;
36 XAAInfoRecPtr infoRec
=
37 GET_XAAINFORECPTR_FROM_DRAWABLE((&pWin
->drawable
));
39 if (!infoRec
->pScrn
->vtSema
|| !infoRec
->ScreenToScreenBitBlt
) {
40 XAA_SCREEN_PROLOGUE (pScreen
, CopyWindow
);
41 if(infoRec
->pScrn
->vtSema
&& infoRec
->NeedToSync
) {
42 (*infoRec
->Sync
)(infoRec
->pScrn
);
43 infoRec
->NeedToSync
= FALSE
;
45 (*pScreen
->CopyWindow
) (pWin
, ptOldOrg
, prgnSrc
);
46 XAA_SCREEN_EPILOGUE (pScreen
, CopyWindow
, XAACopyWindow
);
50 pwinRoot
= WindowTable
[pScreen
->myNum
];
52 REGION_NULL(pScreen
, &rgnDst
);
54 dx
= ptOldOrg
.x
- pWin
->drawable
.x
;
55 dy
= ptOldOrg
.y
- pWin
->drawable
.y
;
56 REGION_TRANSLATE(pScreen
, prgnSrc
, -dx
, -dy
);
57 REGION_INTERSECT(pScreen
, &rgnDst
, &pWin
->borderClip
, prgnSrc
);
59 pbox
= REGION_RECTS(&rgnDst
);
60 nbox
= REGION_NUM_RECTS(&rgnDst
);
62 !(pptSrc
= (DDXPointPtr
)ALLOCATE_LOCAL(nbox
* sizeof(DDXPointRec
)))) {
63 REGION_UNINIT(pScreen
, &rgnDst
);
69 ppt
->x
= pbox
->x1
+ dx
;
70 ppt
->y
= pbox
->y1
+ dy
;
74 infoRec
->ScratchGC
.planemask
= ~0L;
75 infoRec
->ScratchGC
.alu
= GXcopy
;
77 XAADoBitBlt((DrawablePtr
)pwinRoot
, (DrawablePtr
)pwinRoot
,
78 &(infoRec
->ScratchGC
), &rgnDst
, pptSrc
);
80 DEALLOCATE_LOCAL(pptSrc
);
81 REGION_UNINIT(pScreen
, &rgnDst
);