mirror of
https://github.com/servo/servo.git
synced 2025-07-24 15:50:21 +01:00
Implement GPURenderBundleEncoder and GPURenderBundle
This commit is contained in:
parent
75abccb16b
commit
aff22db33f
32 changed files with 676 additions and 115 deletions
|
@ -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,
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue