mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +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
|
@ -22,9 +22,10 @@ use servo_url::{ImmutableOrigin, MutableOrigin, ServoUrl};
|
|||
use crate::dom::bindings::inheritance::Castable;
|
||||
use crate::dom::bindings::root::DomRoot;
|
||||
use crate::dom::globalscope::GlobalScope;
|
||||
use crate::dom::identityhub::IdentityHub;
|
||||
use crate::dom::paintworkletglobalscope::{PaintWorkletGlobalScope, PaintWorkletTask};
|
||||
use crate::dom::testworkletglobalscope::{TestWorkletGlobalScope, TestWorkletTask};
|
||||
#[cfg(feature = "webgpu")]
|
||||
use crate::dom::webgpu::identityhub::IdentityHub;
|
||||
use crate::dom::worklet::WorkletExecutor;
|
||||
use crate::script_module::ScriptFetchOptions;
|
||||
use crate::script_runtime::{CanGc, JSContext};
|
||||
|
@ -99,6 +100,7 @@ impl WorkletGlobalScope {
|
|||
Default::default(),
|
||||
init.is_headless,
|
||||
init.user_agent.clone(),
|
||||
#[cfg(feature = "webgpu")]
|
||||
init.gpu_id_hub.clone(),
|
||||
init.inherited_secure_context,
|
||||
false,
|
||||
|
@ -193,6 +195,7 @@ pub struct WorkletGlobalScopeInit {
|
|||
/// An optional string allowing the user agent to be set for testing
|
||||
pub user_agent: Cow<'static, str>,
|
||||
/// Identity manager for WebGPU resources
|
||||
#[cfg(feature = "webgpu")]
|
||||
pub gpu_id_hub: Arc<IdentityHub>,
|
||||
/// Is considered secure
|
||||
pub inherited_secure_context: Option<bool>,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue