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:
Emilio Cobos Álvarez 2018-03-09 23:27:29 +01:00
parent 3fc5bf87d3
commit 21df4014db
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C
8 changed files with 48 additions and 31 deletions

View file

@ -539,8 +539,8 @@ pub struct InitialScriptState {
pub pipeline_namespace_id: PipelineNamespaceId,
/// A ping will be sent on this channel once the script thread shuts down.
pub content_process_shutdown_chan: IpcSender<()>,
/// A channel to the webgl thread used in this pipeline.
pub webgl_chan: WebGLPipeline,
/// A channel to the WebGL thread used in this pipeline.
pub webgl_chan: Option<WebGLPipeline>,
/// A channel to the webvr thread, if available.
pub webvr_chan: Option<IpcSender<WebVRMsg>>,
/// The Webrender document ID associated with this thread.