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. // still expensive.
#ifndef MOZ_WIDGET_QT #ifndef MOZ_WIDGET_QT
if (!mSurface) { if (!mSurface) {
EGLConfig config; // We need to be able to bind the surface when we don't
CreateConfig(&config); // have access to a surface. We wont be drawing to the screen
mSurface = CreateSurfaceForWindow(NULL, config); // but we will be able to do things like resource releases.
aForce = true; 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 #endif
if (aForce || sEGLLibrary.fGetCurrentContext() != mContext) { if (aForce || sEGLLibrary.fGetCurrentContext() != mContext) {