VirtualBox

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

Last change on this file since 86603 was 40349, checked in by vboxsync, 13 years ago

Additions/xorg: support X.Org Server 1.12.

  • Property svn:eol-style set to native
File size: 2.5 KB
Line 
1
2#define XAA_SCREEN_PROLOGUE(pScreen, field)\
3 ((pScreen)->field = \
4 ((XAAScreenPtr)dixLookupPrivate(&(pScreen)->devPrivates, XAAGetScreenKey()))->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)dixLookupPrivate(&(pGC)->devPrivates, XAAGetGCKey()); \
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)dixLookupPrivate(&(pGC)->devPrivates, XAAGetGCKey()); \
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)dixLookupPrivate(&(pGC)->devPrivates, XAAGetGCKey()); \
34 GCFuncs *oldFuncs = pGC->funcs;\
35 if(!RegionNumRects(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)dixLookupPrivate(&(pGC)->devPrivates, XAAGetGCKey()); \
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 SYNC_CHECK(pGC)
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#define XAA_RENDER_PROLOGUE(pScreen,field)\
65 (GetPictureScreen(pScreen)->field = \
66 ((XAAScreenPtr)dixLookupPrivate(&(pScreen)->devPrivates, XAAGetScreenKey()))->field)
67
68#define XAA_RENDER_EPILOGUE(pScreen, field, wrapper)\
69 (GetPictureScreen(pScreen)->field = wrapper)
70
71/* This also works fine for drawables */
72
73#define SYNC_CHECK(pGC) {\
74 XAAInfoRecPtr infoRec =\
75((XAAScreenPtr)dixLookupPrivate(&(pGC)->pScreen->devPrivates, XAAGetScreenKey()))->AccelInfoRec; \
76 if(infoRec->NeedToSync) {\
77 (*infoRec->Sync)(infoRec->pScrn);\
78 infoRec->NeedToSync = FALSE;\
79 }}
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