summaryrefslogtreecommitdiffstats
path: root/gfx/gl/GLContext.h
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@wolfbeast.com>2020-01-20 22:35:36 +0100
committerwolfbeast <mcwerewolf@wolfbeast.com>2020-01-20 22:42:14 +0100
commitc6dbf554496191a0cfe4c8f5dbe8c96031d1445b (patch)
tree72c14ce62e8de6f6f2273799b7badf445ced07d4 /gfx/gl/GLContext.h
parent722161775b9ec9314d1b02f567e42b83115cf993 (diff)
downloadUXP-c6dbf554496191a0cfe4c8f5dbe8c96031d1445b.tar
UXP-c6dbf554496191a0cfe4c8f5dbe8c96031d1445b.tar.gz
UXP-c6dbf554496191a0cfe4c8f5dbe8c96031d1445b.tar.lz
UXP-c6dbf554496191a0cfe4c8f5dbe8c96031d1445b.tar.xz
UXP-c6dbf554496191a0cfe4c8f5dbe8c96031d1445b.zip
Issue #1354 - Clear the current context when MakeCurrent() fails.
Diffstat (limited to 'gfx/gl/GLContext.h')
-rw-r--r--gfx/gl/GLContext.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/gfx/gl/GLContext.h b/gfx/gl/GLContext.h
index 6e3e22207..4c1f4f55c 100644
--- a/gfx/gl/GLContext.h
+++ b/gfx/gl/GLContext.h
@@ -353,6 +353,7 @@ public:
protected:
bool mIsOffscreen;
bool mContextLost;
+ bool mIsDestroyed = false;
/**
* mVersion store the OpenGL's version, multiplied by 100. For example, if
@@ -3265,7 +3266,7 @@ public:
#endif
return MakeCurrentImpl(aForce);
}
-
+
virtual bool Init() = 0;
virtual bool SetupLookupFunction() = 0;
@@ -3273,8 +3274,7 @@ public:
virtual void ReleaseSurface() {}
bool IsDestroyed() {
- // MarkDestroyed will mark all these as null.
- return mSymbols.fUseProgram == nullptr;
+ return mIsDestroyed;
}
GLContext* GetSharedContext() { return mSharedContext; }