mirror of
https://github.com/servo/servo.git
synced 2025-09-30 00:29:14 +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
41
components/script/dom/gpucanvascontext.rs
Normal file
41
components/script/dom/gpucanvascontext.rs
Normal file
|
@ -0,0 +1,41 @@
|
|||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use dom_struct::dom_struct;
|
||||
use script_layout_interface::HTMLCanvasDataSource;
|
||||
|
||||
use crate::dom::bindings::codegen::Bindings::GPUCanvasContextBinding::GPUCanvasContextMethods;
|
||||
use crate::dom::bindings::codegen::UnionTypes;
|
||||
use crate::dom::bindings::reflector::Reflector;
|
||||
use crate::dom::bindings::root::{DomRoot, LayoutDom};
|
||||
use crate::dom::globalscope::GlobalScope;
|
||||
use crate::dom::htmlcanvaselement::{HTMLCanvasElement, LayoutCanvasRenderingContextHelpers};
|
||||
|
||||
#[dom_struct]
|
||||
pub struct GPUCanvasContext {
|
||||
reflector_: Reflector,
|
||||
}
|
||||
|
||||
impl GPUCanvasContext {
|
||||
#[allow(dead_code)]
|
||||
fn new_inherited() -> Self {
|
||||
unimplemented!()
|
||||
}
|
||||
|
||||
pub fn new(_global: &GlobalScope, _canvas: &HTMLCanvasElement) -> DomRoot<Self> {
|
||||
unimplemented!()
|
||||
}
|
||||
}
|
||||
|
||||
impl GPUCanvasContextMethods<crate::DomTypeHolder> for GPUCanvasContext {
|
||||
fn Canvas(&self) -> UnionTypes::HTMLCanvasElementOrOffscreenCanvas {
|
||||
unimplemented!()
|
||||
}
|
||||
}
|
||||
|
||||
impl LayoutCanvasRenderingContextHelpers for LayoutDom<'_, GPUCanvasContext> {
|
||||
fn canvas_data_source(self) -> HTMLCanvasDataSource {
|
||||
unimplemented!()
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue