summaryrefslogtreecommitdiff
path: root/opengl
diff options
context:
space:
mode:
authorJohn Reck <jreck@google.com>2017-04-21 17:14:45 -0700
committerJohn Reck <jreck@google.com>2017-04-21 17:14:45 -0700
commite7f4286c8a9d301a24d408b820aeec436b0f3423 (patch)
treecd9796155e54c5d7f510e5b2df5106847ef592d1 /opengl
parenta532f4d7f8bda8c304365eb47c28cc2338b642e1 (diff)
downloadbase-e7f4286c8a9d301a24d408b820aeec436b0f3423.tar.gz
Workaround apps that override surfaceCreated
Fixes: 34512969 Test: manual, tested repro in bug and verified basic GLSurfaceView usage in ApiDemos works without warnings Change-Id: I0ce9128874af681e9cfbd3b0b2ef5e2df7080154
Diffstat (limited to 'opengl')
-rw-r--r--opengl/java/android/opengl/GLSurfaceView.java7
1 files changed, 7 insertions, 0 deletions
diff --git a/opengl/java/android/opengl/GLSurfaceView.java b/opengl/java/android/opengl/GLSurfaceView.java
index 329514c0b7fc..0f0a7e9d1314 100644
--- a/opengl/java/android/opengl/GLSurfaceView.java
+++ b/opengl/java/android/opengl/GLSurfaceView.java
@@ -1469,6 +1469,13 @@ public class GLSurfaceView extends SurfaceView implements SurfaceHolder.Callback
}
break;
}
+ } else {
+ if (finishDrawingRunnable != null) {
+ Log.w(TAG, "Warning, !readyToDraw() but waiting for " +
+ "draw finished! Early reporting draw finished.");
+ finishDrawingRunnable.run();
+ finishDrawingRunnable = null;
+ }
}
// By design, this is the only place in a GLThread thread where we wait().
if (LOG_THREADS) {