diff options
author | Nico Weber <thakis@chromium.org> | 2023-02-25 20:05:36 -0500 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2023-02-26 15:54:22 +0100 |
commit | 15d2e8ca2ba614038469b5e8ab57ecd05b732a5e (patch) | |
tree | e4b420cf9c3ac98b94c98ca8b8505251c6932d1e | |
parent | 799d570afce18b0e84f7cf84b3d9edd2119480df (diff) | |
download | serenity-15d2e8ca2ba614038469b5e8ab57ecd05b732a5e.zip |
LibGfx: In WebP, rename decode_webp_first_chunk to read_webp_first_chunk
-rw-r--r-- | Userland/Libraries/LibGfx/WebPLoader.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Userland/Libraries/LibGfx/WebPLoader.cpp b/Userland/Libraries/LibGfx/WebPLoader.cpp index ca9644dea2..c66f6b6ae1 100644 --- a/Userland/Libraries/LibGfx/WebPLoader.cpp +++ b/Userland/Libraries/LibGfx/WebPLoader.cpp @@ -86,7 +86,7 @@ struct WebPLoadingContext { NotDecoded = 0, Error, HeaderDecoded, - FirstChunkDecoded, + FirstChunkRead, SizeDecoded, ChunksDecoded, BitmapDecoded, @@ -361,9 +361,9 @@ static ErrorOr<void> decode_webp_extended(WebPLoadingContext& context, ReadonlyB 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 {}; 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"); 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")) context.image_data_chunk = first_chunk; @@ -389,8 +389,8 @@ static ErrorOr<void> decode_webp_size(WebPLoadingContext& context) if (context.state >= WebPLoadingContext::State::SizeDecoded) return {}; - if (context.state < WebPLoadingContext::FirstChunkDecoded) - TRY(decode_webp_first_chunk(context)); + if (context.state < WebPLoadingContext::FirstChunkRead) + TRY(read_webp_first_chunk(context)); if (context.first_chunk->type == FourCC("VP8 ")) { auto header = TRY(decode_webp_chunk_VP8_header(context, context.first_chunk.value())); |