diff options
author | Keith Packard <keithp@keithp.com> | 2014-09-13 01:09:48 -0700 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2014-09-13 10:53:02 -0700 |
commit | 11444619457aa8121efc937291f1d944ac42265d (patch) | |
tree | 4dd61e734d311544712728ab1b0c81c3155780f3 /src/uxa | |
parent | 48f6406a62c06a09b173d82b8eb79761188ff717 (diff) |
glamor: Do version check for fd <-> pixmap functions
glamor_pixmap_from_fd and glamor_fd_from_pixmap were added before
version 1.15.99.902, so check for that version before trying to use them.
Signed-off-by: Keith Packard <keithp@keithp.com>
Tested-by: Fabio Pedretti <fabio.ped@libero.it>
Diffstat (limited to 'src/uxa')
-rw-r--r-- | src/uxa/intel_glamor.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/uxa/intel_glamor.c b/src/uxa/intel_glamor.c index 2a78c216..286f3655 100644 --- a/src/uxa/intel_glamor.c +++ b/src/uxa/intel_glamor.c @@ -146,12 +146,14 @@ intel_glamor_pixmap_from_fd(ScreenPtr screen, CARD8 depth, CARD8 bpp) { +#if XORG_VERSION_CURRENT >= XORG_VERSION_NUMERIC(1,15,99,902,0) ScrnInfoPtr scrn = xf86ScreenToScrn(screen); intel_screen_private *intel = intel_get_screen_private(scrn); if (intel->uxa_flags & UXA_USE_GLAMOR) return glamor_pixmap_from_fd(screen, fd, width, height, stride, depth, bpp); else +#endif return NULL; } @@ -159,12 +161,14 @@ int intel_glamor_fd_from_pixmap(ScreenPtr screen, PixmapPtr pixmap, CARD16 *stride, CARD32 *size) { +#if XORG_VERSION_CURRENT >= XORG_VERSION_NUMERIC(1,15,99,902,0) ScrnInfoPtr scrn = xf86ScreenToScrn(screen); intel_screen_private *intel = intel_get_screen_private(scrn); if (intel->uxa_flags & UXA_USE_GLAMOR) return glamor_fd_from_pixmap(screen, pixmap, stride, size); else +#endif return -1; } |