mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 929506 - Check that the GLContext is not destroyed in MakeCurrent. r=bjacob
This commit is contained in:
parent
9f29252945
commit
7da987c39c
@ -456,7 +456,7 @@ GLContext::InitWithPrefix(const char *prefix, bool trygl)
|
||||
};
|
||||
|
||||
mInitialized = LoadSymbols(&symbols[0], trygl, prefix);
|
||||
|
||||
MakeCurrent();
|
||||
if (mInitialized) {
|
||||
unsigned int version = 0;
|
||||
|
||||
|
@ -2391,6 +2391,9 @@ public:
|
||||
#endif
|
||||
|
||||
bool MakeCurrent(bool aForce = false) {
|
||||
if (IsDestroyed()) {
|
||||
return false;
|
||||
}
|
||||
#ifdef MOZ_ENABLE_GL_TRACKING
|
||||
PR_SetThreadPrivate(sCurrentGLContextTLS, this);
|
||||
|
||||
|
@ -121,7 +121,6 @@ public:
|
||||
|
||||
bool Init()
|
||||
{
|
||||
MakeCurrent();
|
||||
if (!InitWithPrefix("gl", true))
|
||||
return false;
|
||||
|
||||
|
@ -331,6 +331,10 @@ public:
|
||||
#endif
|
||||
}
|
||||
|
||||
SetupLookupFunction();
|
||||
if (!InitWithPrefix("gl", true))
|
||||
return false;
|
||||
|
||||
bool current = MakeCurrent();
|
||||
if (!current) {
|
||||
gfx::LogFailure(NS_LITERAL_CSTRING(
|
||||
@ -338,10 +342,6 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
SetupLookupFunction();
|
||||
if (!InitWithPrefix("gl", true))
|
||||
return false;
|
||||
|
||||
PR_STATIC_ASSERT(sizeof(GLint) >= sizeof(int32_t));
|
||||
mMaxTextureImageSize = INT32_MAX;
|
||||
|
||||
|
@ -861,7 +861,6 @@ TRY_AGAIN_NO_SHARING:
|
||||
|
||||
bool Init()
|
||||
{
|
||||
MakeCurrent();
|
||||
SetupLookupFunction();
|
||||
if (!InitWithPrefix("gl", true)) {
|
||||
return false;
|
||||
|
@ -315,7 +315,6 @@ public:
|
||||
if (!mDC || !mContext)
|
||||
return false;
|
||||
|
||||
MakeCurrent();
|
||||
SetupLookupFunction();
|
||||
if (!InitWithPrefix("gl", true))
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user