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
This commit is contained in:
John Reck
2017-04-21 17:14:45 -07:00
parent a532f4d7f8
commit e7f4286c8a

View File

@@ -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) {