mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Implement GPURenderPassEncoder
Add webidls for GPURenderPassEncoder and GPURenderEncoderBase and implement relevant methods.
This commit is contained in:
parent
e452570be0
commit
1d4efb48ba
11 changed files with 524 additions and 35 deletions
|
@ -22,11 +22,7 @@ pub struct GPUTextureView {
|
|||
}
|
||||
|
||||
impl GPUTextureView {
|
||||
fn new_inherited(
|
||||
texture_view: WebGPUTextureView,
|
||||
device: WebGPUDevice,
|
||||
valid: bool,
|
||||
) -> GPUTextureView {
|
||||
fn new_inherited(texture_view: WebGPUTextureView, device: WebGPUDevice, valid: bool) -> Self {
|
||||
Self {
|
||||
reflector_: Reflector::new(),
|
||||
device,
|
||||
|
@ -41,7 +37,7 @@ impl GPUTextureView {
|
|||
texture_view: WebGPUTextureView,
|
||||
device: WebGPUDevice,
|
||||
valid: bool,
|
||||
) -> DomRoot<GPUTextureView> {
|
||||
) -> DomRoot<Self> {
|
||||
reflect_dom_object(
|
||||
Box::new(GPUTextureView::new_inherited(texture_view, device, valid)),
|
||||
global,
|
||||
|
@ -49,6 +45,12 @@ impl GPUTextureView {
|
|||
}
|
||||
}
|
||||
|
||||
impl GPUTextureView {
|
||||
pub fn id(&self) -> WebGPUTextureView {
|
||||
self.texture_view
|
||||
}
|
||||
}
|
||||
|
||||
impl GPUTextureViewMethods for GPUTextureView {
|
||||
/// https://gpuweb.github.io/gpuweb/#dom-gpuobjectbase-label
|
||||
fn GetLabel(&self) -> Option<DOMString> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue