1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-16 22:55:06 +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:
Andreas Kling 2019-10-19 19:56:49 +02:00
parent 02e787f8a4
commit f970578cd4
8 changed files with 32 additions and 32 deletions

View file

@ -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;