VirtualBox

source: vbox/trunk/src/VBox/Additions/x11/x11include/xorg-server-1.5.3/dristruct.h@ 99743

Last change on this file since 99743 was 17471, checked in by vboxsync, 16 years ago

export to OSE

  • Property svn:eol-style set to native
File size: 4.5 KB
Line 
1/**************************************************************************
2
3Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas.
4All Rights Reserved.
5
6Permission is hereby granted, free of charge, to any person obtaining a
7copy of this software and associated documentation files (the
8"Software"), to deal in the Software without restriction, including
9without limitation the rights to use, copy, modify, merge, publish,
10distribute, sub license, and/or sell copies of the Software, and to
11permit persons to whom the Software is furnished to do so, subject to
12the following conditions:
13
14The above copyright notice and this permission notice (including the
15next paragraph) shall be included in all copies or substantial portions
16of the Software.
17
18THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
19OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
20MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
21IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR
22ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
23TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
24SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
25
26**************************************************************************/
27
28/*
29 * Authors:
30 * Jens Owen <[email protected]>
31 *
32 */
33
34#ifndef DRI_STRUCT_H
35#define DRI_STRUCT_H
36
37#include "xf86drm.h"
38
39
40#define DRI_DRAWABLE_PRIV_FROM_WINDOW(pWin) ((DRIDrawablePrivPtr) \
41 dixLookupPrivate(&(pWin)->devPrivates, DRIWindowPrivKey))
42#define DRI_DRAWABLE_PRIV_FROM_PIXMAP(pPix) ((DRIDrawablePrivPtr) \
43 dixLookupPrivate(&(pPix)->devPrivates, DRIWindowPrivKey))
44
45typedef struct _DRIDrawablePrivRec
46{
47 drm_drawable_t hwDrawable;
48 int drawableIndex;
49 ScreenPtr pScreen;
50 int refCount;
51 int nrects;
52} DRIDrawablePrivRec, *DRIDrawablePrivPtr;
53
54struct _DRIContextPrivRec
55{
56 drm_context_t hwContext;
57 ScreenPtr pScreen;
58 Bool valid3D;
59 DRIContextFlags flags;
60 void** pContextStore;
61};
62
63#define DRI_SCREEN_PRIV(pScreen) ((DRIScreenPrivPtr) \
64 dixLookupPrivate(&(pScreen)->devPrivates, DRIScreenPrivKey))
65
66#define DRI_SCREEN_PRIV_FROM_INDEX(screenIndex) ((DRIScreenPrivPtr) \
67 dixLookupPrivate(&screenInfo.screens[screenIndex]->devPrivates, \
68 DRIScreenPrivKey))
69
70#define DRI_ENT_PRIV(pScrn) \
71 ((DRIEntPrivIndex < 0) ? \
72 NULL: \
73 ((DRIEntPrivPtr)(xf86GetEntityPrivate((pScrn)->entityList[0], \
74 DRIEntPrivIndex)->ptr)))
75
76typedef struct _DRIScreenPrivRec
77{
78 Bool directRenderingSupport;
79 int drmFD; /* File descriptor for /dev/video/? */
80 drm_handle_t hSAREA; /* Handle to SAREA, for mapping */
81 XF86DRISAREAPtr pSAREA; /* Mapped pointer to SAREA */
82 drm_context_t myContext; /* DDX Driver's context */
83 DRIContextPrivPtr myContextPriv;/* Pointer to server's private area */
84 DRIContextPrivPtr lastPartial3DContext; /* last one partially saved */
85 void** hiddenContextStore; /* hidden X context */
86 void** partial3DContextStore; /* parital 3D context */
87 DRIInfoPtr pDriverInfo;
88 int nrWindows;
89 int nrWindowsVisible;
90 int nrWalked;
91 drm_clip_rect_t private_buffer_rect; /* management of private buffers */
92 DrawablePtr fullscreen; /* pointer to fullscreen drawable */
93 drm_clip_rect_t fullscreen_rect; /* fake rect for fullscreen mode */
94 DRIWrappedFuncsRec wrap;
95 DestroyWindowProcPtr DestroyWindow;
96 DrawablePtr DRIDrawables[SAREA_MAX_DRAWABLES];
97 DRIContextPrivPtr dummyCtxPriv; /* Pointer to dummy context */
98 Bool createDummyCtx;
99 Bool createDummyCtxPriv;
100 Bool grabbedDRILock;
101 Bool drmSIGIOHandlerInstalled;
102 Bool wrapped;
103 Bool windowsTouched;
104 int lockRefCount;
105 drm_handle_t hLSAREA; /* Handle to SAREA containing lock, for mapping */
106 XF86DRILSAREAPtr pLSAREA; /* Mapped pointer to SAREA containing lock */
107 int* pLockRefCount;
108 int* pLockingContext;
109} DRIScreenPrivRec, *DRIScreenPrivPtr;
110
111
112typedef struct _DRIEntPrivRec {
113 int drmFD;
114 Bool drmOpened;
115 Bool sAreaGrabbed;
116 drm_handle_t hLSAREA;
117 XF86DRILSAREAPtr pLSAREA;
118 unsigned long sAreaSize;
119 int lockRefCount;
120 int lockingContext;
121 ScreenPtr resOwner;
122 Bool keepFDOpen;
123 int refCount;
124} DRIEntPrivRec, *DRIEntPrivPtr;
125
126#endif /* DRI_STRUCT_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