mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-01 15:18:06 +00:00
LibWeb: Add OffscreenCanvas to IDL types
Add OffscreenCanvas to TexImageSource and CanvasImageSource. Implement all the necessary features to make it work in all cases where these types are used.
This commit is contained in:
parent
2ad3ce5d37
commit
f1a096d6e4
Notes:
github-actions[bot]
2025-06-30 15:47:37 +00:00
Author: https://github.com/Totto16
Commit: f1a096d6e4
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3788
Reviewed-by: https://github.com/ADKaster ✅
Reviewed-by: https://github.com/tcl3
8 changed files with 35 additions and 9 deletions
|
@ -6,8 +6,14 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <LibWeb/Forward.h>
|
||||
#include <LibWeb/WebIDL/Types.h>
|
||||
|
||||
namespace Web::WebGL {
|
||||
|
||||
// NOTE: This is the Variant created by the IDL wrapper generator, and needs to be updated accordingly.
|
||||
using TexImageSource = Variant<GC::Root<HTML::ImageBitmap>, GC::Root<HTML::ImageData>, GC::Root<HTML::HTMLImageElement>, GC::Root<HTML::HTMLCanvasElement>, GC::Root<HTML::OffscreenCanvas>, GC::Root<HTML::HTMLVideoElement>>;
|
||||
|
||||
// FIXME: This object should inherit from Bindings::PlatformObject and implement the WebGLRenderingContextBase IDL interface.
|
||||
// We should make WebGL code generator to produce implementation for this interface.
|
||||
class WebGLRenderingContextBase {
|
||||
|
|
|
@ -4,8 +4,8 @@ typedef (ImageBitmap or
|
|||
ImageData or
|
||||
HTMLImageElement or
|
||||
HTMLCanvasElement or
|
||||
HTMLVideoElement
|
||||
// FIXME: OffscreenCanvas or
|
||||
HTMLVideoElement or
|
||||
OffscreenCanvas
|
||||
// FIXME: VideoFrame
|
||||
) TexImageSource;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue