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

LibGfx: Remove unused functions load_from_memory and load_impl

This commit is contained in:
Lucas CHOLLET 2023-03-12 16:13:01 -04:00 committed by Andreas Kling
parent 05e6ed6ecb
commit 4554d10fe5

View file

@ -240,26 +240,4 @@ static bool decode(TContext& context)
return true;
}
template<typename TContext>
static RefPtr<Gfx::Bitmap> load_impl(u8 const* data, size_t data_size)
{
TContext context {};
context.data = data;
context.data_size = data_size;
if (!decode(context)) {
return nullptr;
}
return context.bitmap;
}
template<typename TContext>
static RefPtr<Gfx::Bitmap> load_from_memory(u8 const* data, size_t length, DeprecatedString const& mmap_name)
{
auto bitmap = load_impl<TContext>(data, length);
if (bitmap)
bitmap->set_mmap_name(DeprecatedString::formatted("Gfx::Bitmap [{}] - Decoded {}: {}", bitmap->size(), TContext::FormatDetails::image_type, mmap_name));
return bitmap;
}
}