mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 08:17:45 +00:00
LibGfx/PNG: Remove the useless HeaderDecoded
state
This commit is contained in:
parent
a173275afa
commit
5d94bb4fcc
1 changed files with 0 additions and 5 deletions
|
@ -156,7 +156,6 @@ struct PNGLoadingContext {
|
||||||
enum State {
|
enum State {
|
||||||
NotDecoded = 0,
|
NotDecoded = 0,
|
||||||
Error,
|
Error,
|
||||||
HeaderDecoded,
|
|
||||||
IHDRDecoded,
|
IHDRDecoded,
|
||||||
ImageDataChunkDecoded,
|
ImageDataChunkDecoded,
|
||||||
ChunksDecoded,
|
ChunksDecoded,
|
||||||
|
@ -589,9 +588,6 @@ NEVER_INLINE FLATTEN static ErrorOr<void> unfilter(PNGLoadingContext& context)
|
||||||
|
|
||||||
static bool decode_png_header(PNGLoadingContext& context)
|
static bool decode_png_header(PNGLoadingContext& context)
|
||||||
{
|
{
|
||||||
if (context.state >= PNGLoadingContext::HeaderDecoded)
|
|
||||||
return true;
|
|
||||||
|
|
||||||
if (!context.data || context.data_size < sizeof(PNG::header)) {
|
if (!context.data || context.data_size < sizeof(PNG::header)) {
|
||||||
dbgln_if(PNG_DEBUG, "Missing PNG header");
|
dbgln_if(PNG_DEBUG, "Missing PNG header");
|
||||||
context.state = PNGLoadingContext::State::Error;
|
context.state = PNGLoadingContext::State::Error;
|
||||||
|
@ -605,7 +601,6 @@ static bool decode_png_header(PNGLoadingContext& context)
|
||||||
}
|
}
|
||||||
|
|
||||||
context.data_current_ptr = context.data + sizeof(PNG::header);
|
context.data_current_ptr = context.data + sizeof(PNG::header);
|
||||||
context.state = PNGLoadingContext::HeaderDecoded;
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue