mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
webgl: Update IDL exposed members (#33509)
* Update IDLs to expose on Workers Signed-off-by: Daniel Adams <msub2official@gmail.com> * Update usage of Canvas/OffscreenCanvas union, add label Signed-off-by: Daniel Adams <msub2official@gmail.com> * Update WPT expectations Signed-off-by: Daniel Adams <msub2official@gmail.com> * Fix match arm Signed-off-by: Daniel Adams <msub2official@gmail.com> * Add missing spec links Signed-off-by: Daniel Adams <msub2official@gmail.com> * Update expectations Signed-off-by: Daniel Adams <msub2official@gmail.com> * Update interfaces.worker.js Signed-off-by: Daniel Adams <msub2official@gmail.com> --------- Signed-off-by: Daniel Adams <msub2official@gmail.com>
This commit is contained in:
parent
8276673bae
commit
3a0d27b231
22 changed files with 117 additions and 4772 deletions
|
@ -34,6 +34,7 @@ use crate::dom::bindings::codegen::Bindings::WebGLRenderingContextBinding::{
|
|||
};
|
||||
use crate::dom::bindings::codegen::UnionTypes::{
|
||||
ArrayBufferViewOrArrayBuffer, Float32ArrayOrUnrestrictedFloatSequence,
|
||||
HTMLCanvasElementOrOffscreenCanvas,
|
||||
ImageDataOrHTMLImageElementOrHTMLCanvasElementOrHTMLVideoElement, Int32ArrayOrLongSequence,
|
||||
Uint32ArrayOrUnsignedLongSequence,
|
||||
};
|
||||
|
@ -42,7 +43,7 @@ use crate::dom::bindings::reflector::{reflect_dom_object, DomObject, Reflector};
|
|||
use crate::dom::bindings::root::{Dom, DomRoot, LayoutDom, MutNullableDom};
|
||||
use crate::dom::bindings::str::DOMString;
|
||||
use crate::dom::globalscope::GlobalScope;
|
||||
use crate::dom::htmlcanvaselement::{HTMLCanvasElement, LayoutCanvasRenderingContextHelpers};
|
||||
use crate::dom::htmlcanvaselement::LayoutCanvasRenderingContextHelpers;
|
||||
use crate::dom::promise::Promise;
|
||||
use crate::dom::webgl_validations::tex_image_2d::{
|
||||
TexImage2DValidator, TexImage2DValidatorResult, TexStorageValidator, TexStorageValidatorResult,
|
||||
|
@ -139,7 +140,7 @@ struct ReadPixelsSizes {
|
|||
impl WebGL2RenderingContext {
|
||||
fn new_inherited(
|
||||
window: &Window,
|
||||
canvas: &HTMLCanvasElement,
|
||||
canvas: &HTMLCanvasElementOrOffscreenCanvas,
|
||||
size: Size2D<u32>,
|
||||
attrs: GLContextAttributes,
|
||||
) -> Option<WebGL2RenderingContext> {
|
||||
|
@ -186,7 +187,7 @@ impl WebGL2RenderingContext {
|
|||
#[allow(crown::unrooted_must_root)]
|
||||
pub fn new(
|
||||
window: &Window,
|
||||
canvas: &HTMLCanvasElement,
|
||||
canvas: &HTMLCanvasElementOrOffscreenCanvas,
|
||||
size: Size2D<u32>,
|
||||
attrs: GLContextAttributes,
|
||||
) -> Option<DomRoot<WebGL2RenderingContext>> {
|
||||
|
@ -902,7 +903,7 @@ impl WebGL2RenderingContext {
|
|||
|
||||
impl WebGL2RenderingContextMethods for WebGL2RenderingContext {
|
||||
/// <https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.1>
|
||||
fn Canvas(&self) -> DomRoot<HTMLCanvasElement> {
|
||||
fn Canvas(&self) -> HTMLCanvasElementOrOffscreenCanvas {
|
||||
self.base.Canvas()
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue