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:
parent
02e787f8a4
commit
f970578cd4
8 changed files with 32 additions and 32 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue