VirtualBox

source: vbox/trunk/src/VBox/Additions/x11/x11include/xorg-server-1.3.0.0/xaawrap.h@ 33428

Last change on this file since 33428 was 25078, checked in by vboxsync, 15 years ago

Additions/x11/x11include: exported and set eol-style on new headers

  • Property svn:eol-style set to native
File size: 2.4 KB
Line 
1
2#define XAA_SCREEN_PROLOGUE(pScreen, field)\
3 ((pScreen)->field = \
4 ((XAAScreenPtr) (pScreen)->devPrivates[XAAGetScreenIndex()].ptr)->field)
5
6#define XAA_SCREEN_EPILOGUE(pScreen, field, wrapper)\
7 ((pScreen)->field = wrapper)
8
9
10#define XAA_GC_FUNC_PROLOGUE(pGC)\
11 XAAGCPtr pGCPriv = (XAAGCPtr) (pGC)->devPrivates[XAAGetGCIndex()].ptr;\
12 (pGC)->funcs = pGCPriv->wrapFuncs;\
13 if(pGCPriv->flags)\
14 (pGC)->ops = pGCPriv->wrapOps
15
16#define XAA_GC_FUNC_EPILOGUE(pGC)\
17 pGCPriv->wrapFuncs = (pGC)->funcs;\
18 (pGC)->funcs = &XAAGCFuncs;\
19 if(pGCPriv->flags) {\
20 pGCPriv->wrapOps = (pGC)->ops;\
21 (pGC)->ops = (pGCPriv->flags & OPS_ARE_ACCEL) ? pGCPriv->XAAOps :\
22 &XAAPixmapOps;\
23 }
24
25
26#define XAA_GC_OP_PROLOGUE(pGC)\
27 XAAGCPtr pGCPriv = (XAAGCPtr)(pGC->devPrivates[XAAGetGCIndex()].ptr);\
28 GCFuncs *oldFuncs = pGC->funcs;\
29 pGC->funcs = pGCPriv->wrapFuncs;\
30 pGC->ops = pGCPriv->wrapOps
31
32#define XAA_GC_OP_PROLOGUE_WITH_RETURN(pGC)\
33 XAAGCPtr pGCPriv = (XAAGCPtr)(pGC->devPrivates[XAAGetGCIndex()].ptr);\
34 GCFuncs *oldFuncs = pGC->funcs;\
35 if(!REGION_NUM_RECTS(pGC->pCompositeClip)) return; \
36 pGC->funcs = pGCPriv->wrapFuncs;\
37 pGC->ops = pGCPriv->wrapOps
38
39
40#define XAA_GC_OP_EPILOGUE(pGC)\
41 pGCPriv->wrapOps = pGC->ops;\
42 pGC->funcs = oldFuncs;\
43 pGC->ops = pGCPriv->XAAOps
44
45
46#define XAA_PIXMAP_OP_PROLOGUE(pGC, pDraw)\
47 XAAGCPtr pGCPriv = (XAAGCPtr)(pGC->devPrivates[XAAGetGCIndex()].ptr);\
48 XAAPixmapPtr pixPriv = XAA_GET_PIXMAP_PRIVATE((PixmapPtr)(pDraw));\
49 GCFuncs *oldFuncs = pGC->funcs;\
50 pGC->funcs = pGCPriv->wrapFuncs;\
51 pGC->ops = pGCPriv->wrapOps
52
53
54#define XAA_PIXMAP_OP_EPILOGUE(pGC)\
55 pGCPriv->wrapOps = pGC->ops;\
56 pGC->funcs = oldFuncs;\
57 pGC->ops = &XAAPixmapOps;\
58 pixPriv->flags |= DIRTY
59
60#ifdef HAVE_XORG_CONFIG_H
61#include <xorg-config.h>
62#endif
63
64#ifdef RENDER
65#define XAA_RENDER_PROLOGUE(pScreen,field)\
66 (GetPictureScreen(pScreen)->field = \
67 ((XAAScreenPtr) (pScreen)->devPrivates[XAAGetScreenIndex()].ptr)->field)
68
69#define XAA_RENDER_EPILOGUE(pScreen, field, wrapper)\
70 (GetPictureScreen(pScreen)->field = wrapper)
71#endif
72
73/* This also works fine for drawables */
74
75#define SYNC_CHECK(pGC) {\
76 XAAInfoRecPtr infoRec =\
77((XAAScreenPtr)((pGC)->pScreen->devPrivates[XAAGetScreenIndex()].ptr))->AccelInfoRec;\
78 if(infoRec->NeedToSync) {\
79 (*infoRec->Sync)(infoRec->pScrn);\
80 infoRec->NeedToSync = FALSE;\
81 }}
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