LibWeb: Don't animate images outside the visible viewport :^)

This commit is contained in:
Andreas Kling 2020-06-14 19:35:10 +02:00
parent 73c9f7ebf4
commit 0072370459
Notes: sideshowbarker 2024-07-19 05:38:46 +09:00

View file

@ -87,6 +87,9 @@ void ImageLoader::resource_did_load()
void ImageLoader::animate() void ImageLoader::animate()
{ {
if (!m_visible_in_viewport)
return;
auto* decoder = image_decoder(); auto* decoder = image_decoder();
ASSERT(decoder); ASSERT(decoder);