summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibGfx/ICOLoader.cpp
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/Libraries/LibGfx/ICOLoader.cpp
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/Libraries/LibGfx/ICOLoader.cpp')
-rw-r--r--Userland/Libraries/LibGfx/ICOLoader.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/Userland/Libraries/LibGfx/ICOLoader.cpp b/Userland/Libraries/LibGfx/ICOLoader.cpp
index 969117e938..fe151c006f 100644
--- a/Userland/Libraries/LibGfx/ICOLoader.cpp
+++ b/Userland/Libraries/LibGfx/ICOLoader.cpp
@@ -382,10 +382,9 @@ size_t ICOImageDecoderPlugin::frame_count()
ImageFrameDescriptor ICOImageDecoderPlugin::frame(size_t i)
{
- if (i > 0) {
- return { bitmap(), 0 };
- }
- return {};
+ if (i > 0)
+ return {};
+ return { bitmap(), 0 };
}
}