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/gputexture.rs | |
parent | 75abccb16bc19eb375ce73f26a0234e3d2ecbb9b (diff) | |
download | servo-aff22db33ff237e0fd677671851e3919007f20ef.tar.gz servo-aff22db33ff237e0fd677671851e3919007f20ef.zip |
Implement GPURenderBundleEncoder and GPURenderBundle
Diffstat (limited to 'components/script/dom/gputexture.rs')
-rw-r--r-- | components/script/dom/gputexture.rs | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/components/script/dom/gputexture.rs b/components/script/dom/gputexture.rs index 4977207942e..4a6256ee369 100644 --- a/components/script/dom/gputexture.rs +++ b/components/script/dom/gputexture.rs @@ -47,11 +47,12 @@ impl GPUTexture { dimension: GPUTextureDimension, format: GPUTextureFormat, texture_usage: u32, + label: Option<USVString>, ) -> Self { Self { reflector_: Reflector::new(), texture, - label: DomRefCell::new(None), + label: DomRefCell::new(label), device, channel, texture_size, @@ -74,6 +75,7 @@ impl GPUTexture { dimension: GPUTextureDimension, format: GPUTextureFormat, texture_usage: u32, + label: Option<USVString>, ) -> DomRoot<Self> { reflect_dom_object( Box::new(GPUTexture::new_inherited( @@ -86,6 +88,7 @@ impl GPUTexture { dimension, format, texture_usage, + label, )), global, ) @@ -179,7 +182,12 @@ impl GPUTextureMethods for GPUTexture { let texture_view = WebGPUTextureView(texture_view_id); - GPUTextureView::new(&self.global(), texture_view, &self) + GPUTextureView::new( + &self.global(), + texture_view, + &self, + descriptor.parent.label.as_ref().cloned(), + ) } /// https://gpuweb.github.io/gpuweb/#dom-gputexture-destroy |