Skip to content
Permalink
Browse files

Avoid recompiling script every time surfman changes

  • Loading branch information
asajeffrey committed Nov 15, 2019
1 parent f890d2e commit 124de750897da0ba1dfb00966deff8591d9375cd

Some generated files are not rendered by default. Learn more.

@@ -40,4 +40,5 @@ webrender_traits = {path = "../webrender_traits"}
webxr-api = {git = "https://github.com/servo/webxr", features = ["ipc"]}
# NOTE: the sm-angle feature only enables angle on windows, not other platforms!
surfman = { version = "0.1", features = ["sm-angle", "sm-osmesa"] }
surfman-chains = "0.1"
surfman-chains = "0.2"
surfman-chains-api = "0.2"
@@ -19,6 +19,8 @@ use surfman::platform::generic::universal::device::Device;
use surfman::platform::generic::universal::surface::SurfaceTexture;
use surfman::SurfaceInfo;
use surfman_chains::SwapChains;
use surfman_chains_api::SwapChainAPI;
use surfman_chains_api::SwapChainsAPI;
use webrender_traits::{WebrenderExternalImageApi, WebrenderExternalImageRegistry};
use webxr_api::SwapChainId as WebXRSwapChainId;

@@ -70,6 +70,7 @@ use surfman::SurfaceAccess;
use surfman::SurfaceInfo;
use surfman::SurfaceType;
use surfman_chains::SwapChains;
use surfman_chains_api::SwapChainsAPI;
use webrender_traits::{WebrenderExternalImageRegistry, WebrenderImageHandlerType};
use webxr_api::SwapChainId as WebXRSwapChainId;

@@ -41,7 +41,7 @@ webrender = {git = "https://github.com/servo/webrender", features = ["capture"]}
webrender_api = {git = "https://github.com/servo/webrender", features = ["ipc"]}
webvr_traits = {path = "../webvr_traits"}
webvr = {path = "../webvr"}
webxr-api = {git = "https://github.com/servo/webxr"}
webxr = {git = "https://github.com/servo/webxr"}

[build-dependencies]
toml = "0.5"
@@ -182,7 +182,7 @@ pub struct IOCompositor<Window: WindowMethods + ?Sized> {
webvr_heartbeats: Vec<Box<dyn WebVRMainThreadHeartbeat>>,

/// Some XR devices want to run on the main thread.
pub webxr_main_thread: webxr_api::MainThreadRegistry,
pub webxr_main_thread: webxr::MainThreadRegistry,

/// Map of the pending paint metrics per layout thread.
/// The layout thread for each specific pipeline expects the compositor to
@@ -164,5 +164,5 @@ pub struct InitialCompositorState {
pub webrender_document: webrender_api::DocumentId,
pub webrender_api: webrender_api::RenderApi,
pub webvr_heartbeats: Vec<Box<dyn WebVRMainThreadHeartbeat>>,
pub webxr_main_thread: webxr_api::MainThreadRegistry,
pub webxr_main_thread: webxr::MainThreadRegistry,
}
@@ -19,6 +19,7 @@ use std::fmt::{Debug, Error, Formatter};
use std::rc::Rc;
use std::time::Duration;
use style_traits::DevicePixel;

use webrender_api::units::DevicePoint;
use webrender_api::units::{DeviceIntPoint, DeviceIntRect, DeviceIntSize};
use webrender_api::ScrollLocation;
@@ -176,7 +177,7 @@ pub trait EmbedderMethods {
}

/// Register services with a WebXR Registry.
fn register_webxr(&mut self, _: &mut webxr_api::MainThreadRegistry) {}
fn register_webxr(&mut self, _: &mut webxr::MainThreadRegistry) {}
}

#[derive(Clone, Copy, Debug)]
@@ -82,6 +82,7 @@ webdriver_server = {path = "../webdriver_server", optional = true}
webvr = {path = "../webvr"}
webvr_traits = {path = "../webvr_traits"}
webxr-api = {git = "https://github.com/servo/webxr"}
webxr = {git = "https://github.com/servo/webxr"}
surfman = { version = "0.1", features = ["sm-osmesa"] }

[target.'cfg(all(not(target_os = "windows"), not(target_os = "ios"), not(target_os="android"), not(target_arch="arm"), not(target_arch="aarch64")))'.dependencies]
@@ -422,7 +422,7 @@ where

