mirror of
https://github.com/servo/servo
synced 2026-05-10 00:52:08 +02:00
This inserts a cache in painter that keeps data for animating images in Painter. We then can send cheap ImageUpdate::UpdateAnimation to just get the required bytes from the cache. There are some warts with the current design: - ImageUpdate::AddImage only adds images in the cache that have the data in SerializableImageData::Raw. Potentially there could be image animations in other ways which then for a following ImageUpdate::UpdateAnimation we do not have the data. We can probably fix this on the sender side. Signed-off-by: Narfinger <Narfinger@users.noreply.github.com> Testing: Tested on the usecase in https://github.com/servo/servo/issues/41818 and WPT test here: https://github.com/Narfinger/servo/actions/runs/21063721427 Fixes: https://github.com/servo/servo/issues/41818 --------- Signed-off-by: Narfinger <Narfinger@users.noreply.github.com>