Skip to content

Commit 8b854cd

Browse files
committed
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
1 parent 6c25ffb commit 8b854cd

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

opengl/java/android/opengl/GLSurfaceView.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1841,7 +1841,7 @@ public synchronized void checkGLDriver(GL10 gl) {
18411841
! renderer.startsWith(kMSM7K_RENDERER_PREFIX);
18421842
notifyAll();
18431843
}
1844-
mLimitedGLESContexts = !mMultipleGLESContextsAllowed || renderer.startsWith(kADRENO);
1844+
mLimitedGLESContexts = !mMultipleGLESContextsAllowed;
18451845
if (LOG_SURFACE) {
18461846
Log.w(TAG, "checkGLDriver renderer = \"" + renderer + "\" multipleContextsAllowed = "
18471847
+ mMultipleGLESContextsAllowed
@@ -1867,6 +1867,11 @@ private void checkGLESVersion() {
18671867
}
18681868
}
18691869

1870+
/**
1871+
* This check was required for some pre-Android-3.0 hardware. Android 3.0 provides
1872+
* support for hardware-accelerated views, therefore multiple EGL contexts are
1873+
* supported on all Android 3.0+ EGL drivers.
1874+
*/
18701875
private boolean mGLESVersionCheckComplete;
18711876
private int mGLESVersion;
18721877
private boolean mGLESDriverCheckComplete;
@@ -1875,7 +1880,6 @@ private void checkGLESVersion() {
18751880
private static final int kGLES_20 = 0x20000;
18761881
private static final String kMSM7K_RENDERER_PREFIX =
18771882
"Q3Dimension MSM7500 ";
1878-
private static final String kADRENO = "Adreno";
18791883
private GLThread mEglOwner;
18801884
}
18811885

0 commit comments

Comments
 (0)