mirror of
https://github.com/servo/servo.git
synced 2025-08-05 13:40:08 +01:00
Don't completely trust servo's tracking of the GL context in glutin
This commit is contained in:
parent
a7ed8f7e5a
commit
5f503f034a
1 changed files with 7 additions and 0 deletions
|
@ -35,6 +35,13 @@ impl GlContext {
|
|||
*self = match std::mem::replace(self, GlContext::None) {
|
||||
GlContext::Current(c) => {
|
||||
warn!("Making an already current context current");
|
||||
// Servo thinks that that this window is current,
|
||||
// but it might be wrong, since other code may have
|
||||
// changed the current GL context. Just to be on
|
||||
// the safe side, we make it current anyway.
|
||||
let c = unsafe {
|
||||
c.make_current().expect("Couldn't make window current")
|
||||
};
|
||||
GlContext::Current(c)
|
||||
},
|
||||
GlContext::NotCurrent(c) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue