Bug 727497 - Don't call CreateSurfaceForWindow in MakeCurrent in EGL. r=ajuma

This commit is contained in:
Benoit Girard 2012-02-15 15:09:15 -05:00
parent bf6b9de292
commit 5ff58afadf

View File

@ -1133,10 +1133,18 @@ public:
// still expensive.
#ifndef MOZ_WIDGET_QT
if (!mSurface) {
EGLConfig config;
CreateConfig(&config);
mSurface = CreateSurfaceForWindow(NULL, config);
aForce = true;
// We need to be able to bind the surface when we don't
// have access to a surface. We wont be drawing to the screen
// but we will be able to do things like resource releases.
succeeded = sEGLLibrary.fMakeCurrent(EGL_DISPLAY(),
EGL_NO_SURFACE, EGL_NO_SURFACE,
EGL_NO_CONTEXT);
if (!succeeded && sEGLLibrary.fGetError() == LOCAL_EGL_CONTEXT_LOST) {
mContextLost = true;
NS_WARNING("EGL context has been lost.");
}
NS_ASSERTION(succeeded, "Failed to make GL context current!");
return succeeded;
}
#endif
if (aForce || sEGLLibrary.fGetCurrentContext() != mContext) {