mirror of
https://github.com/servo/servo.git
synced 2025-07-23 07:13:52 +01:00
Add webgpu
feature flag (#34444)
* Move script gpu files into webgpu folder Signed-off-by: atbrakhi <atbrakhi@igalia.com> * Modify gpu webidls Signed-off-by: atbrakhi <atbrakhi@igalia.com> * move gpu realted webidl Signed-off-by: atbrakhi <atbrakhi@igalia.com> * add webgpu feature to script Signed-off-by: atbrakhi <atbrakhi@igalia.com> * add dummy implementation for gpucanvascontext Signed-off-by: atbrakhi <atbrakhi@igalia.com> * fmt Signed-off-by: atbrakhi <atbrakhi@igalia.com> * add skip-if CARGO_FEATURE_WEBGPU Signed-off-by: atbrakhi <atbrakhi@igalia.com> * Move NavigatorGPU and workerNavigator GPU to webgpu idl Signed-off-by: atbrakhi <atbrakhi@igalia.com> * fmt and cleanup Signed-off-by: atbrakhi <atbrakhi@igalia.com> * review fix Signed-off-by: atbrakhi <atbrakhi@igalia.com> * enable webgpu by default and also some fmt fix Signed-off-by: atbrakhi <atbrakhi@igalia.com> * Add pref back, fix imports, small cleanups Signed-off-by: atbrakhi <atbrakhi@igalia.com> --------- Signed-off-by: atbrakhi <atbrakhi@igalia.com>
This commit is contained in:
parent
bba3bc6ac2
commit
1591a3b506
52 changed files with 295 additions and 105 deletions
|
@ -23,6 +23,7 @@ use net_traits::CoreResourceMsg;
|
|||
use serde::{Deserialize, Serialize};
|
||||
use servo_url::{ImmutableOrigin, ServoUrl};
|
||||
use style_traits::CSSPixel;
|
||||
#[cfg(feature = "webgpu")]
|
||||
use webgpu::{wgc, WebGPU, WebGPUResponse};
|
||||
|
||||
use crate::{
|
||||
|
@ -247,12 +248,14 @@ pub enum ScriptMsg {
|
|||
/// Notifies the constellation about media session events
|
||||
/// (i.e. when there is metadata for the active media session, playback state changes...).
|
||||
MediaSessionEvent(PipelineId, MediaSessionEvent),
|
||||
#[cfg(feature = "webgpu")]
|
||||
/// Create a WebGPU Adapter instance
|
||||
RequestAdapter(
|
||||
IpcSender<WebGPUResponse>,
|
||||
wgc::instance::RequestAdapterOptions,
|
||||
wgc::id::AdapterId,
|
||||
),
|
||||
#[cfg(feature = "webgpu")]
|
||||
/// Get WebGPU channel
|
||||
GetWebGPUChan(IpcSender<Option<WebGPU>>),
|
||||
/// Notify the constellation of a pipeline's document's title.
|
||||
|
@ -312,7 +315,9 @@ impl fmt::Debug for ScriptMsg {
|
|||
ForwardDOMMessage(..) => "ForwardDOMMessage",
|
||||
ScheduleJob(..) => "ScheduleJob",
|
||||
MediaSessionEvent(..) => "MediaSessionEvent",
|
||||
#[cfg(feature = "webgpu")]
|
||||
RequestAdapter(..) => "RequestAdapter",
|
||||
#[cfg(feature = "webgpu")]
|
||||
GetWebGPUChan(..) => "GetWebGPUChan",
|
||||
TitleChanged(..) => "TitleChanged",
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue