summaryrefslogtreecommitdiffstats
path: root/opengl/java/android
diff options
context:
space:
mode:
Diffstat (limited to 'opengl/java/android')
-rw-r--r--opengl/java/android/opengl/GLSurfaceView.java15
1 files changed, 8 insertions, 7 deletions
diff --git a/opengl/java/android/opengl/GLSurfaceView.java b/opengl/java/android/opengl/GLSurfaceView.java
index cbe5be4..f11123e 100644
--- a/opengl/java/android/opengl/GLSurfaceView.java
+++ b/opengl/java/android/opengl/GLSurfaceView.java
@@ -1299,9 +1299,16 @@ public class GLSurfaceView extends SurfaceView implements SurfaceHolder.Callback
GLThread oldThread = null;
synchronized(this) {
- mMostRecentGLThread = thread;
oldThread = mMostRecentGLThread;
+ mMostRecentGLThread = thread;
+ }
+ if (oldThread != null && ! mMultipleGLESContextsAllowed) {
+ synchronized(oldThread) {
+ oldThread.notifyAll();
+ }
+ }
+ synchronized(this) {
while ((! mMultipleGLESContextsAllowed)
&& mGLContextCount > 0) {
wait();
@@ -1309,12 +1316,6 @@ public class GLSurfaceView extends SurfaceView implements SurfaceHolder.Callback
mGLContextCount++;
}
-
- if (oldThread != null && ! mMultipleGLESContextsAllowed) {
- synchronized(oldThread) {
- oldThread.notifyAll();
- }
- }
}
public synchronized void end(GLThread thread) {