diff options
author | bors-servo <lbergstrom+bors@mozilla.com> | 2019-09-23 19:34:10 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-09-23 19:34:10 -0400 |
commit | 6ca62aa0de1fda970daac53681a9b6e47cf91fbd (patch) | |
tree | 99715bdfa147c759c7f1a4eaf24d9123ac4303d6 /components/canvas_traits/webgl.rs | |
parent | ee17eedf3a857f27ce2b6b775574a3a455df8aa3 (diff) | |
parent | ea715a7a4cae5d2a2f41b059f36e08010d544de1 (diff) | |
download | servo-6ca62aa0de1fda970daac53681a9b6e47cf91fbd.tar.gz servo-6ca62aa0de1fda970daac53681a9b6e47cf91fbd.zip |
Auto merge of #24242 - jdm:xr-webgllayer-format, r=asajeffrey,nox
Fix immersive mode panic on three.js rollercoaster on hololens
We have some special logic about texture formats when creating drawing buffers for WebGL that needs to be shared with the code that creates a separate framebuffer for immersive mode.
---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #24083 and fix #20595.
- [x] These changes do not require tests because no CI for hololens; tested manually in the emulator.
<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/24242)
<!-- Reviewable:end -->
Diffstat (limited to 'components/canvas_traits/webgl.rs')
-rw-r--r-- | components/canvas_traits/webgl.rs | 8 |
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, +} |