diff options
author | Kunal Mohan <kunalmohan99@gmail.com> | 2020-06-02 15:36:08 +0530 |
---|---|---|
committer | Kunal Mohan <kunalmohan99@gmail.com> | 2020-06-17 12:45:40 +0530 |
commit | 00b3f785c4d4bb4da9d883128d9dc18e0406ad71 (patch) | |
tree | ca3b3c0a162eb17863fa802f50d090c4f45ea3ad /components/script/dom/gpusampler.rs | |
parent | abc3ed40c9daf8c7a68d82a2d5fb40ad632eb27f (diff) | |
download | servo-00b3f785c4d4bb4da9d883128d9dc18e0406ad71.tar.gz servo-00b3f785c4d4bb4da9d883128d9dc18e0406ad71.zip |
Add GPUSampler and GPUTextureView to BindingResource
Add validation for BindGroups
Diffstat (limited to 'components/script/dom/gpusampler.rs')
-rw-r--r-- | components/script/dom/gpusampler.rs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/components/script/dom/gpusampler.rs b/components/script/dom/gpusampler.rs index db85f60e9b6..488d3df1d05 100644 --- a/components/script/dom/gpusampler.rs +++ b/components/script/dom/gpusampler.rs @@ -64,6 +64,20 @@ impl GPUSampler { } } +impl GPUSampler { + pub fn id(&self) -> WebGPUSampler { + self.sampler + } + + pub fn is_valid(&self) -> bool { + self.valid.get() + } + + pub fn compare(&self) -> bool { + self.compare_enable + } +} + impl GPUSamplerMethods for GPUSampler { /// https://gpuweb.github.io/gpuweb/#dom-gpuobjectbase-label fn GetLabel(&self) -> Option<DOMString> { |