mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 07:58:11 +00:00
LibWeb: Remove Gfx::ImageDecoder from ImageLoader
We still use a Gfx::ImageDecoder for GIF images, but there's no need for the ImageLoader object to have its own pointer to it. Just grab the ImageDecoder from the ImageResource when needed.
This commit is contained in:
parent
9ef5d46277
commit
fbd760379a
4 changed files with 12 additions and 32 deletions
|
@ -39,7 +39,6 @@ public:
|
|||
void load(const URL&);
|
||||
|
||||
const Gfx::Bitmap* bitmap() const;
|
||||
const Gfx::ImageDecoder* image_decoder() const;
|
||||
|
||||
bool has_image() const;
|
||||
|
||||
|
@ -56,12 +55,10 @@ private:
|
|||
// ^ImageResourceClient
|
||||
virtual void resource_did_load() override;
|
||||
virtual void resource_did_fail() override;
|
||||
virtual void resource_did_replace_decoder() override;
|
||||
virtual bool is_visible_in_viewport() const override { return m_visible_in_viewport; }
|
||||
|
||||
void animate();
|
||||
|
||||
RefPtr<Gfx::ImageDecoder> m_decoder;
|
||||
mutable bool m_visible_in_viewport { false };
|
||||
|
||||
size_t m_current_frame_index { 0 };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue