diff options
author | Andreas Kling <kling@serenityos.org> | 2021-11-20 14:29:33 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-11-21 20:22:48 +0100 |
commit | 5a79c69b0216f070b07d8238e4c2c7e3420faeec (patch) | |
tree | a88ee6dff60c34b27f383d36a4dfd3ba4b11c482 /Userland/Libraries/LibGfx/ImageDecoder.h | |
parent | ae7656072a403f69607109d941aa0c4b6274f60c (diff) | |
download | serenity-5a79c69b0216f070b07d8238e4c2c7e3420faeec.zip |
LibGfx: Make ImageDecoderPlugin::frame() return ErrorOr<>
This is a first step towards better error propagation from image codecs.
Diffstat (limited to 'Userland/Libraries/LibGfx/ImageDecoder.h')
-rw-r--r-- | Userland/Libraries/LibGfx/ImageDecoder.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Userland/Libraries/LibGfx/ImageDecoder.h b/Userland/Libraries/LibGfx/ImageDecoder.h index 7641402b99..62a164921d 100644 --- a/Userland/Libraries/LibGfx/ImageDecoder.h +++ b/Userland/Libraries/LibGfx/ImageDecoder.h @@ -39,7 +39,7 @@ public: virtual bool is_animated() = 0; virtual size_t loop_count() = 0; virtual size_t frame_count() = 0; - virtual ImageFrameDescriptor frame(size_t i) = 0; + virtual ErrorOr<ImageFrameDescriptor> frame(size_t index) = 0; protected: ImageDecoderPlugin() { } @@ -59,7 +59,7 @@ public: bool is_animated() const { return m_plugin->is_animated(); } size_t loop_count() const { return m_plugin->loop_count(); } size_t frame_count() const { return m_plugin->frame_count(); } - ImageFrameDescriptor frame(size_t i) const { return m_plugin->frame(i); } + ErrorOr<ImageFrameDescriptor> frame(size_t index) const { return m_plugin->frame(index); } private: explicit ImageDecoder(NonnullOwnPtr<ImageDecoderPlugin>); |