aboutsummaryrefslogtreecommitdiffstats
path: root/components/canvas_traits/webgl.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/canvas_traits/webgl.rs')
-rw-r--r--components/canvas_traits/webgl.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/components/canvas_traits/webgl.rs b/components/canvas_traits/webgl.rs
index a6082209c69..84a8fe49006 100644
--- a/components/canvas_traits/webgl.rs
+++ b/components/canvas_traits/webgl.rs
@@ -63,6 +63,8 @@ pub struct WebGLCreateContextResult {
pub limits: GLLimits,
/// How the WebGLContext is shared with WebRender.
pub share_mode: WebGLContextShareMode,
+ /// The GLSL version supported by the context.
+ pub glsl_version: WebGLSLVersion
}
#[derive(Clone, Copy, Deserialize, MallocSizeOf, Serialize)]
@@ -84,6 +86,15 @@ pub enum WebGLVersion {
WebGL2,
}
+/// Defines the GLSL version supported by the WebGL backend contexts.
+#[derive(Clone, Copy, Deserialize, Eq, MallocSizeOf, PartialEq, Serialize)]
+pub struct WebGLSLVersion {
+ /// Major GLSL version
+ pub major: u32,
+ /// Minor GLSL version
+ pub minor: u32,
+}
+
/// Helper struct to send WebGLCommands to a specific WebGLContext.
#[derive(Clone, Deserialize, MallocSizeOf, Serialize)]
pub struct WebGLMsgSender {