aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/gpusampler.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/script/dom/gpusampler.rs')
-rw-r--r--components/script/dom/gpusampler.rs17
1 files changed, 14 insertions, 3 deletions
diff --git a/components/script/dom/gpusampler.rs b/components/script/dom/gpusampler.rs
index cba3ec3b018..23395ee058c 100644
--- a/components/script/dom/gpusampler.rs
+++ b/components/script/dom/gpusampler.rs
@@ -21,10 +21,15 @@ pub struct GPUSampler {
}
impl GPUSampler {
- fn new_inherited(device: WebGPUDevice, compare_enable: bool, sampler: WebGPUSampler) -> Self {
+ fn new_inherited(
+ device: WebGPUDevice,
+ compare_enable: bool,
+ sampler: WebGPUSampler,
+ label: Option<USVString>,
+ ) -> Self {
Self {
reflector_: Reflector::new(),
- label: DomRefCell::new(None),
+ label: DomRefCell::new(label),
device,
sampler,
compare_enable,
@@ -36,9 +41,15 @@ impl GPUSampler {
device: WebGPUDevice,
compare_enable: bool,
sampler: WebGPUSampler,
+ label: Option<USVString>,
) -> DomRoot<Self> {
reflect_dom_object(
- Box::new(GPUSampler::new_inherited(device, compare_enable, sampler)),
+ Box::new(GPUSampler::new_inherited(
+ device,
+ compare_enable,
+ sampler,
+ label,
+ )),
global,
)
}