mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-24 09:52:31 +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
|
@ -42,6 +42,12 @@ static void default_source_size(CanvasImageSource const& image, float& source_wi
|
|||
source_height = source->video_height();
|
||||
}
|
||||
},
|
||||
[&source_width, &source_height](GC::Root<OffscreenCanvas> const& source) {
|
||||
auto const bitmap = source->bitmap();
|
||||
|
||||
source_width = bitmap->width();
|
||||
source_height = bitmap->height();
|
||||
},
|
||||
[&source_width, &source_height](GC::Root<HTMLCanvasElement> const& source) {
|
||||
if (source->surface()) {
|
||||
source_width = source->surface()->size().width();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue