Ensure that removed contexts are made active before removal.

This commit is contained in:
Josh Matthews 2019-03-07 11:45:34 -05:00
parent 0e30666d18
commit 056edbbd15
5 changed files with 134 additions and 0 deletions

View file

@ -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);