Update wgpu-core and wgpu-types

This commit is contained in:
Kunal Mohan 2020-06-19 00:52:16 +05:30
parent 00b3f785c4
commit 48ef306bd3
13 changed files with 244 additions and 366 deletions

View file

@ -19,6 +19,7 @@ use crate::dom::gpurenderpipeline::GPURenderPipeline;
use dom_struct::dom_struct;
use webgpu::{
wgpu::command::{render_ffi as wgpu_render, RawPass},
wgpu::id,
wgt, WebGPU, WebGPURequest,
};
@ -29,12 +30,16 @@ pub struct GPURenderPassEncoder {
channel: WebGPU,
label: DomRefCell<Option<DOMString>>,
#[ignore_malloc_size_of = "defined in wgpu-core"]
raw_pass: DomRefCell<Option<RawPass>>,
raw_pass: DomRefCell<Option<RawPass<id::CommandEncoderId>>>,
command_encoder: Dom<GPUCommandEncoder>,
}
impl GPURenderPassEncoder {
fn new_inherited(channel: WebGPU, raw_pass: RawPass, parent: &GPUCommandEncoder) -> Self {
fn new_inherited(
channel: WebGPU,
raw_pass: RawPass<id::CommandEncoderId>,
parent: &GPUCommandEncoder,
) -> Self {
Self {
channel,
reflector_: Reflector::new(),
@ -47,7 +52,7 @@ impl GPURenderPassEncoder {
pub fn new(
global: &GlobalScope,
channel: WebGPU,
raw_pass: RawPass,
raw_pass: RawPass<id::CommandEncoderId>,
parent: &GPUCommandEncoder,
) -> DomRoot<Self> {
reflect_dom_object(