1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 17:57:35 +00:00

LibGfx: Remove ImageDecoderPlugin::initialize()

No plugin is currently overriding the default implementation, which is a
no-op. So we can safely delete it.
This commit is contained in:
Lucas CHOLLET 2023-07-17 13:00:37 -04:00 committed by Sam Atkins
parent 3752facfbc
commit 4291288a31
18 changed files with 17 additions and 91 deletions

View file

@ -212,9 +212,9 @@ Icon FileIconProvider::icon_for_executable(DeprecatedString const& path)
} else {
// FIXME: Use the ImageDecoder service.
if (Gfx::PNGImageDecoderPlugin::sniff({ section->raw_data(), section->size() })) {
auto png_decoder = Gfx::PNGImageDecoderPlugin::create({ section->raw_data(), section->size() }).release_value_but_fixme_should_propagate_errors();
if (!png_decoder->initialize().is_error()) {
auto frame_or_error = png_decoder->frame(0);
auto png_decoder = Gfx::PNGImageDecoderPlugin::create({ section->raw_data(), section->size() });
if (!png_decoder.is_error()) {
auto frame_or_error = png_decoder.value()->frame(0);
if (!frame_or_error.is_error()) {
bitmap = frame_or_error.value().image;
}