diff options
author | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2019-12-12 06:05:21 +0000 |
---|---|---|
committer | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2019-12-12 06:05:21 +0000 |
commit | dff4a3473cbf3db68b2fa5b43e51f8c05ae6b029 (patch) | |
tree | ae898a699dbc977738010eaae623435d2ccee50a /xserver/glamor | |
parent | 005295117c63143b3bf6d69d4503b360e660cf49 (diff) |
Update to X server 1.20.6. Tested by naddy@
Diffstat (limited to 'xserver/glamor')
-rw-r--r-- | xserver/glamor/glamor_egl.c | 19 | ||||
-rw-r--r-- | xserver/glamor/glamor_egl.h | 1 | ||||
-rw-r--r-- | xserver/glamor/glamor_priv.h | 1 |
3 files changed, 16 insertions, 5 deletions
diff --git a/xserver/glamor/glamor_egl.c b/xserver/glamor/glamor_egl.c index a78e7104b..366991d2c 100644 --- a/xserver/glamor/glamor_egl.c +++ b/xserver/glamor/glamor_egl.c @@ -355,8 +355,8 @@ glamor_make_pixmap_exportable(PixmapPtr pixmap, Bool modifiers_ok) return TRUE; } -struct gbm_bo * -glamor_gbm_bo_from_pixmap(ScreenPtr screen, PixmapPtr pixmap) +static struct gbm_bo * +glamor_gbm_bo_from_pixmap_internal(ScreenPtr screen, PixmapPtr pixmap) { struct glamor_egl_screen_private *glamor_egl = glamor_egl_get_screen_private(xf86ScreenToScrn(screen)); @@ -370,6 +370,15 @@ glamor_gbm_bo_from_pixmap(ScreenPtr screen, PixmapPtr pixmap) pixmap_priv->image, 0); } +struct gbm_bo * +glamor_gbm_bo_from_pixmap(ScreenPtr screen, PixmapPtr pixmap) +{ + if (!glamor_make_pixmap_exportable(pixmap, TRUE)) + return NULL; + + return glamor_gbm_bo_from_pixmap_internal(screen, pixmap); +} + int glamor_egl_fds_from_pixmap(ScreenPtr screen, PixmapPtr pixmap, int *fds, uint32_t *strides, uint32_t *offsets, @@ -385,7 +394,7 @@ glamor_egl_fds_from_pixmap(ScreenPtr screen, PixmapPtr pixmap, int *fds, if (!glamor_make_pixmap_exportable(pixmap, TRUE)) return 0; - bo = glamor_gbm_bo_from_pixmap(screen, pixmap); + bo = glamor_gbm_bo_from_pixmap_internal(screen, pixmap); if (!bo) return 0; @@ -423,7 +432,7 @@ glamor_egl_fd_from_pixmap(ScreenPtr screen, PixmapPtr pixmap, if (!glamor_make_pixmap_exportable(pixmap, FALSE)) return -1; - bo = glamor_gbm_bo_from_pixmap(screen, pixmap); + bo = glamor_gbm_bo_from_pixmap_internal(screen, pixmap); if (!bo) return -1; @@ -452,7 +461,7 @@ glamor_egl_fd_name_from_pixmap(ScreenPtr screen, if (!glamor_make_pixmap_exportable(pixmap, FALSE)) goto failure; - bo = glamor_gbm_bo_from_pixmap(screen, pixmap); + bo = glamor_gbm_bo_from_pixmap_internal(screen, pixmap); if (!bo) goto failure; diff --git a/xserver/glamor/glamor_egl.h b/xserver/glamor/glamor_egl.h index 2f7566b24..8f6ed7840 100644 --- a/xserver/glamor/glamor_egl.h +++ b/xserver/glamor/glamor_egl.h @@ -28,6 +28,7 @@ #define GLAMOR_EGL_H #define MESA_EGL_NO_X11_HEADERS +#define EGL_NO_X11 #include <epoxy/gl.h> #include <epoxy/egl.h> #include <glamor_egl_ext.h> diff --git a/xserver/glamor/glamor_priv.h b/xserver/glamor/glamor_priv.h index 7d9a7d4fb..661c11d90 100644 --- a/xserver/glamor/glamor_priv.h +++ b/xserver/glamor/glamor_priv.h @@ -40,6 +40,7 @@ #include <epoxy/gl.h> #ifdef GLAMOR_HAS_GBM #define MESA_EGL_NO_X11_HEADERS +#define EGL_NO_X11 #include <epoxy/egl.h> #endif |