mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 12:37:44 +00:00
LibGfx: Remove unused functions load_from_memory
and load_impl
This commit is contained in:
parent
05e6ed6ecb
commit
4554d10fe5
1 changed files with 0 additions and 22 deletions
|
@ -240,26 +240,4 @@ static bool decode(TContext& context)
|
||||||
return true;
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue