summaryrefslogtreecommitdiff
path: root/Userland/Services
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2021-07-27 01:29:50 +0200
committerAndreas Kling <kling@serenityos.org>2021-07-27 01:29:50 +0200
commit751cb094ff5f2752cca3629f951bd9e99efc77f4 (patch)
treed80f67f92e34ed560fe82228817e5d1f15c7006c /Userland/Services
parentd01b4327fabeabe77a3e57ab5d8a7dfb82eb3c52 (diff)
downloadserenity-751cb094ff5f2752cca3629f951bd9e99efc77f4.zip
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.
Diffstat (limited to 'Userland/Services')
-rw-r--r--Userland/Services/ImageDecoder/ClientConnection.cpp9
1 files changed, 1 insertions, 8 deletions
diff --git a/Userland/Services/ImageDecoder/ClientConnection.cpp b/Userland/Services/ImageDecoder/ClientConnection.cpp
index d47c4d46e9..3469a4ac83 100644
--- a/Userland/Services/ImageDecoder/ClientConnection.cpp
+++ b/Userland/Services/ImageDecoder/ClientConnection.cpp
@@ -52,14 +52,7 @@ Messages::ImageDecoderServer::DecodeImageResponse ClientConnection::decode_image
Vector<Gfx::ShareableBitmap> bitmaps;
Vector<u32> durations;
for (size_t i = 0; i < decoder->frame_count(); ++i) {
- // FIXME: All image decoder plugins should be rewritten to return frame() instead of bitmap().
- // Non-animated images can simply return 1 frame.
- Gfx::ImageFrameDescriptor frame;
- if (decoder->is_animated()) {
- frame = decoder->frame(i);
- } else {
- frame.image = decoder->bitmap();
- }
+ auto frame = decoder->frame(i);
if (frame.image)
bitmaps.append(frame.image->to_shareable_bitmap());
else