From 24f09c642a6aaea57b535c14a5136f366e027593 Mon Sep 17 00:00:00 2001
From: Antia Puentes <apuentes@igalia.com>
Date: Fri, 7 Feb 2014 18:12:57 +0100
Subject: [PATCH] gl: Test for GL_EXT_bgra in addition to
 GL_EXT_texture_format_BGRA8888.

Some drivers don't expose the OpenGL ES extension
GL_EXT_texture_format_BGRA8888, but its OpenGL
superset GL_EXT_bgra.
---
 src/cairo-gl-device.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/cairo-gl-device.c b/src/cairo-gl-device.c
index 054f145..650127c 100644
--- a/src/cairo-gl-device.c
+++ b/src/cairo-gl-device.c
@@ -236,7 +236,8 @@ _cairo_gl_context_init (cairo_gl_context_t *ctx)
 	! _cairo_gl_has_extension ("GL_ARB_pixel_buffer_object"))
 	return _cairo_error (CAIRO_STATUS_DEVICE_ERROR);
 
-    if (is_gles && ! _cairo_gl_has_extension ("GL_EXT_texture_format_BGRA8888"))
+    if (is_gles && ! (_cairo_gl_has_extension ("GL_EXT_texture_format_BGRA8888") ||
+                      _cairo_gl_has_extension ("GL_EXT_bgra")))
 	return _cairo_error (CAIRO_STATUS_DEVICE_ERROR);
 
     ctx->has_map_buffer =
-- 
1.8.1.2

