2 * Copyright © 2013 Keith Packard
4 * Permission to use, copy, modify, distribute, and sell this software and its
5 * documentation for any purpose is hereby granted without fee, provided that
6 * the above copyright notice appear in all copies and that both that copyright
7 * notice and this permission notice appear in supporting documentation, and
8 * that the name of the copyright holders not be used in advertising or
9 * publicity pertaining to distribution of the software without specific,
10 * written prior permission. The copyright holders make no representations
11 * about the suitability of this software for any purpose. It is provided "as
12 * is" without express or implied warranty.
14 * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
15 * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
16 * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
17 * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
18 * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
19 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
27 #include "scrnintstr.h"
30 #include "windowstr.h"
31 #include "dixstruct.h"
35 extern int dri3_request
;
37 extern DevPrivateKeyRec dri3_screen_private_key
;
39 typedef struct dri3_screen_priv
{
40 CloseScreenProcPtr CloseScreen
;
41 ConfigNotifyProcPtr ConfigNotify
;
42 DestroyWindowProcPtr DestroyWindow
;
44 dri3_screen_info_ptr info
;
45 } dri3_screen_priv_rec
, *dri3_screen_priv_ptr
;
47 #define wrap(priv,real,mem,func) {\
48 priv->mem = real->mem; \
52 #define unwrap(priv,real,mem) {\
53 real->mem = priv->mem; \
56 static inline dri3_screen_priv_ptr
57 dri3_screen_priv(ScreenPtr screen
)
59 return (dri3_screen_priv_ptr
)dixLookupPrivate(&(screen
)->devPrivates
, &dri3_screen_private_key
);
63 proc_dri3_dispatch(ClientPtr client
);
66 sproc_dri3_dispatch(ClientPtr client
);
71 dri3_open(ClientPtr client
, ScreenPtr screen
, RRProviderPtr provider
, int *fd
);
74 dri3_pixmap_from_fd(PixmapPtr
*ppixmap
, ScreenPtr screen
, int fd
,
75 CARD16 width
, CARD16 height
, CARD16 stride
, CARD8 depth
, CARD8 bpp
);
78 dri3_fd_from_pixmap(int *pfd
, PixmapPtr pixmap
, CARD16
*stride
, CARD32
*size
);
80 #endif /* _DRI3PRIV_H_ */