diff options
author | Taym Haddadi <haddadi.taym@gmail.com> | 2024-09-06 23:58:13 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-06 21:58:13 +0000 |
commit | 152e62022a8c69d28c217b0fce651fd2d02dc08f (patch) | |
tree | 5e83c0cd1a49cfa8b163891427b6044d083de258 /components/script/dom/gpucommandencoder.rs | |
parent | bc04f94a301b1575a1bca90e145778d3596e7b1b (diff) | |
download | servo-152e62022a8c69d28c217b0fce651fd2d02dc08f.tar.gz servo-152e62022a8c69d28c217b0fce651fd2d02dc08f.zip |
Move convert_label to Into implementation (#33348)
Signed-off-by: Taym <haddadi.taym@gmail.com>
Diffstat (limited to 'components/script/dom/gpucommandencoder.rs')
-rw-r--r-- | components/script/dom/gpucommandencoder.rs | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/components/script/dom/gpucommandencoder.rs b/components/script/dom/gpucommandencoder.rs index 6b930932bb7..16754b721df 100644 --- a/components/script/dom/gpucommandencoder.rs +++ b/components/script/dom/gpucommandencoder.rs @@ -10,7 +10,6 @@ use webgpu::{ }; use super::bindings::error::Fallible; -use super::gpuconvert::convert_label; use crate::dom::bindings::cell::DomRefCell; use crate::dom::bindings::codegen::Bindings::WebGPUBinding::{ GPUCommandBufferDescriptor, GPUCommandEncoderDescriptor, GPUCommandEncoderMethods, @@ -97,7 +96,7 @@ impl GPUCommandEncoder { device_id: device.id().0, command_encoder_id, desc: wgt::CommandEncoderDescriptor { - label: convert_label(&descriptor.parent), + label: (&descriptor.parent).into(), }, }) .expect("Failed to create WebGPU command encoder"); @@ -138,7 +137,7 @@ impl GPUCommandEncoderMethods for GPUCommandEncoder { if let Err(e) = self.channel.0.send(WebGPURequest::BeginComputePass { command_encoder_id: self.id().0, compute_pass_id, - label: convert_label(&descriptor.parent), + label: (&descriptor.parent).into(), device_id: self.device.id().0, }) { warn!("Failed to send WebGPURequest::BeginComputePass {e:?}"); @@ -206,7 +205,7 @@ impl GPUCommandEncoderMethods for GPUCommandEncoder { if let Err(e) = self.channel.0.send(WebGPURequest::BeginRenderPass { command_encoder_id: self.id().0, render_pass_id, - label: convert_label(&descriptor.parent), + label: (&descriptor.parent).into(), depth_stencil_attachment, color_attachments, device_id: self.device.id().0, @@ -313,7 +312,7 @@ impl GPUCommandEncoderMethods for GPUCommandEncoder { command_encoder_id: self.encoder.0, device_id: self.device.id().0, desc: wgt::CommandBufferDescriptor { - label: convert_label(&descriptor.parent), + label: (&descriptor.parent).into(), }, }) .expect("Failed to send Finish"); |