mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 00:47:34 +00:00
LibGfx: In WebP, rename decode_webp_first_chunk to read_webp_first_chunk
This commit is contained in:
parent
799d570afc
commit
15d2e8ca2b
1 changed files with 6 additions and 6 deletions
|
@ -86,7 +86,7 @@ struct WebPLoadingContext {
|
||||||
NotDecoded = 0,
|
NotDecoded = 0,
|
||||||
Error,
|
Error,
|
||||||
HeaderDecoded,
|
HeaderDecoded,
|
||||||
FirstChunkDecoded,
|
FirstChunkRead,
|
||||||
SizeDecoded,
|
SizeDecoded,
|
||||||
ChunksDecoded,
|
ChunksDecoded,
|
||||||
BitmapDecoded,
|
BitmapDecoded,
|
||||||
|
@ -361,9 +361,9 @@ static ErrorOr<void> decode_webp_extended(WebPLoadingContext& context, ReadonlyB
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
static ErrorOr<void> decode_webp_first_chunk(WebPLoadingContext& context)
|
static ErrorOr<void> read_webp_first_chunk(WebPLoadingContext& context)
|
||||||
{
|
{
|
||||||
if (context.state >= WebPLoadingContext::State::FirstChunkDecoded)
|
if (context.state >= WebPLoadingContext::State::FirstChunkRead)
|
||||||
return {};
|
return {};
|
||||||
|
|
||||||
if (context.state < WebPLoadingContext::HeaderDecoded)
|
if (context.state < WebPLoadingContext::HeaderDecoded)
|
||||||
|
@ -376,7 +376,7 @@ static ErrorOr<void> decode_webp_first_chunk(WebPLoadingContext& context)
|
||||||
return context.error("WebPImageDecoderPlugin: Invalid first chunk type");
|
return context.error("WebPImageDecoderPlugin: Invalid first chunk type");
|
||||||
|
|
||||||
context.first_chunk = first_chunk;
|
context.first_chunk = first_chunk;
|
||||||
context.state = WebPLoadingContext::State::FirstChunkDecoded;
|
context.state = WebPLoadingContext::State::FirstChunkRead;
|
||||||
|
|
||||||
if (first_chunk.type == FourCC("VP8 ") || first_chunk.type == FourCC("VP8L"))
|
if (first_chunk.type == FourCC("VP8 ") || first_chunk.type == FourCC("VP8L"))
|
||||||
context.image_data_chunk = first_chunk;
|
context.image_data_chunk = first_chunk;
|
||||||
|
@ -389,8 +389,8 @@ static ErrorOr<void> decode_webp_size(WebPLoadingContext& context)
|
||||||
if (context.state >= WebPLoadingContext::State::SizeDecoded)
|
if (context.state >= WebPLoadingContext::State::SizeDecoded)
|
||||||
return {};
|
return {};
|
||||||
|
|
||||||
if (context.state < WebPLoadingContext::FirstChunkDecoded)
|
if (context.state < WebPLoadingContext::FirstChunkRead)
|
||||||
TRY(decode_webp_first_chunk(context));
|
TRY(read_webp_first_chunk(context));
|
||||||
|
|
||||||
if (context.first_chunk->type == FourCC("VP8 ")) {
|
if (context.first_chunk->type == FourCC("VP8 ")) {
|
||||||
auto header = TRY(decode_webp_chunk_VP8_header(context, context.first_chunk.value()));
|
auto header = TRY(decode_webp_chunk_VP8_header(context, context.first_chunk.value()));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue