aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/gpuqueue.rs
diff options
context:
space:
mode:
authorbors-servo <lbergstrom+bors@mozilla.com>2020-02-27 13:10:48 -0500
committerGitHub <noreply@github.com>2020-02-27 13:10:48 -0500
commit79b20c62c2a5588f603bfdbe997d906d078571bc (patch)
treea75ae22569d53fdc9ff5fa5990cc91b2a7f55337 /components/script/dom/gpuqueue.rs
parent719b1972a6d2b2fd74cf8c6b658c8da3f862eb6c (diff)
parent000a5d543d8780a73ace6477c0c8255b8d7a97f6 (diff)
downloadservo-79b20c62c2a5588f603bfdbe997d906d078571bc.tar.gz
servo-79b20c62c2a5588f603bfdbe997d906d078571bc.zip
Auto merge of #25850 - szeged:wgpu_lib_cleanup, r=jdm
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. <!-- Please describe your changes on the following line: --> --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> cc @kvark @jdm @zakorgy <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
Diffstat (limited to 'components/script/dom/gpuqueue.rs')
-rw-r--r--components/script/dom/gpuqueue.rs7
1 files changed, 5 insertions, 2 deletions
diff --git a/components/script/dom/gpuqueue.rs b/components/script/dom/gpuqueue.rs
index dfa97402253..c257ec5ef09 100644
--- a/components/script/dom/gpuqueue.rs
+++ b/components/script/dom/gpuqueue.rs
@@ -64,10 +64,13 @@ impl GPUQueueMethods for GPUQueue {
// TODO: Generate error to the ErrorScope
return;
}
- let buffer_ids = command_buffers.iter().map(|cb| cb.id().0).collect();
+ let command_buffers = command_buffers.iter().map(|cb| cb.id().0).collect();
self.channel
.0
- .send(WebGPURequest::Submit(self.queue.0, buffer_ids))
+ .send(WebGPURequest::Submit {
+ queue_id: self.queue.0,
+ command_buffers,
+ })
.unwrap();
}
}