diff options
author | Kunal Mohan <kunalmohan99@gmail.com> | 2020-07-22 17:52:49 +0530 |
---|---|---|
committer | Kunal Mohan <kunalmohan99@gmail.com> | 2020-07-24 12:45:23 +0530 |
commit | aff22db33ff237e0fd677671851e3919007f20ef (patch) | |
tree | b3073acf157f99a004c53d33d7da3d839e5accd1 /components/script/dom/gpushadermodule.rs | |
parent | 75abccb16bc19eb375ce73f26a0234e3d2ecbb9b (diff) | |
download | servo-aff22db33ff237e0fd677671851e3919007f20ef.tar.gz servo-aff22db33ff237e0fd677671851e3919007f20ef.zip |
Implement GPURenderBundleEncoder and GPURenderBundle
Diffstat (limited to 'components/script/dom/gpushadermodule.rs')
-rw-r--r-- | components/script/dom/gpushadermodule.rs | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/components/script/dom/gpushadermodule.rs b/components/script/dom/gpushadermodule.rs index 3c752e7fe4a..c4f20124ea8 100644 --- a/components/script/dom/gpushadermodule.rs +++ b/components/script/dom/gpushadermodule.rs @@ -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, ) } |