diff options
author | Keith Packard <keithp@keithp.com> | 2014-04-04 16:28:43 -0700 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2014-04-08 13:53:58 -0700 |
commit | 6ec04a75deb1695820e337abbefe1929d5928f15 (patch) | |
tree | 0903165f7fd9a33057ca57f4ead137c1d7d2b1c6 /dri3/dri3.h | |
parent | 901fbfbbbd71c0d82080957f8ba09eebbc786f2b (diff) |
dri3: Fix dri3_open API change by adding new dri3_open_client
Xwayland will eventually need the current client in dri3_open. Simply
changing that API is not an option though as other drivers that
implement DRI3 will not have a matching function signature and will
crash when called.
Add a new dri3_open_client function pointer and bump
DRI3_SCREEN_INFO_VERSION so that drivers can be aware of the new
function which will be used in preference to the old function when
available.
Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Eric Anhole <eric@anholt.net>
Diffstat (limited to 'dri3/dri3.h')
-rw-r--r-- | dri3/dri3.h | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/dri3/dri3.h b/dri3/dri3.h index 1c04cbd2d..edc7fa267 100644 --- a/dri3/dri3.h +++ b/dri3/dri3.h @@ -30,13 +30,17 @@ #include <X11/extensions/dri3proto.h> #include <randrstr.h> -#define DRI3_SCREEN_INFO_VERSION 0 +#define DRI3_SCREEN_INFO_VERSION 1 -typedef int (*dri3_open_proc)(ClientPtr client, - ScreenPtr screen, +typedef int (*dri3_open_proc)(ScreenPtr screen, RRProviderPtr provider, int *fd); +typedef int (*dri3_open_client_proc)(ClientPtr client, + ScreenPtr screen, + RRProviderPtr provider, + int *fd); + typedef PixmapPtr (*dri3_pixmap_from_fd_proc) (ScreenPtr screen, int fd, CARD16 width, @@ -56,6 +60,10 @@ typedef struct dri3_screen_info { dri3_open_proc open; dri3_pixmap_from_fd_proc pixmap_from_fd; dri3_fd_from_pixmap_proc fd_from_pixmap; + + /* Version 1 */ + dri3_open_client_proc open_client; + } dri3_screen_info_rec, *dri3_screen_info_ptr; extern _X_EXPORT Bool |