From a48c654e8207ed820670ea3214a649ff7d92c8a3 Mon Sep 17 00:00:00 2001
From: Mike Playle <mike.playle@realvnc.com>
Date: Fri, 29 Jan 2010 09:52:22 +0000
Subject: Fix glReadPixels() to verify that both x and y are non-negative.

---
 opengl/libagl/texture.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/opengl/libagl/texture.cpp b/opengl/libagl/texture.cpp
index 13d078e..89a19b6 100644
--- a/opengl/libagl/texture.cpp
+++ b/opengl/libagl/texture.cpp
@@ -1467,7 +1467,7 @@ void glReadPixels(
         ogles_error(c, GL_INVALID_VALUE);
         return;
     }
-    if (x<0 || x<0) {
+    if (x<0 || y<0) {
         ogles_error(c, GL_INVALID_VALUE);
         return;
     }
-- 
cgit v1.1


From d08583b05c47e676a5e9a9f4ae58594d75141e62 Mon Sep 17 00:00:00 2001
From: Magnus Landqvist <magnus.landqvist@sonyericsson.com>
Date: Fri, 19 Feb 2010 12:06:59 +0100
Subject: Build software AGL library with correct get_tls() macro for ARMv7
 based platforms

This prevents crashes on snapdragon processors.
---
 opengl/libagl/Android.mk | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/opengl/libagl/Android.mk b/opengl/libagl/Android.mk
index 9837845..518be8b 100644
--- a/opengl/libagl/Android.mk
+++ b/opengl/libagl/Android.mk
@@ -37,6 +37,10 @@ ifeq ($(TARGET_ARCH),arm)
 	LOCAL_CFLAGS += -fstrict-aliasing
 endif
 
+ifeq ($(ARCH_ARM_HAVE_TLS_REGISTER),true)
+    LOCAL_CFLAGS += -DHAVE_ARM_TLS_REGISTER
+endif
+
 ifneq ($(TARGET_SIMULATOR),true)
     # we need to access the private Bionic header <bionic_tls.h>
     LOCAL_C_INCLUDES += bionic/libc/private
-- 
cgit v1.1