aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/gputextureview.rs
diff options
context:
space:
mode:
authorKunal Mohan <kunalmohan99@gmail.com>2020-07-22 17:52:49 +0530
committerKunal Mohan <kunalmohan99@gmail.com>2020-07-24 12:45:23 +0530
commitaff22db33ff237e0fd677671851e3919007f20ef (patch)
treeb3073acf157f99a004c53d33d7da3d839e5accd1 /components/script/dom/gputextureview.rs
parent75abccb16bc19eb375ce73f26a0234e3d2ecbb9b (diff)
downloadservo-aff22db33ff237e0fd677671851e3919007f20ef.tar.gz
servo-aff22db33ff237e0fd677671851e3919007f20ef.zip
Implement GPURenderBundleEncoder and GPURenderBundle
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,
)
}