mirror of
https://github.com/servo/servo.git
synced 2025-06-11 01:50:10 +00:00
constellation: Make setting up the WebGL state fallible.
This fixes a regression caused by the glutin update. We now are creating EGL contexts in Linux Wayland, instead of X context, so the GLContextFactory assumption of one GL back-end per platform is broken. This just works around it, for now, but in general I think not relying on available WebGL state is a good thing, and we do that already for WebVR anyway.
This commit is contained in:
parent
3fc5bf87d3
commit
21df4014db
8 changed files with 48 additions and 31 deletions
|
@ -483,8 +483,8 @@ pub struct ScriptThread {
|
|||
/// The unit of related similar-origin browsing contexts' list of MutationObserver objects
|
||||
mutation_observers: DomRefCell<Vec<Dom<MutationObserver>>>,
|
||||
|
||||
/// A handle to the webgl thread
|
||||
webgl_chan: WebGLPipeline,
|
||||
/// A handle to the WebGL thread
|
||||
webgl_chan: Option<WebGLPipeline>,
|
||||
|
||||
/// A handle to the webvr thread, if available
|
||||
webvr_chan: Option<IpcSender<WebVRMsg>>,
|
||||
|
@ -2130,7 +2130,7 @@ impl ScriptThread {
|
|||
origin,
|
||||
incomplete.navigation_start,
|
||||
incomplete.navigation_start_precise,
|
||||
self.webgl_chan.channel(),
|
||||
self.webgl_chan.as_ref().map(|chan| chan.channel()),
|
||||
self.webvr_chan.clone(),
|
||||
self.microtask_queue.clone(),
|
||||
self.webrender_document,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue