diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2014-07-18 07:14:19 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2014-07-18 07:37:20 +0100 |
commit | fac6845820e49dbbea2a625b7bb745d8f9159b56 (patch) | |
tree | 2fca7660dcf759237054d49d1762ace5c15c1868 | |
parent | 923e098f5f830c30b93d6f85d4f812201bdcb206 (diff) |
sna/dri2: Protect compsiteext.h include with build check
We shouldn't include calls to the composite extension if it has not been
built.
Reported-by: Ben Widawsky <ben@bwidawsk.net>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r-- | src/sna/sna_dri2.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/sna/sna_dri2.c b/src/sna/sna_dri2.c index 286be66b..69496c3d 100644 --- a/src/sna/sna_dri2.c +++ b/src/sna/sna_dri2.c @@ -48,8 +48,9 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. #include <xf86drm.h> #include <i915_drm.h> #include <dri2.h> -#if XORG_VERSION_CURRENT >= XORG_VERSION_NUMERIC(1,12,99,901,0) +#if XORG_VERSION_CURRENT >= XORG_VERSION_NUMERIC(1,12,99,901,0) && defined(COMPOSITE) #include <compositeext.h> +#define CHECK_FOR_COMPOSITOR #endif #define DBG_CAN_FLIP 1 @@ -2425,7 +2426,7 @@ get_current_msc(struct sna *sna, DrawablePtr draw, xf86CrtcPtr crtc) return draw_current_msc(draw, crtc, ret); } -#if XORG_VERSION_CURRENT >= XORG_VERSION_NUMERIC(1,12,99,901,0) +#if defined(CHECK_FOR_COMPOSITOR) static Bool find(pointer value, XID id, pointer cdata) { return TRUE; @@ -2450,7 +2451,7 @@ static int use_triple_buffer(struct sna *sna, ClientPtr client, bool async) return FLIP_THROTTLE; } -#if XORG_VERSION_CURRENT >= XORG_VERSION_NUMERIC(1,12,99,901,0) +#if defined(CHECK_FOR_COMPOSITOR) /* Hack: Disable triple buffering for compositors */ { struct sna_client *priv = sna_client(client); |