aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/gpucomputepipeline.rs
diff options
context:
space:
mode:
authorKunal Mohan <kunalmohan99@gmail.com>2020-07-20 20:10:41 +0530
committerKunal Mohan <kunalmohan99@gmail.com>2020-07-20 23:03:53 +0530
commitcdc0a75fe43a962caaeed5fdb15dbc3a4dc18c56 (patch)
tree8ccf16cae3f8cf3ba00dad408c8abc47807424ba /components/script/dom/gpucomputepipeline.rs
parent3216209506f36b3db7dc733c2e391fb11dc6bd67 (diff)
downloadservo-cdc0a75fe43a962caaeed5fdb15dbc3a4dc18c56.tar.gz
servo-cdc0a75fe43a962caaeed5fdb15dbc3a4dc18c56.zip
Update GPUObjectBase webidl and cleanup valid flags
Diffstat (limited to 'components/script/dom/gpucomputepipeline.rs')
-rw-r--r--components/script/dom/gpucomputepipeline.rs21
1 files changed, 7 insertions, 14 deletions
diff --git a/components/script/dom/gpucomputepipeline.rs b/components/script/dom/gpucomputepipeline.rs
index cd5fac795d7..a5b7fbc495d 100644
--- a/components/script/dom/gpucomputepipeline.rs
+++ b/components/script/dom/gpucomputepipeline.rs
@@ -7,37 +7,30 @@ use crate::dom::bindings::codegen::Bindings::GPUComputePipelineBinding::GPUCompu
use crate::dom::bindings::reflector::reflect_dom_object;
use crate::dom::bindings::reflector::Reflector;
use crate::dom::bindings::root::DomRoot;
-use crate::dom::bindings::str::DOMString;
+use crate::dom::bindings::str::USVString;
use crate::dom::globalscope::GlobalScope;
use dom_struct::dom_struct;
-use std::cell::Cell;
use webgpu::WebGPUComputePipeline;
#[dom_struct]
pub struct GPUComputePipeline {
reflector_: Reflector,
- label: DomRefCell<Option<DOMString>>,
+ label: DomRefCell<Option<USVString>>,
compute_pipeline: WebGPUComputePipeline,
- valid: Cell<bool>,
}
impl GPUComputePipeline {
- fn new_inherited(compute_pipeline: WebGPUComputePipeline, valid: bool) -> Self {
+ fn new_inherited(compute_pipeline: WebGPUComputePipeline) -> Self {
Self {
reflector_: Reflector::new(),
label: DomRefCell::new(None),
compute_pipeline,
- valid: Cell::new(valid),
}
}
- pub fn new(
- global: &GlobalScope,
- compute_pipeline: WebGPUComputePipeline,
- valid: bool,
- ) -> DomRoot<Self> {
+ pub fn new(global: &GlobalScope, compute_pipeline: WebGPUComputePipeline) -> DomRoot<Self> {
reflect_dom_object(
- Box::new(GPUComputePipeline::new_inherited(compute_pipeline, valid)),
+ Box::new(GPUComputePipeline::new_inherited(compute_pipeline)),
global,
)
}
@@ -51,12 +44,12 @@ impl GPUComputePipeline {
impl GPUComputePipelineMethods for GPUComputePipeline {
/// https://gpuweb.github.io/gpuweb/#dom-gpuobjectbase-label
- fn GetLabel(&self) -> Option<DOMString> {
+ fn GetLabel(&self) -> Option<USVString> {
self.label.borrow().clone()
}
/// https://gpuweb.github.io/gpuweb/#dom-gpuobjectbase-label
- fn SetLabel(&self, value: Option<DOMString>) {
+ fn SetLabel(&self, value: Option<USVString>) {
*self.label.borrow_mut() = value;
}
}