mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 01:35:08 +02:00
LibGfx+LibMedia: Send video frames to Skia as subsampled YUV
This saves us from having our own color conversion code, which was taking up a fair amount of time in VideoDataProvider. With this change, we should be able to play high resolution videos without interruptions on machines where the CPU can keep up with decoding. In order to make this change, ImmutableBitmap is now able to be constructed with YUV data instead of an RBG bitmap. It holds onto a YUVData instance that stores the buffers of image data, since Skia itself doesn't take ownership of them. In order to support greater than 8 bits of color depth, we normalize the 10- or 12-bit color values into a 16-bit range.
This commit is contained in:
committed by
Alexander Kalenik
parent
6a29b8cc03
commit
e6dbcccb99
Notes:
github-actions[bot]
2026-02-06 11:13:24 +00:00
Author: https://github.com/Zaggy1024 Commit: https://github.com/LadybirdBrowser/ladybird/commit/e6dbcccb99c Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/7549
@@ -187,7 +187,7 @@ WebIDL::ExceptionOr<void> HTMLVideoElement::determine_element_poster_frame(Optio
|
||||
return {};
|
||||
}
|
||||
|
||||
RefPtr<Gfx::Bitmap> HTMLVideoElement::bitmap() const
|
||||
RefPtr<Gfx::ImmutableBitmap> HTMLVideoElement::bitmap() const
|
||||
{
|
||||
auto const& sink = selected_video_track_sink();
|
||||
if (sink == nullptr)
|
||||
|
||||
Reference in New Issue
Block a user