aboutsummaryrefslogtreecommitdiffstats
path: root/components/servo/lib.rs
diff options
context:
space:
mode:
authorbors-servo <lbergstrom+bors@mozilla.com>2019-09-12 16:08:58 -0400
committerGitHub <noreply@github.com>2019-09-12 16:08:58 -0400
commit89d0b0233a230274c93cfc514525e29e2d691a7e (patch)
tree929eb2536b134cd718c5e447b52bbb95688f2f35 /components/servo/lib.rs
parent2ff34e5e21579f4ef64c052b0202eaa3ca9f5040 (diff)
parent1cefae71817924e375626802c5e639fe80f66c66 (diff)
downloadservo-89d0b0233a230274c93cfc514525e29e2d691a7e.tar.gz
servo-89d0b0233a230274c93cfc514525e29e2d691a7e.zip
Auto merge of #24176 - jdm:no-gleam, r=asajeffrey
Replace use of gleam in webgl with sparkle. Rely on https://github.com/servo/sparkle for the GL bindings required to implement Servo's WebGL stack. This does not touch the GL usage in the compositor or webrender, which continue to rely on https://github.com/servo/gleam. This means that any breaking changes to the public GL bindings interface (such as required by https://github.com/servo/servo/pull/24111) only require updating rust-offscreen-rendering-context and rust-webvr, rather than many other crates that are out of our direct control. --- - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] There are tests for these changes <!-- 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/24176) <!-- Reviewable:end -->
Diffstat (limited to 'components/servo/lib.rs')
-rw-r--r--components/servo/lib.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/components/servo/lib.rs b/components/servo/lib.rs
index e2ce15fa39f..9ae3212d98c 100644
--- a/components/servo/lib.rs
+++ b/components/servo/lib.rs
@@ -412,7 +412,11 @@ where
} else {
let dispatcher =
Box::new(MainThreadDispatcher::new(compositor_proxy.clone())) as Box<_>;
- GLContextFactory::current_native_handle(dispatcher, window.gl().get_type())
+ let gl_type = match window.gl().get_type() {
+ gl::GlType::Gl => sparkle::gl::GlType::Gl,
+ gl::GlType::Gles => sparkle::gl::GlType::Gles,
+ };
+ GLContextFactory::current_native_handle(dispatcher, gl_type)
};
let (external_image_handlers, external_images) = WebrenderExternalImageHandlers::new();