aboutsummaryrefslogtreecommitdiffstats
path: root/components/canvas/webgl_thread.rs
diff options
context:
space:
mode:
authorJosh Matthews <josh@joshmatthews.net>2019-03-07 11:45:34 -0500
committerJosh Matthews <josh@joshmatthews.net>2019-03-08 09:49:52 -0500
commit056edbbd15fb2a6f7763b70c6e61ca57ca3a515c (patch)
tree659be87f65bf6fb563028f9cdd34a64fba2cb038 /components/canvas/webgl_thread.rs
parent0e30666d18dcbeeeed95c2df95a070ff2a7803b2 (diff)
downloadservo-056edbbd15fb2a6f7763b70c6e61ca57ca3a515c.tar.gz
servo-056edbbd15fb2a6f7763b70c6e61ca57ca3a515c.zip
Ensure that removed contexts are made active before removal.
Diffstat (limited to 'components/canvas/webgl_thread.rs')
-rw-r--r--components/canvas/webgl_thread.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/components/canvas/webgl_thread.rs b/components/canvas/webgl_thread.rs
index 7447b4c6b55..bee847021f4 100644
--- a/components/canvas/webgl_thread.rs
+++ b/components/canvas/webgl_thread.rs
@@ -382,6 +382,10 @@ impl<VR: WebVRRenderHandler + 'static> WebGLThread<VR> {
self.webrender_api.update_resources(txn.resource_updates)
}
+ // We need to make the context current so its resources can be disposed of.
+ let _ =
+ Self::make_current_if_needed(context_id, &self.contexts, &mut self.bound_context_id);
+
// Release GL context.
self.contexts.remove(&context_id);