mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Initial implementation of WebGPU API
This commit is contained in:
parent
47e39af0f3
commit
12893aa010
30 changed files with 923 additions and 7 deletions
|
@ -136,6 +136,7 @@ use style::str::HTML_SPACE_CHARACTERS;
|
|||
use style::stylesheets::CssRuleType;
|
||||
use style_traits::{CSSPixel, DevicePixel, ParsingMode};
|
||||
use url::Position;
|
||||
use webgpu::WebGPU;
|
||||
use webrender_api::units::{DeviceIntPoint, DeviceIntSize, LayoutPixel};
|
||||
use webrender_api::{DocumentId, ExternalScrollId, RenderApiSender};
|
||||
use webvr_traits::WebVRMsg;
|
||||
|
@ -267,6 +268,10 @@ pub struct Window {
|
|||
#[ignore_malloc_size_of = "channels are hard"]
|
||||
webgl_chan: Option<WebGLChan>,
|
||||
|
||||
#[ignore_malloc_size_of = "channels are hard"]
|
||||
/// A handle for communicating messages to the WebGPU threads.
|
||||
webgpu: Option<WebGPU>,
|
||||
|
||||
/// A handle for communicating messages to the webvr thread, if available.
|
||||
#[ignore_malloc_size_of = "channels are hard"]
|
||||
webvr_chan: Option<IpcSender<WebVRMsg>>,
|
||||
|
@ -462,6 +467,10 @@ impl Window {
|
|||
.map(|chan| WebGLCommandSender::new(chan.clone(), self.get_event_loop_waker()))
|
||||
}
|
||||
|
||||
pub fn webgpu_channel(&self) -> Option<WebGPU> {
|
||||
self.webgpu.clone()
|
||||
}
|
||||
|
||||
pub fn webvr_thread(&self) -> Option<IpcSender<WebVRMsg>> {
|
||||
self.webvr_chan.clone()
|
||||
}
|
||||
|
@ -2195,6 +2204,7 @@ impl Window {
|
|||
navigation_start: u64,
|
||||
navigation_start_precise: u64,
|
||||
webgl_chan: Option<WebGLChan>,
|
||||
webgpu: Option<WebGPU>,
|
||||
webvr_chan: Option<IpcSender<WebVRMsg>>,
|
||||
webxr_registry: webxr_api::Registry,
|
||||
microtask_queue: Rc<MicrotaskQueue>,
|
||||
|
@ -2274,6 +2284,7 @@ impl Window {
|
|||
media_query_lists: DOMTracker::new(),
|
||||
test_runner: Default::default(),
|
||||
webgl_chan,
|
||||
webgpu,
|
||||
webvr_chan,
|
||||
webxr_registry,
|
||||
permission_state_invocation_results: Default::default(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue