mirror of
https://github.com/servo/servo.git
synced 2025-08-05 21:50:18 +01:00
Auto merge of #24752 - asajeffrey:split-surfman-chains-api-and-impl, r=jdm
Avoid recompiling script every time surfman changes <!-- Please describe your changes on the following line: --> Uses a version of webxr where webxr-api doesn't depend on surfman, so we can make changes to it without rebuilding script. --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes do not require tests because it's just build issues <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
This commit is contained in:
commit
e6ae93f66e
13 changed files with 36 additions and 21 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue