diff options
author | Istvan Miklos <istvan.miklos@h-lab.eu> | 2020-02-05 11:32:52 +0100 |
---|---|---|
committer | Istvan Miklos <istvan.miklos@h-lab.eu> | 2020-02-27 15:10:24 +0100 |
commit | 000a5d543d8780a73ace6477c0c8255b8d7a97f6 (patch) | |
tree | f127a5ba0331d1663febec135de757abb30567dc /components/script/dom/gpucommandencoder.rs | |
parent | 0f9b04680a27e7503bb2ebceb41c5abc8d59a294 (diff) | |
download | servo-000a5d543d8780a73ace6477c0c8255b8d7a97f6.tar.gz servo-000a5d543d8780a73ace6477c0c8255b8d7a97f6.zip |
Fixing some style related issues in WebGPU.
Changed the Requests/Response from tuples to named struct variants and also sorted in alphabetical order.
Replaced the ID generator functions from `globalscope` with a single function,
which returns a `RefMut` and can call the appropriate method to generate resource IDs.
Diffstat (limited to 'components/script/dom/gpucommandencoder.rs')
-rw-r--r-- | components/script/dom/gpucommandencoder.rs | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/components/script/dom/gpucommandencoder.rs b/components/script/dom/gpucommandencoder.rs index 03b9373f3ab..348e77828f1 100644 --- a/components/script/dom/gpucommandencoder.rs +++ b/components/script/dom/gpucommandencoder.rs @@ -87,14 +87,14 @@ impl GPUCommandEncoderMethods for GPUCommandEncoder { .insert(DomRoot::from_ref(destination)); self.channel .0 - .send(WebGPURequest::CopyBufferToBuffer( - self.encoder.0, - source.id().0, + .send(WebGPURequest::CopyBufferToBuffer { + command_encoder_id: self.encoder.0, + source_id: source.id().0, source_offset, - destination.id().0, + destination_id: destination.id().0, destination_offset, size, - )) + }) .expect("Failed to send CopyBufferToBuffer"); } @@ -103,12 +103,12 @@ impl GPUCommandEncoderMethods for GPUCommandEncoder { let (sender, receiver) = ipc::channel().unwrap(); self.channel .0 - .send(WebGPURequest::CommandEncoderFinish( + .send(WebGPURequest::CommandEncoderFinish { sender, - self.encoder.0, + command_encoder_id: self.encoder.0, // TODO(zakorgy): We should use `_descriptor` here after it's not empty // and the underlying wgpu-core struct is serializable - )) + }) .expect("Failed to send Finish"); let buffer = receiver.recv().unwrap(); |