mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-12 09:56:45 +02:00
Decoded video frames should own their planar YUV data and color space directly. Keeping that storage behind ImmutableBitmap gave a still-image abstraction media-specific behavior and made calls like bitmap() potentially allocate and convert a whole video frame. Move YUV ownership into Media::VideoFrame, where the lifetime naturally follows media playback, and remove the YUV-backed mode from ImmutableBitmap. This commit intentionally keeps the visible Web paint path on ExternalContentSource by converting the current frame back to an ImmutableBitmap where Web still expects one. Callers that need pixels now ask the frame to convert explicitly. That preserves behavior for canvas and bitmap consumers while making the expensive YUV-to-pixel path visible at the call site instead of hiding it behind ImmutableBitmap::bitmap().
140 KiB
140 KiB