Bug 950203 - Correctly handle EGL_NO_SURFACE result from eglCreateWindowSurface - r=kats
This commit is contained in:
@@ -301,10 +301,18 @@ public class GLController {
|
||||
initEGL();
|
||||
try {
|
||||
mEGLSurfaceForCompositor = mEGL.eglCreateWindowSurface(mEGLDisplay, mEGLConfig, mView.getNativeWindow(), null);
|
||||
// In failure cases, eglCreateWindowSurface should return EGL_NO_SURFACE.
|
||||
// We currently normalize this to null, and compare to null in all our checks.
|
||||
if (mEGLSurfaceForCompositor == EGL10.EGL_NO_SURFACE) {
|
||||
mEGLSurfaceForCompositor = null;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
Log.e(LOGTAG, "eglCreateWindowSurface threw", e);
|
||||
}
|
||||
}
|
||||
if (mEGLSurfaceForCompositor == null) {
|
||||
Log.w(LOGTAG, "eglCreateWindowSurface returned no surface!");
|
||||
}
|
||||
return mEGLSurfaceForCompositor != null;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user