// For the moment, we enable use both the webxr crate and the rust-webvr crate,
// but we are migrating over to just using webxr.
let mut webxr_main_thread = webxr_api::MainThreadRegistry::new(event_loop_waker)
let mut webxr_main_thread = webxr::MainThreadRegistry::new(event_loop_waker)
.expect("Failed to create WebXR device registry");
if pref!(dom.webxr.enabled) {
embedder.register_webxr(&mut webxr_main_thread);
@@ -1010,7 +1010,7 @@ fn create_webgl_threads<W>(
webrender: &mut webrender::Renderer,
webrender_api_sender: webrender_api::RenderApiSender,
webvr_compositor: Option<Box<WebVRCompositorHandler>>,
webxr_main_thread: &mut webxr_api::MainThreadRegistry,
webxr_main_thread: &mut webxr::MainThreadRegistry,
external_image_handlers: &mut WebrenderExternalImageHandlers,
external_images: Arc<Mutex<WebrenderExternalImageRegistry>>,
) -> WebGLThreads
@@ -89,7 +89,7 @@ impl EmbedderMethods for EmbedderCallbacks {
}
}

fn register_webxr(&mut self, xr: &mut webxr_api::MainThreadRegistry) {
fn register_webxr(&mut self, xr: &mut webxr::MainThreadRegistry) {
if pref!(dom.webxr.test) {
xr.register_mock(webxr::headless::HeadlessMockDiscovery::new());
} else if !opts::get().headless && pref!(dom.webxr.glwindow) {
@@ -13,7 +13,7 @@ log = "0.4"
servo-media = { git = "https://github.com/servo/media" }

webxr-api = { git = "https://github.com/servo/webxr", features = ["ipc"] }
webxr = { git = "https://github.com/servo/webxr" , optional = true}
webxr = { git = "https://github.com/servo/webxr"}

[target.'cfg(not(target_os = "macos"))'.dependencies]
libc = "0.2"
@@ -47,5 +47,5 @@ no_static_freetype = ["libservo/no_static_freetype"]
no-wgl = ["libservo/no-wgl"]
oculusvr = ["libservo/oculusvr"]
webdriver = ["libservo/webdriver"]
uwp = ["libservo/uwp", "webxr", "webxr/openxr-api"]
uwp = ["libservo/uwp", "webxr/openxr-api"]
webgl_backtrace = ["libservo/webgl_backtrace"]
@@ -49,7 +49,7 @@ pub struct InitOptions {
pub coordinates: Coordinates,
pub density: f32,
pub vr_init: VRInitOptions,
pub xr_discovery: Option<Box<dyn webxr_api::Discovery>>,
pub xr_discovery: Option<webxr::Discovery>,
pub enable_subpixel_text_antialiasing: bool,
pub gl_context_pointer: Option<*const c_void>,
pub native_display_pointer: Option<*const c_void>,
@@ -591,7 +591,7 @@ impl ServoGlue {

struct ServoEmbedderCallbacks {
waker: Box<dyn EventLoopWaker>,
xr_discovery: Option<Box<dyn webxr_api::Discovery>>,
xr_discovery: Option<webxr::Discovery>,
vr_init: VRInitOptions,
#[allow(unused)]
gl: Rc<dyn gl::Gl>,
@@ -626,7 +626,7 @@ impl EmbedderMethods for ServoEmbedderCallbacks {
}

#[cfg(feature = "uwp")]
fn register_webxr(&mut self, registry: &mut webxr_api::MainThreadRegistry) {
fn register_webxr(&mut self, registry: &mut webxr::MainThreadRegistry) {
debug!("EmbedderMethods::register_xr");
assert!(
self.xr_discovery.is_none(),
@@ -638,7 +638,7 @@ impl EmbedderMethods for ServoEmbedderCallbacks {
}

#[cfg(not(feature = "uwp"))]
fn register_webxr(&mut self, registry: &mut webxr_api::MainThreadRegistry) {
fn register_webxr(&mut self, registry: &mut webxr::MainThreadRegistry) {
debug!("EmbedderMethods::register_xr");
if let Some(discovery) = self.xr_discovery.take() {
registry.register(discovery);

0 comments on commit 124de75

Please sign in to comment.
You can’t perform that action at this time.