mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-05 23:38:38 +09:00
Issue #1354 - Clear the current context when MakeCurrent() fails.
This commit is contained in:
parent
8d600c51ed
commit
9d76eb5791
10 changed files with 81 additions and 95 deletions
|
|
@ -578,6 +578,10 @@ GLContext::LoadFeatureSymbols(const char* prefix, bool trygl, const SymLoadStruc
|
|||
bool
|
||||
GLContext::InitWithPrefixImpl(const char* prefix, bool trygl)
|
||||
{
|
||||
// wglGetProcAddress requires a current context.
|
||||
if (!MakeCurrent(true))
|
||||
return false;
|
||||
|
||||
mWorkAroundDriverBugs = gfxPrefs::WorkAroundDriverBugs();
|
||||
|
||||
const SymLoadStruct coreSymbols[] = {
|
||||
|
|
@ -714,7 +718,6 @@ GLContext::InitWithPrefixImpl(const char* prefix, bool trygl)
|
|||
|
||||
////////////////
|
||||
|
||||
MakeCurrent();
|
||||
MOZ_ASSERT(mProfile != ContextProfile::Unknown);
|
||||
|
||||
uint32_t version = 0;
|
||||
|
|
@ -2253,13 +2256,11 @@ GLContext::MarkDestroyed()
|
|||
mBlitHelper = nullptr;
|
||||
mReadTexImageHelper = nullptr;
|
||||
|
||||
if (MakeCurrent()) {
|
||||
mTexGarbageBin->GLContextTeardown();
|
||||
} else {
|
||||
NS_WARNING("MakeCurrent() failed during MarkDestroyed! Skipping GL object teardown.");
|
||||
}
|
||||
|
||||
mIsDestroyed = true;
|
||||
mSymbols.Zero();
|
||||
if (MakeCurrent(true)) {
|
||||
mTexGarbageBin->GLContextTeardown();
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef MOZ_GL_DEBUG
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue