From aa7f967f2fd2cd6c89785985445b36e71312cdbe Mon Sep 17 00:00:00 2001
From: Luca Barbato <lu_zero@gentoo.org>
Date: Thu, 12 Aug 2010 00:36:23 +0200
Subject: [PATCH] Make openvg backend buildable against openvg 1.0.1

Mesa doesn't implement openvg 1.1 so the openvg.h header doesn't
have VG_A_1 and VG_A_4.
---
 src/cairo-vg-surface.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/src/cairo-vg-surface.c b/src/cairo-vg-surface.c
index acc3f80..d3ed66f 100644
--- a/src/cairo-vg-surface.c
+++ b/src/cairo-vg-surface.c
@@ -258,8 +258,10 @@ _vg_format_to_pixman (VGImageFormat format,
     case VG_lL_8: return 0;
     case VG_A_8: return PIXMAN_a8;
     case VG_BW_1: return PIXMAN_a1;
+#ifdef OPENVG_VERSION_1_1
     case VG_A_1: return PIXMAN_a1;
     case VG_A_4: return PIXMAN_a4;
+#endif
 
 	/* {A,X}RGB channel ordering */
     case VG_sXRGB_8888: return PIXMAN_x8r8g8b8;
@@ -313,8 +315,10 @@ _vg_format_to_content (VGImageFormat format)
     case VG_lRGBA_8888_PRE: return CAIRO_CONTENT_COLOR_ALPHA;
     case VG_lL_8: return CAIRO_CONTENT_ALPHA;
     case VG_A_8: return CAIRO_CONTENT_ALPHA;
+#ifdef OPENVG_VERSION_1_1
     case VG_A_4: return CAIRO_CONTENT_ALPHA;
     case VG_A_1: return CAIRO_CONTENT_ALPHA;
+#endif
     case VG_BW_1: return CAIRO_CONTENT_ALPHA;
 
 	/* {A,X}RGB channel ordering */
-- 
1.7.1
