VirtualBox

source: vbox/trunk/src/VBox/Additions/x11/x11include/xorg-server-1.0.1/exaPriv.h

最後變更 在這個檔案是 51223,由 vboxsync 提交於 11 年 前

Additions/x11/x11include: added header files for X.Org Server 1.0 and 1.1.

  • 屬性 svn:eol-style 設為 native
檔案大小: 8.6 KB
 
1/*
2 *
3 * Copyright (C) 2000 Keith Packard, member of The XFree86 Project, Inc.
4 * 2005 Zack Rusin, Trolltech
5 *
6 * Permission to use, copy, modify, distribute, and sell this software and its
7 * documentation for any purpose is hereby granted without fee, provided that
8 * the above copyright notice appear in all copies and that both that
9 * copyright notice and this permission notice appear in supporting
10 * documentation, and that the name of Keith Packard not be used in
11 * advertising or publicity pertaining to distribution of the software without
12 * specific, written prior permission. Keith Packard makes no
13 * representations about the suitability of this software for any purpose. It
14 * is provided "as is" without express or implied warranty.
15 *
16 * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
17 * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
18 * FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY
19 * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
20 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
21 * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
22 * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
23 * SOFTWARE.
24 */
25
26#ifndef EXAPRIV_H
27#define EXAPRIV_H
28
29#ifdef HAVE_XORG_CONFIG_H
30#include <xorg-config.h>
31#endif
32
33#include "exa.h"
34
35#include <X11/X.h>
36#define NEED_EVENTS
37#include <X11/Xproto.h>
38#include "scrnintstr.h"
39#include "pixmapstr.h"
40#include "windowstr.h"
41#include "servermd.h"
42#include "mibstore.h"
43#include "colormapst.h"
44#include "gcstruct.h"
45#include "input.h"
46#include "mipointer.h"
47#include "mi.h"
48#include "dix.h"
49#include "fb.h"
50#include "fboverlay.h"
51#ifdef RENDER
52#include "fbpict.h"
53#endif
54
55#define DEBUG_TRACE_FALL 0
56#define DEBUG_MIGRATE 0
57#define DEBUG_PIXMAP 0
58#define DEBUG_OFFSCREEN 0
59
60#if DEBUG_TRACE_FALL
61#define EXA_FALLBACK(x) \
62do { \
63 ErrorF("EXA fallback at %s: ", __FUNCTION__); \
64 ErrorF x; \
65} while (0)
66#else
67#define EXA_FALLBACK(x)
68#endif
69
70#ifndef EXA_MAX_FB
71#define EXA_MAX_FB FB_OVERLAY_MAX
72#endif
73
74typedef void (*EnableDisableFBAccessProcPtr)(int, Bool);
75typedef struct {
76 ExaDriverPtr info;
77 CreateGCProcPtr SavedCreateGC;
78 CloseScreenProcPtr SavedCloseScreen;
79 GetImageProcPtr SavedGetImage;
80 GetSpansProcPtr SavedGetSpans;
81 PaintWindowBackgroundProcPtr SavedPaintWindowBackground;
82 CreatePixmapProcPtr SavedCreatePixmap;
83 DestroyPixmapProcPtr SavedDestroyPixmap;
84 PaintWindowBorderProcPtr SavedPaintWindowBorder;
85 CopyWindowProcPtr SavedCopyWindow;
86#ifdef RENDER
87 CompositeProcPtr SavedComposite;
88 GlyphsProcPtr SavedGlyphs;
89#endif
90 EnableDisableFBAccessProcPtr SavedEnableDisableFBAccess;
91 Bool wrappedEnableDisableFB;
92 Bool swappedOut;
93} ExaScreenPrivRec, *ExaScreenPrivPtr;
94
95/*
96 * This is the only completely portable way to
97 * compute this info.
98 */
99#ifndef BitsPerPixel
100#define BitsPerPixel(d) (\
101 PixmapWidthPaddingInfo[d].notPower2 ? \
102 (PixmapWidthPaddingInfo[d].bytesPerPixel * 8) : \
103 ((1 << PixmapWidthPaddingInfo[d].padBytesLog2) * 8 / \
104 (PixmapWidthPaddingInfo[d].padRoundUp+1)))
105#endif
106
107extern int exaScreenPrivateIndex;
108extern int exaPixmapPrivateIndex;
109#define ExaGetScreenPriv(s) ((ExaScreenPrivPtr)(s)->devPrivates[exaScreenPrivateIndex].ptr)
110#define ExaScreenPriv(s) ExaScreenPrivPtr pExaScr = ExaGetScreenPriv(s)
111
112#define ExaGetPixmapPriv(p) ((ExaPixmapPrivPtr)(p)->devPrivates[exaPixmapPrivateIndex].ptr)
113#define ExaSetPixmapPriv(p,a) ((p)->devPrivates[exaPixmapPrivateIndex].ptr = (pointer) (a))
114#define ExaPixmapPriv(p) ExaPixmapPrivPtr pExaPixmap = ExaGetPixmapPriv(p)
115
116typedef struct {
117 ExaOffscreenArea *area;
118 int score;
119 int devKind;
120 DevUnion devPrivate;
121
122 /* If area is NULL, then dirty == TRUE means that the pixmap has been
123 * modified, so the contents are defined. Used to avoid uploads of
124 * undefined data.
125 * If area is non-NULL, then dirty == TRUE means that the in-framebuffer
126 * copy has been changed from the system-memory copy. Used to avoid
127 * downloads of unmodified data.
128 */
129 Bool dirty;
130 unsigned int size;
131} ExaPixmapPrivRec, *ExaPixmapPrivPtr;
132
133
134/* exaasync.c */
135void
136ExaCheckFillSpans (DrawablePtr pDrawable, GCPtr pGC, int nspans,
137 DDXPointPtr ppt, int *pwidth, int fSorted);
138
139void
140ExaCheckSetSpans (DrawablePtr pDrawable, GCPtr pGC, char *psrc,
141 DDXPointPtr ppt, int *pwidth, int nspans, int fSorted);
142
143void
144ExaCheckPutImage (DrawablePtr pDrawable, GCPtr pGC, int depth,
145 int x, int y, int w, int h, int leftPad, int format,
146 char *bits);
147
148RegionPtr
149ExaCheckCopyArea (DrawablePtr pSrc, DrawablePtr pDst, GCPtr pGC,
150 int srcx, int srcy, int w, int h, int dstx, int dsty);
151
152RegionPtr
153ExaCheckCopyPlane (DrawablePtr pSrc, DrawablePtr pDst, GCPtr pGC,
154 int srcx, int srcy, int w, int h, int dstx, int dsty,
155 unsigned long bitPlane);
156
157void
158ExaCheckPolyPoint (DrawablePtr pDrawable, GCPtr pGC, int mode, int npt,
159 DDXPointPtr pptInit);
160
161void
162ExaCheckPolylines (DrawablePtr pDrawable, GCPtr pGC,
163 int mode, int npt, DDXPointPtr ppt);
164
165void
166ExaCheckPolySegment (DrawablePtr pDrawable, GCPtr pGC,
167 int nsegInit, xSegment *pSegInit);
168
169void
170ExaCheckPolyRectangle (DrawablePtr pDrawable, GCPtr pGC,
171 int nrects, xRectangle *prect);
172
173void
174ExaCheckPolyArc (DrawablePtr pDrawable, GCPtr pGC,
175 int narcs, xArc *pArcs);
176
177#define ExaCheckFillPolygon miFillPolygon
178
179void
180ExaCheckPolyFillRect (DrawablePtr pDrawable, GCPtr pGC,
181 int nrect, xRectangle *prect);
182
183void
184ExaCheckPolyFillArc (DrawablePtr pDrawable, GCPtr pGC,
185 int narcs, xArc *pArcs);
186
187void
188ExaCheckImageGlyphBlt (DrawablePtr pDrawable, GCPtr pGC,
189 int x, int y, unsigned int nglyph,
190 CharInfoPtr *ppci, pointer pglyphBase);
191
192void
193ExaCheckPolyGlyphBlt (DrawablePtr pDrawable, GCPtr pGC,
194 int x, int y, unsigned int nglyph,
195 CharInfoPtr *ppci, pointer pglyphBase);
196
197void
198ExaCheckPushPixels (GCPtr pGC, PixmapPtr pBitmap,
199 DrawablePtr pDrawable,
200 int w, int h, int x, int y);
201
202void
203ExaCheckGetImage (DrawablePtr pDrawable,
204 int x, int y, int w, int h,
205 unsigned int format, unsigned long planeMask,
206 char *d);
207
208void
209ExaCheckGetSpans (DrawablePtr pDrawable,
210 int wMax,
211 DDXPointPtr ppt,
212 int *pwidth,
213 int nspans,
214 char *pdstStart);
215
216void
217ExaCheckSaveAreas (PixmapPtr pPixmap,
218 RegionPtr prgnSave,
219 int xorg,
220 int yorg,
221 WindowPtr pWin);
222
223void
224ExaCheckRestoreAreas (PixmapPtr pPixmap,
225 RegionPtr prgnSave,
226 int xorg,
227 int yorg,
228 WindowPtr pWin);
229
230void
231ExaCheckPaintWindow (WindowPtr pWin, RegionPtr pRegion, int what);
232
233extern const GCOps exaAsyncPixmapGCOps;
234
235#ifdef RENDER
236void
237ExaCheckComposite (CARD8 op,
238 PicturePtr pSrc,
239 PicturePtr pMask,
240 PicturePtr pDst,
241 INT16 xSrc,
242 INT16 ySrc,
243 INT16 xMask,
244 INT16 yMask,
245 INT16 xDst,
246 INT16 yDst,
247 CARD16 width,
248 CARD16 height);
249#endif
250
251/* exaoffscreen.c */
252void
253ExaOffscreenMarkUsed (PixmapPtr pPixmap);
254
255void
256ExaOffscreenSwapOut (ScreenPtr pScreen);
257
258void
259ExaOffscreenSwapIn (ScreenPtr pScreen);
260
261void
262ExaOffscreenFini (ScreenPtr pScreen);
263
264void
265exaEnableDisableFBAccess (int index, Bool enable);
266
267/* exa.c */
268void
269exaDrawableUseScreen(DrawablePtr pDrawable);
270
271void
272exaDrawableUseMemory(DrawablePtr pDrawable);
273
274void
275exaPixmapUseScreen (PixmapPtr pPixmap);
276
277void
278exaPixmapUseMemory (PixmapPtr pPixmap);
279
280void
281exaPrepareAccess(DrawablePtr pDrawable, int index);
282
283void
284exaFinishAccess(DrawablePtr pDrawable, int index);
285
286void
287exaDrawableDirty(DrawablePtr pDrawable);
288
289Bool
290exaDrawableIsOffscreen (DrawablePtr pDrawable);
291
292Bool
293exaPixmapIsOffscreen(PixmapPtr p);
294
295PixmapPtr
296exaGetOffscreenPixmap (DrawablePtr pDrawable, int *xp, int *yp);
297
298void
299exaMoveInPixmap (PixmapPtr pPixmap);
300
301RegionPtr
302exaCopyArea(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, GCPtr pGC,
303 int srcx, int srcy, int width, int height, int dstx, int dsty);
304
305void
306exaCopyNtoN (DrawablePtr pSrcDrawable,
307 DrawablePtr pDstDrawable,
308 GCPtr pGC,
309 BoxPtr pbox,
310 int nbox,
311 int dx,
312 int dy,
313 Bool reverse,
314 Bool upsidedown,
315 Pixel bitplane,
316 void *closure);
317
318void
319exaComposite(CARD8 op,
320 PicturePtr pSrc,
321 PicturePtr pMask,
322 PicturePtr pDst,
323 INT16 xSrc,
324 INT16 ySrc,
325 INT16 xMask,
326 INT16 yMask,
327 INT16 xDst,
328 INT16 yDst,
329 CARD16 width,
330 CARD16 height);
331
332void
333exaGlyphs (CARD8 op,
334 PicturePtr pSrc,
335 PicturePtr pDst,
336 PictFormatPtr maskFormat,
337 INT16 xSrc,
338 INT16 ySrc,
339 int nlist,
340 GlyphListPtr list,
341 GlyphPtr *glyphs);
342
343#endif /* EXAPRIV_H */
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette