mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 11:37:34 +00:00
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:
parent
d01b4327fa
commit
751cb094ff
13 changed files with 35 additions and 49 deletions
|
@ -30,7 +30,6 @@ public:
|
|||
virtual ~ImageDecoderPlugin() { }
|
||||
|
||||
virtual IntSize size() = 0;
|
||||
virtual RefPtr<Gfx::Bitmap> bitmap() = 0;
|
||||
|
||||
virtual void set_volatile() = 0;
|
||||
[[nodiscard]] virtual bool set_nonvolatile(bool& was_purged) = 0;
|
||||
|
@ -43,6 +42,8 @@ public:
|
|||
virtual ImageFrameDescriptor frame(size_t i) = 0;
|
||||
|
||||
protected:
|
||||
virtual RefPtr<Gfx::Bitmap> bitmap() = 0;
|
||||
|
||||
ImageDecoderPlugin() { }
|
||||
};
|
||||
|
||||
|
@ -54,7 +55,6 @@ public:
|
|||
IntSize size() const { return m_plugin->size(); }
|
||||
int width() const { return size().width(); }
|
||||
int height() const { return size().height(); }
|
||||
RefPtr<Gfx::Bitmap> bitmap() const;
|
||||
void set_volatile() { m_plugin->set_volatile(); }
|
||||
[[nodiscard]] bool set_nonvolatile(bool& was_purged) { return m_plugin->set_nonvolatile(was_purged); }
|
||||
bool sniff() const { return m_plugin->sniff(); }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue