1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 07:48:11 +00:00
serenity/Userland/Libraries/LibGfx/ImageFormats
Nico Weber 1fc56e56c3 LibGfx: Make webp lossless decoder 6 times as fast
Reduces the time to run

    Build/lagom/image ~/src/libwebp/webp_js/test_webp_wasm.webp -o tmp.png

from 0.5s to 0.25s.

Before, 60% of the time was spent decoding webp and 40% writing png.
Now, 16% of the time was spent decoding webp and 84% writing png.

That means png writing takes 0.2s, and webp decoding time went from
0.3s to 0.05s.

A template expression without explicit return type deduces its return
type as if for a function whose return type is declared auto. That
does deduce return-by-value, while `decltype(auto)` would deduce
return-by-reference.  Explictly saying `decltype(auto)` would work
too, but writing out the type is maybe easier to understand.

No behavior change other than being much faster.
2023-04-08 18:57:37 +02:00
..
BMPLoader.cpp
BMPLoader.h
BMPWriter.cpp
BMPWriter.h
DDSLoader.cpp
DDSLoader.h
GIFLoader.cpp
GIFLoader.h
ICOLoader.cpp
ICOLoader.h
ImageDecoder.cpp
ImageDecoder.h
JPEGLoader.cpp LibGfx/JPEG: Use a smaller type to store coefficients 2023-04-06 12:00:08 +01:00
JPEGLoader.h
PBMLoader.cpp LibGfx/PortableFormat: Propagate errors from read_image_data() 2023-03-24 10:56:58 +01:00
PBMLoader.h LibGfx/PortableFormat: Propagate errors from read_image_data() 2023-03-24 10:56:58 +01:00
PGMLoader.cpp LibGfx/PortableFormat: Use static_cast instead of C-style casts 2023-03-24 10:56:58 +01:00
PGMLoader.h LibGfx/PortableFormat: Propagate errors from read_image_data() 2023-03-24 10:56:58 +01:00
PNGLoader.cpp
PNGLoader.h
PNGShared.h
PNGWriter.cpp
PNGWriter.h
PortableFormatWriter.cpp
PortableFormatWriter.h
PortableImageLoaderCommon.h LibGfx/PortableFormat: Propagate errors from decode() 2023-03-24 10:56:58 +01:00
PortableImageMapLoader.h LibGfx/PortableFormat: Propagate errors from decode() 2023-03-24 10:56:58 +01:00
PPMLoader.cpp LibGfx/PortableFormat: Use static_cast instead of C-style casts 2023-03-24 10:56:58 +01:00
PPMLoader.h LibGfx/PortableFormat: Propagate errors from read_image_data() 2023-03-24 10:56:58 +01:00
QOILoader.cpp
QOILoader.h
QOIWriter.cpp
QOIWriter.h
TGALoader.cpp
TGALoader.h
WebPLoader.cpp LibGfx: Make webp lossless decoder 6 times as fast 2023-04-08 18:57:37 +02:00
WebPLoader.h