aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/gpucommandbuffer.rs
diff options
context:
space:
mode:
authorKunal Mohan <kunalmohan99@gmail.com>2020-07-22 17:52:49 +0530
committerKunal Mohan <kunalmohan99@gmail.com>2020-07-24 12:45:23 +0530
commitaff22db33ff237e0fd677671851e3919007f20ef (patch)
treeb3073acf157f99a004c53d33d7da3d839e5accd1 /components/script/dom/gpucommandbuffer.rs
parent75abccb16bc19eb375ce73f26a0234e3d2ecbb9b (diff)
downloadservo-aff22db33ff237e0fd677671851e3919007f20ef.tar.gz
servo-aff22db33ff237e0fd677671851e3919007f20ef.zip
Implement GPURenderBundleEncoder and GPURenderBundle
Diffstat (limited to 'components/script/dom/gpucommandbuffer.rs')
-rw-r--r--components/script/dom/gpucommandbuffer.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/components/script/dom/gpucommandbuffer.rs b/components/script/dom/gpucommandbuffer.rs
index 7c7f03629d9..6e1eb8446f0 100644
--- a/components/script/dom/gpucommandbuffer.rs
+++ b/components/script/dom/gpucommandbuffer.rs
@@ -37,11 +37,12 @@ impl GPUCommandBuffer {
channel: WebGPU,
command_buffer: WebGPUCommandBuffer,
buffers: HashSet<DomRoot<GPUBuffer>>,
+ label: Option<USVString>,
) -> Self {
Self {
channel,
reflector_: Reflector::new(),
- label: DomRefCell::new(None),
+ label: DomRefCell::new(label),
command_buffer,
buffers: DomRefCell::new(buffers.into_iter().map(|b| Dom::from_ref(&*b)).collect()),
}
@@ -52,12 +53,14 @@ impl GPUCommandBuffer {
channel: WebGPU,
command_buffer: WebGPUCommandBuffer,
buffers: HashSet<DomRoot<GPUBuffer>>,
+ label: Option<USVString>,
) -> DomRoot<Self> {
reflect_dom_object(
Box::new(GPUCommandBuffer::new_inherited(
channel,
command_buffer,
buffers,
+ label,
)),
global,
)