aboutsummaryrefslogtreecommitdiffstats
path: root/components/canvas_traits/webgl.rs
diff options
context:
space:
mode:
authorJosh Matthews <josh@joshmatthews.net>2019-09-19 17:46:09 -0400
committerJosh Matthews <josh@joshmatthews.net>2019-09-20 01:28:22 -0400
commit5bd1e86d42b1a9fb6cef77cdcf09c346b778d1ae (patch)
tree535bf95e33f1c50caf5710f51f15ed3a7a286a87 /components/canvas_traits/webgl.rs
parent778b48fa47d1fd13d77464373c7f0bc8a2b51d2a (diff)
downloadservo-5bd1e86d42b1a9fb6cef77cdcf09c346b778d1ae.tar.gz
servo-5bd1e86d42b1a9fb6cef77cdcf09c346b778d1ae.zip
webxr: Use the same texture format as the original GL context's framebuffer when creating an XR GL layer.
Diffstat (limited to 'components/canvas_traits/webgl.rs')
-rw-r--r--components/canvas_traits/webgl.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/components/canvas_traits/webgl.rs b/components/canvas_traits/webgl.rs
index 142119fb75d..9df1c8e56db 100644
--- a/components/canvas_traits/webgl.rs
+++ b/components/canvas_traits/webgl.rs
@@ -91,6 +91,8 @@ pub struct WebGLCreateContextResult {
pub glsl_version: WebGLSLVersion,
/// The GL API used by the context.
pub api_type: GlType,
+ /// The format for creating new offscreen framebuffers for this context.
+ pub framebuffer_format: GLFormats,
}
#[derive(Clone, Copy, Debug, Deserialize, MallocSizeOf, Serialize)]
@@ -886,3 +888,9 @@ pub struct GLLimits {
pub max_vertex_texture_image_units: u32,
pub max_vertex_uniform_vectors: u32,
}
+
+#[derive(Clone, Copy, Debug, Deserialize, MallocSizeOf, Serialize)]
+pub struct GLFormats {
+ pub texture_format: u32,
+ pub texture_type: u32,
+}