mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-02-24 00:24:38 +00:00
LibDraw: Rename ImageLoader => ImageDecoder
ImageLoader was not the right name for this, as there is no loading happening, only decoding. :^)
This commit is contained in:
@@ -661,18 +661,18 @@ static bool process_chunk(Streamer& streamer, PNGLoadingContext& context, bool d
|
||||
return true;
|
||||
}
|
||||
|
||||
PNGImageLoaderPlugin::PNGImageLoaderPlugin(const u8* data, size_t size)
|
||||
PNGImageDecoderPlugin::PNGImageDecoderPlugin(const u8* data, size_t size)
|
||||
{
|
||||
m_context = make<PNGLoadingContext>();
|
||||
m_context->data = data;
|
||||
m_context->data_size = size;
|
||||
}
|
||||
|
||||
PNGImageLoaderPlugin::~PNGImageLoaderPlugin()
|
||||
PNGImageDecoderPlugin::~PNGImageDecoderPlugin()
|
||||
{
|
||||
}
|
||||
|
||||
Size PNGImageLoaderPlugin::size()
|
||||
Size PNGImageDecoderPlugin::size()
|
||||
{
|
||||
if (m_context->state == PNGLoadingContext::State::Error)
|
||||
return {};
|
||||
@@ -686,7 +686,7 @@ Size PNGImageLoaderPlugin::size()
|
||||
return { m_context->width, m_context->height };
|
||||
}
|
||||
|
||||
RefPtr<GraphicsBitmap> PNGImageLoaderPlugin::bitmap()
|
||||
RefPtr<GraphicsBitmap> PNGImageDecoderPlugin::bitmap()
|
||||
{
|
||||
if (m_context->state == PNGLoadingContext::State::Error)
|
||||
return nullptr;
|
||||
|
||||
Reference in New Issue
Block a user