diff options
author | Kunal Mohan <kunalmohan99@gmail.com> | 2020-06-02 21:02:06 +0530 |
---|---|---|
committer | Kunal Mohan <kunalmohan99@gmail.com> | 2020-06-04 00:27:58 +0530 |
commit | 1d4efb48ba904aab93ebad3a2892aed46444088f (patch) | |
tree | f577b3c8eb782b2938305b5ccb1b3bf1c595e337 /components/script/dom/gputextureview.rs | |
parent | e452570be0f01adc9ad6cd38ee58705b6a3f3812 (diff) | |
download | servo-1d4efb48ba904aab93ebad3a2892aed46444088f.tar.gz servo-1d4efb48ba904aab93ebad3a2892aed46444088f.zip |
Implement GPURenderPassEncoder
Add webidls for GPURenderPassEncoder and GPURenderEncoderBase and
implement relevant methods.
Diffstat (limited to 'components/script/dom/gputextureview.rs')
-rw-r--r-- | components/script/dom/gputextureview.rs | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/components/script/dom/gputextureview.rs b/components/script/dom/gputextureview.rs index 7a6f60e3bfb..f3bb4209708 100644 --- a/components/script/dom/gputextureview.rs +++ b/components/script/dom/gputextureview.rs @@ -22,11 +22,7 @@ pub struct GPUTextureView { } impl GPUTextureView { - fn new_inherited( - texture_view: WebGPUTextureView, - device: WebGPUDevice, - valid: bool, - ) -> GPUTextureView { + fn new_inherited(texture_view: WebGPUTextureView, device: WebGPUDevice, valid: bool) -> Self { Self { reflector_: Reflector::new(), device, @@ -41,7 +37,7 @@ impl GPUTextureView { texture_view: WebGPUTextureView, device: WebGPUDevice, valid: bool, - ) -> DomRoot<GPUTextureView> { + ) -> DomRoot<Self> { reflect_dom_object( Box::new(GPUTextureView::new_inherited(texture_view, device, valid)), global, @@ -49,6 +45,12 @@ impl GPUTextureView { } } +impl GPUTextureView { + pub fn id(&self) -> WebGPUTextureView { + self.texture_view + } +} + impl GPUTextureViewMethods for GPUTextureView { /// https://gpuweb.github.io/gpuweb/#dom-gpuobjectbase-label fn GetLabel(&self) -> Option<DOMString> { |