mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Implement GPURenderBundleEncoder and GPURenderBundle
This commit is contained in:
parent
75abccb16b
commit
aff22db33f
32 changed files with 676 additions and 115 deletions
|
@ -19,17 +19,21 @@ pub struct GPUShaderModule {
|
|||
}
|
||||
|
||||
impl GPUShaderModule {
|
||||
fn new_inherited(shader_module: WebGPUShaderModule) -> Self {
|
||||
fn new_inherited(shader_module: WebGPUShaderModule, label: Option<USVString>) -> Self {
|
||||
Self {
|
||||
reflector_: Reflector::new(),
|
||||
label: DomRefCell::new(None),
|
||||
label: DomRefCell::new(label),
|
||||
shader_module,
|
||||
}
|
||||
}
|
||||
|
||||
pub fn new(global: &GlobalScope, shader_module: WebGPUShaderModule) -> DomRoot<Self> {
|
||||
pub fn new(
|
||||
global: &GlobalScope,
|
||||
shader_module: WebGPUShaderModule,
|
||||
label: Option<USVString>,
|
||||
) -> DomRoot<Self> {
|
||||
reflect_dom_object(
|
||||
Box::new(GPUShaderModule::new_inherited(shader_module)),
|
||||
Box::new(GPUShaderModule::new_inherited(shader_module, label)),
|
||||
global,
|
||||
)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue