aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/gputextureview.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/script/dom/gputextureview.rs')
-rw-r--r--components/script/dom/gputextureview.rs11
1 files changed, 8 insertions, 3 deletions
diff --git a/components/script/dom/gputextureview.rs b/components/script/dom/gputextureview.rs
index 208352f3ff7..af346d92250 100644
--- a/components/script/dom/gputextureview.rs
+++ b/components/script/dom/gputextureview.rs
@@ -21,11 +21,15 @@ pub struct GPUTextureView {
}
impl GPUTextureView {
- fn new_inherited(texture_view: WebGPUTextureView, texture: &GPUTexture) -> GPUTextureView {
+ fn new_inherited(
+ texture_view: WebGPUTextureView,
+ texture: &GPUTexture,
+ label: Option<USVString>,
+ ) -> GPUTextureView {
Self {
reflector_: Reflector::new(),
texture: Dom::from_ref(texture),
- label: DomRefCell::new(None),
+ label: DomRefCell::new(label),
texture_view,
}
}
@@ -34,9 +38,10 @@ impl GPUTextureView {
global: &GlobalScope,
texture_view: WebGPUTextureView,
texture: &GPUTexture,
+ label: Option<USVString>,
) -> DomRoot<GPUTextureView> {
reflect_dom_object(
- Box::new(GPUTextureView::new_inherited(texture_view, texture)),
+ Box::new(GPUTextureView::new_inherited(texture_view, texture, label)),
global,
)
}