Replace use of gleam in webgl with sparkle.

This commit is contained in:
Josh Matthews 2019-09-10 14:37:51 -04:00
parent ec1da1d01c
commit 1cefae7181
16 changed files with 103 additions and 72 deletions

View file

@ -22,8 +22,9 @@ gleam = "0.6"
ipc-channel = "0.12"
log = "0.4"
msg = {path = "../msg"}
rust-webvr = { version = "0.14.2", features = ["mock", "openvr", "vrexternal"] }
rust-webvr-api = "0.14"
rust-webvr = {version = "0.16", features = ["mock", "openvr", "vrexternal"]}
rust-webvr-api = "0.16"
script_traits = {path = "../script_traits"}
servo_config = {path = "../config"}
sparkle = "0.1"
webvr_traits = {path = "../webvr_traits" }

View file

@ -5,13 +5,13 @@
use canvas_traits::webgl;
use crossbeam_channel::{unbounded, Receiver, Sender};
use euclid::default::Size2D;
use gleam::gl::Gl;
use ipc_channel::ipc;
use ipc_channel::ipc::{IpcReceiver, IpcSender};
use msg::constellation_msg::PipelineId;
use rust_webvr::VRServiceManager;
use script_traits::ConstellationMsg;
use servo_config::pref;
use sparkle::gl::Gl;
use std::collections::hash_map::Entry;
use std::collections::{HashMap, HashSet};
use std::sync::mpsc;
@ -429,12 +429,7 @@ impl WebVRCompositorHandler {
impl webgl::WebVRRenderHandler for WebVRCompositorHandler {
#[allow(unsafe_code)]
fn handle(
&mut self,
gl: &dyn Gl,
cmd: webgl::WebVRCommand,
texture: Option<(u32, Size2D<i32>)>,
) {
fn handle(&mut self, gl: &Gl, cmd: webgl::WebVRCommand, texture: Option<(u32, Size2D<i32>)>) {
match cmd {
webgl::WebVRCommand::Create(compositor_id) => {
if let Some(compositor) = self.create_compositor(compositor_id) {