mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-12 09:56:45 +02:00
LibGfx+LibWeb: Add DecodedImageFrame
Decoded image data should not continue to traffic in ImmutableBitmap now that the bitmap wrapper is being retired. Introduce DecodedImageFrame as the paintable decoded-image unit and store a Bitmap plus ColorSpace in it directly. Thread the new frame type through decoded image data, display-list image commands, filters, canvas drawImage, patterns, WebGL texture upload, and CSS/SVG image consumers. ImmutableBitmap remains only at the legacy boundaries that still need it, such as HTML video snapshots and callers that explicitly ask for a bitmap snapshot. This keeps color-space ownership with the decoded frame while making the expensive or legacy ImmutableBitmap path explicit at the few call sites that still need it.
This commit is contained in:
committed by
Gregory Bertilson
parent
3c25d080b1
commit
40f2abb7fe
Notes:
github-actions[bot]
2026-05-05 19:40:35 +00:00
Author: https://github.com/kalenikaliaksandr Commit: https://github.com/LadybirdBrowser/ladybird/commit/40f2abb7fe7 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/9249 Reviewed-by: https://github.com/Zaggy1024 ✅
@@ -354,4 +354,15 @@ RefPtr<Gfx::ImmutableBitmap> HTMLVideoElement::bitmap() const
|
||||
return bitmap_or_error.release_value();
|
||||
}
|
||||
|
||||
Gfx::ColorSpace const* HTMLVideoElement::current_frame_color_space() const
|
||||
{
|
||||
auto const& sink = selected_video_track_sink();
|
||||
if (sink == nullptr)
|
||||
return nullptr;
|
||||
auto current_frame = sink->current_frame();
|
||||
if (!current_frame)
|
||||
return nullptr;
|
||||
return ¤t_frame->color_space();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user