mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 04:37:34 +00:00
LibGfx: Provide a default implementation for animation-related methods
Most image decoders that we have only support non-animated images, providing a default implementation for them allows to remove quite some code.
This commit is contained in:
parent
7acb656826
commit
806808f406
14 changed files with 6 additions and 160 deletions
|
@ -81,10 +81,6 @@ public:
|
|||
static ErrorOr<NonnullOwnPtr<ImageDecoderPlugin>> create(ReadonlyBytes);
|
||||
|
||||
virtual IntSize size() override;
|
||||
virtual bool is_animated() override { return false; }
|
||||
virtual size_t loop_count() override { return 0; }
|
||||
virtual size_t frame_count() override { return 1; }
|
||||
virtual size_t first_animated_frame_index() override { return 0; }
|
||||
virtual ErrorOr<ImageFrameDescriptor> frame(size_t index, Optional<IntSize> ideal_size = {}) override;
|
||||
virtual ErrorOr<Optional<ReadonlyBytes>> icc_data() override { return OptionalNone {}; }
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue