LibGfx: Remove Gfx::ImageDecoder::bitmap() in favor of frame(index)

To transparently support multi-frame images, all decoder plugins have
already been updated to return their only bitmap for frame(0).

This patch completes the remaining cleanup work by removing the
ImageDecoder::bitmap() API and having all clients call frame() instead.
This commit is contained in:
Andreas Kling 2021-07-27 01:29:50 +02:00
commit 751cb094ff
Notes: sideshowbarker 2024-07-18 08:03:51 +09:00
13 changed files with 35 additions and 49 deletions

View file

@ -1013,10 +1013,9 @@ size_t PNGImageDecoderPlugin::frame_count()
ImageFrameDescriptor PNGImageDecoderPlugin::frame(size_t i)
{
if (i > 0) {
return { bitmap(), 0 };
}
return {};
if (i > 0)
return {};
return { bitmap(), 0 };
}
}