From 8b854cd74bd29b6bb0b4c681490a3a97b1739289 Mon Sep 17 00:00:00 2001 From: Jack Palevich Date: Mon, 19 Mar 2012 11:17:40 -0700 Subject: Remove EGL context limit for Adreno GPUs. This change allows Adreno GPUs to have multiple EGL contexts. We had to limit this in earlier versions of Android due to limitations in the Adreno GPU driver (only 8 EGL contexts allowed system wide.) That brand of GPU has improved its EGL drivers to support multiple EGL contexts in more recent versions of their drivers used on more recent versions of Android. Bug: 6142005 Change-Id: Id3030466be9a3d9fbe728f1785378c1f05da98fe --- opengl/java/android/opengl/GLSurfaceView.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'opengl/java') diff --git a/opengl/java/android/opengl/GLSurfaceView.java b/opengl/java/android/opengl/GLSurfaceView.java index 8e2294c..3c9fd1d 100644 --- a/opengl/java/android/opengl/GLSurfaceView.java +++ b/opengl/java/android/opengl/GLSurfaceView.java @@ -1841,7 +1841,7 @@ public class GLSurfaceView extends SurfaceView implements SurfaceHolder.Callback ! renderer.startsWith(kMSM7K_RENDERER_PREFIX); notifyAll(); } - mLimitedGLESContexts = !mMultipleGLESContextsAllowed || renderer.startsWith(kADRENO); + mLimitedGLESContexts = !mMultipleGLESContextsAllowed; if (LOG_SURFACE) { Log.w(TAG, "checkGLDriver renderer = \"" + renderer + "\" multipleContextsAllowed = " + mMultipleGLESContextsAllowed @@ -1867,6 +1867,11 @@ public class GLSurfaceView extends SurfaceView implements SurfaceHolder.Callback } } + /** + * This check was required for some pre-Android-3.0 hardware. Android 3.0 provides + * support for hardware-accelerated views, therefore multiple EGL contexts are + * supported on all Android 3.0+ EGL drivers. + */ private boolean mGLESVersionCheckComplete; private int mGLESVersion; private boolean mGLESDriverCheckComplete; @@ -1875,7 +1880,6 @@ public class GLSurfaceView extends SurfaceView implements SurfaceHolder.Callback private static final int kGLES_20 = 0x20000; private static final String kMSM7K_RENDERER_PREFIX = "Q3Dimension MSM7500 "; - private static final String kADRENO = "Adreno"; private GLThread mEglOwner; } -- cgit v1.1