Tests/LibGfx: Call ImageDecoder::size() before frame()

Reordering these calls allow us to ensure that all encoders are able to
return the size of the image before they are requested to decode the
whole bitmap.
This commit is contained in:
Lucas CHOLLET 2023-07-06 23:55:49 -04:00 committed by Sam Atkins
parent 7a48d59727
commit 7b4630932b
Notes: sideshowbarker 2024-07-17 07:43:44 +09:00

View file

@ -42,8 +42,8 @@ static Gfx::ImageFrameDescriptor expect_single_frame(Gfx::ImageDecoderPlugin& pl
static Gfx::ImageFrameDescriptor expect_single_frame_of_size(Gfx::ImageDecoderPlugin& plugin_decoder, Gfx::IntSize size)
{
auto frame = expect_single_frame(plugin_decoder);
EXPECT_EQ(plugin_decoder.size(), size);
auto frame = expect_single_frame(plugin_decoder);
EXPECT_EQ(frame.image->size(), size);
return frame;
}