aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/gpucomputepassencoder.rs
diff options
context:
space:
mode:
authorIstvan Miklos <istvan.miklos@h-lab.eu>2020-02-05 11:32:52 +0100
committerIstvan Miklos <istvan.miklos@h-lab.eu>2020-02-27 15:10:24 +0100
commit000a5d543d8780a73ace6477c0c8255b8d7a97f6 (patch)
treef127a5ba0331d1663febec135de757abb30567dc /components/script/dom/gpucomputepassencoder.rs
parent0f9b04680a27e7503bb2ebceb41c5abc8d59a294 (diff)
downloadservo-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/gpucomputepassencoder.rs')
-rw-r--r--components/script/dom/gpucomputepassencoder.rs7
1 files changed, 5 insertions, 2 deletions
diff --git a/components/script/dom/gpucomputepassencoder.rs b/components/script/dom/gpucomputepassencoder.rs
index f6116c88f9d..a25f47e1330 100644
--- a/components/script/dom/gpucomputepassencoder.rs
+++ b/components/script/dom/gpucomputepassencoder.rs
@@ -81,11 +81,14 @@ impl GPUComputePassEncoderMethods for GPUComputePassEncoder {
/// https://gpuweb.github.io/gpuweb/#dom-gpurenderpassencoder-endpass
fn EndPass(&self) {
if let Some(raw_pass) = self.raw_pass.borrow_mut().take() {
- let (pass_data, id) = unsafe { raw_pass.finish_compute() };
+ let (pass_data, command_encoder_id) = unsafe { raw_pass.finish_compute() };
self.channel
.0
- .send(WebGPURequest::RunComputePass(id, pass_data))
+ .send(WebGPURequest::RunComputePass {
+ command_encoder_id,
+ pass_data,
+ })
.unwrap();
}
}