summaryrefslogtreecommitdiffstats
path: root/opengl/java
diff options
context:
space:
mode:
Diffstat (limited to 'opengl/java')
-rw-r--r--opengl/java/android/opengl/GLSurfaceView.java16
1 files changed, 6 insertions, 10 deletions
diff --git a/opengl/java/android/opengl/GLSurfaceView.java b/opengl/java/android/opengl/GLSurfaceView.java
index 235829e..dac3506 100644
--- a/opengl/java/android/opengl/GLSurfaceView.java
+++ b/opengl/java/android/opengl/GLSurfaceView.java
@@ -245,7 +245,7 @@ public class GLSurfaceView extends SurfaceView implements SurfaceHolder.Callback
if (mGLThread != null) {
// GLThread may still be running if this view was never
// attached to a window.
- mGLThread.requestExitAndWait();
+ mGLThread.quitSafely();
}
} finally {
super.finalize();
@@ -628,7 +628,11 @@ public class GLSurfaceView extends SurfaceView implements SurfaceHolder.Callback
Log.d(TAG, "onDetachedFromWindow");
}
if (mGLThread != null) {
- mGLThread.requestExitAndWait();
+ mGLThread.quitSafely();
+ try {
+ mGLThread.join();
+ } catch (InterruptedException ex) {
+ }
}
mDetached = true;
super.onDetachedFromWindow();
@@ -1627,14 +1631,6 @@ public class GLSurfaceView extends SurfaceView implements SurfaceHolder.Callback
mGLHandler.runWithScissors(mGetRenderModeRunnable, 0);
return mGetRenderModeRunnable.renderMode;
}
-
- public void requestExitAndWait() {
- getLooper().quit();
- try {
- this.join();
- } catch (InterruptedException e) {
- }
- }
} // class GLThread
static class LogWriter extends Writer {