mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Implement GPURenderBundleEncoder and GPURenderBundle
This commit is contained in:
parent
75abccb16b
commit
aff22db33f
32 changed files with 676 additions and 115 deletions
|
@ -21,11 +21,15 @@ pub struct GPUTextureView {
|
|||
}
|
||||
|
||||
impl GPUTextureView {
|
||||
fn new_inherited(texture_view: WebGPUTextureView, texture: &GPUTexture) -> GPUTextureView {
|
||||
fn new_inherited(
|
||||
texture_view: WebGPUTextureView,
|
||||
texture: &GPUTexture,
|
||||
label: Option<USVString>,
|
||||
) -> GPUTextureView {
|
||||
Self {
|
||||
reflector_: Reflector::new(),
|
||||
texture: Dom::from_ref(texture),
|
||||
label: DomRefCell::new(None),
|
||||
label: DomRefCell::new(label),
|
||||
texture_view,
|
||||
}
|
||||
}
|
||||
|
@ -34,9 +38,10 @@ impl GPUTextureView {
|
|||
global: &GlobalScope,
|
||||
texture_view: WebGPUTextureView,
|
||||
texture: &GPUTexture,
|
||||
label: Option<USVString>,
|
||||
) -> DomRoot<GPUTextureView> {
|
||||
reflect_dom_object(
|
||||
Box::new(GPUTextureView::new_inherited(texture_view, texture)),
|
||||
Box::new(GPUTextureView::new_inherited(texture_view, texture, label)),
|
||||
global,
|
||||
)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue