mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 09:45:06 +02:00
Add AnimatedDecodedImageData which implements DecodedImageData with an 8-slot buffer pool instead of storing all frames in memory. Frames are requested on demand from the ImageDecoder service as the animation progresses. For a 344-frame animated image at 1920x1080, this reduces WebContent memory from ~1.3 GB to ~66 MB. The streaming class owns frame progression and synchronizes multiple callers (HTMLImageElement and ImageStyleValue) through notify_frame_advanced() returning the authoritative frame index. When a frame isn't in the pool, the last displayed frame is shown as a fallback (brief freeze rather than blank). Rename the old AnimatedBitmapDecodedImageData (which now only handles static/single-frame images) to BitmapDecodedImageData.
7.5 KiB
7.5 KiB