mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 950203 - Correctly handle EGL_NO_SURFACE result from eglCreateWindowSurface - r=kats
This commit is contained in:
parent
db7b17af4c
commit
6d741f377e
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user