mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-12 04:22:28 +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
Notes:
sideshowbarker
2024-07-17 10:54:57 +09:00
Author: https://github.com/LucasChollet
Commit: 806808f406
Pull-request: https://github.com/SerenityOS/serenity/pull/20076
Issue: https://github.com/SerenityOS/serenity/issues/19893
Reviewed-by: https://github.com/AtkinsSJ ✅
14 changed files with 6 additions and 160 deletions
|
@ -1937,26 +1937,6 @@ ErrorOr<NonnullOwnPtr<ImageDecoderPlugin>> JPEGImageDecoderPlugin::create(Readon
|
|||
return plugin;
|
||||
}
|
||||
|
||||
bool JPEGImageDecoderPlugin::is_animated()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
size_t JPEGImageDecoderPlugin::loop_count()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
size_t JPEGImageDecoderPlugin::frame_count()
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
size_t JPEGImageDecoderPlugin::first_animated_frame_index()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
ErrorOr<ImageFrameDescriptor> JPEGImageDecoderPlugin::frame(size_t index, Optional<IntSize>)
|
||||
{
|
||||
if (index > 0)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue