mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 727497 - Don't call CreateSurfaceForWindow in MakeCurrent in EGL. r=ajuma
This commit is contained in:
parent
bf6b9de292
commit
5ff58afadf
@ -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) {
|
||||||
|
Loading…
Reference in New Issue
Block a user