ladybird/Userland/Libraries/LibGfx
sin-ack a10ad24c76 LibGfx: Make JPGLoader iterate components deterministically
JPGLoader used to store component information in a HashTable, indexed
by the ID assigned by the JPEG file.  This was fine for most purposes,
however after f89e8fb7 this was revealed to be a flawed implementation
which causes non-deterministic iteration over components.

This issue was previously masked by a perfect storm of int_hash being
stable for the integer values 0, 1 and 2; and AK::HashTable having just
the right amount of buckets for the components to be ordered correctly
after being hashed with int_hash. However, after f89e8fb7,
malloc_good_size was used for determining the amount of space for
allocation; this caused the ordering of the components to change, and
images started showing up with the red and blue channels reversed. The
issue was finally determined to be inconsistent ordering after randomly
changing the order of the components caused Huffman decoding to fail.

This was the result of about 10 hours of hair-pulling and repeatedly
doing full rebuilds due to bisecting between commits that touched AK.
Gunnar, I like you, but please don't make me go through this again. :^)

Credits to Andrew Kaster, bgianf, CxByte and Gunnar for the debugging
help.
2021-05-31 17:26:11 +01:00
..
Filters LibGfx: Unify Rect, Point, and Size 2021-05-02 22:48:06 +02:00
AffineTransform.cpp LibGfx: Add some helper methods to AffineTransform 2021-05-02 22:48:06 +02:00
AffineTransform.h LibGfx: Add some helper methods to AffineTransform 2021-05-02 22:48:06 +02:00
Bitmap.cpp LibGfx: Use anonymous buffer instead of raw anon_fd for Gfx::Bitmap 2021-05-24 13:31:01 +02:00
Bitmap.h LibGfx: Use anonymous buffer instead of raw anon_fd for Gfx::Bitmap 2021-05-24 13:31:01 +02:00
BitmapFont.cpp LibGfx+Base: Tweak bitmap fonts to ensure glyph data is 4-byte aligned 2021-05-24 08:18:34 +02:00
BitmapFont.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
BMPLoader.cpp LibGfx: Make sure we use unique class names 2021-05-28 07:59:05 +02:00
BMPLoader.h Userland: Use mattco@serenityos.org for my copyright headers 2021-04-23 08:24:53 +02:00
BMPWriter.cpp LibGfx: Make sure we use unique class names 2021-05-28 07:59:05 +02:00
BMPWriter.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
CharacterBitmap.cpp AK: Rename adopt() to adopt_ref() 2021-04-23 16:46:57 +02:00
CharacterBitmap.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
ClassicStylePainter.cpp Revert "Userland: static vs non-static constexpr variables" 2021-05-21 10:30:52 +01:00
ClassicStylePainter.h Everywhere: Add missing comma between copyright year and name 2021-04-29 00:59:26 +02:00
ClassicWindowTheme.cpp LibGfx: Remove Gfx::FontDatabase::default_bold_font() 2021-05-20 20:55:29 +02:00
ClassicWindowTheme.h WindowServer+LibGfx: Automatic "modified" markers in window titles 2021-05-01 19:42:29 +02:00
CMakeLists.txt LibGfx: Add support for DDS images 2021-05-18 08:45:53 +01:00
Color.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
Color.h LibGfx: remove constexpr, add noexcept on interpolate method 2021-05-27 00:01:38 +04:30
DDSLoader.cpp LibGfx: Add support for DDS images 2021-05-18 08:45:53 +01:00
DDSLoader.h LibGfx: Add support for DDS images 2021-05-18 08:45:53 +01:00
DisjointRectSet.cpp LibGfx: Unify Rect, Point, and Size 2021-05-02 22:48:06 +02:00
DisjointRectSet.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
Emoji.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
Emoji.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
Font.h Everywhere: Use s.unverwerth@serenityos.org :^) 2021-05-29 12:30:08 +01:00
FontDatabase.cpp LibGfx+WindowServer: Have WindowServer broadcast system font settings 2021-05-21 20:15:51 +02:00
FontDatabase.h LibGfx+WindowServer: Have WindowServer broadcast system font settings 2021-05-21 20:15:51 +02:00
Forward.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
Gamma.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
GIFLoader.cpp LibGfx: Load correct durations for gifs 2021-05-30 14:42:34 +01:00
GIFLoader.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
ICOLoader.cpp LibGfx: Switch to modern dbgln logging in ICOLoader 2021-05-29 21:46:16 +04:30
ICOLoader.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
ImageDecoder.cpp LibGfx: Add support for DDS images 2021-05-18 08:45:53 +01:00
ImageDecoder.h AK: Rename adopt() to adopt_ref() 2021-04-23 16:46:57 +02:00
JPGLoader.cpp LibGfx: Make JPGLoader iterate components deterministically 2021-05-31 17:26:11 +01:00
JPGLoader.h Everywhere: Use "the SerenityOS developers." in copyright headers 2021-04-29 00:59:26 +02:00
Matrix4x4.h Everywhere: Use s.unverwerth@serenityos.org :^) 2021-05-29 12:30:08 +01:00
Matrix.h LibGfx/Matrix: Add inverse() and friends 2021-05-24 00:33:18 +01:00
Orientation.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
Painter.cpp LibGfx: Replace ellipse drawing algorithm 2021-05-23 18:28:27 +02:00
Painter.h LibGfx: Add Painter::draw_circle_arc_intersecting() 2021-05-20 22:08:02 +02:00
Palette.cpp AK: Rename adopt() to adopt_ref() 2021-04-23 16:46:57 +02:00
Palette.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
Path.cpp LibGfx: Convert StringBuilder::appendf() => AK::Format 2021-05-07 21:12:09 +02:00
Path.h LibGfx: Add Path::clear 2021-05-25 00:24:09 +04:30
PBMLoader.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
PBMLoader.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
PGMLoader.cpp LibGfx: Change "white_space" => "whitespace" 2021-05-09 09:59:22 +02:00
PGMLoader.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
PNGLoader.cpp Revert "Userland: static vs non-static constexpr variables" 2021-05-21 10:30:52 +01:00
PNGLoader.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
PNGWriter.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
PNGWriter.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
Point.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
Point.h Revert "LibGfx: Add directional floating-point scaling to Painter" 2021-05-03 16:37:05 +02:00
PortableImageLoaderCommon.h LibGfx: Change "white_space" => "whitespace" 2021-05-09 09:59:22 +02:00
PPMLoader.cpp LibGfx: Change "white_space" => "whitespace" 2021-05-09 09:59:22 +02:00
PPMLoader.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
Rect.cpp LibGfx: Add missing TextAlignment::BottomLeft 2021-05-21 08:04:31 +02:00
Rect.h LibGfx: Unify Rect, Point, and Size 2021-05-02 22:48:06 +02:00
ShareableBitmap.cpp LibGfx: Use anonymous buffer instead of raw anon_fd for Gfx::Bitmap 2021-05-24 13:31:01 +02:00
ShareableBitmap.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
Size.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
Size.h LibGfx: Unify Rect, Point, and Size 2021-05-02 22:48:06 +02:00
StandardCursor.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
Streamer.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
StylePainter.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
StylePainter.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
SystemTheme.cpp LibGfx: Remove unused current_system_theme() function 2021-05-20 22:12:42 +02:00
SystemTheme.h LibGfx: Remove unused current_system_theme() function 2021-05-20 22:12:42 +02:00
TextAlignment.h LibGfx: Add missing TextAlignment::BottomLeft 2021-05-21 08:04:31 +02:00
TextAttributes.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
TextDirection.cpp Everywhere: Fix a bunch of typos 2021-05-17 17:48:55 +01:00
TextDirection.h Everywhere: Fix a bunch of typos 2021-05-17 17:48:55 +01:00
TextElision.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
Triangle.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
Triangle.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
Typeface.cpp Everywhere: Use s.unverwerth@serenityos.org :^) 2021-05-29 12:30:08 +01:00
Typeface.h Everywhere: Use s.unverwerth@serenityos.org :^) 2021-05-29 12:30:08 +01:00
Vector2.h Everywhere: Use s.unverwerth@serenityos.org :^) 2021-05-29 12:30:08 +01:00
Vector3.h Everywhere: Use s.unverwerth@serenityos.org :^) 2021-05-29 12:30:08 +01:00
Vector4.h Everywhere: Use s.unverwerth@serenityos.org :^) 2021-05-29 12:30:08 +01:00
WindowTheme.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
WindowTheme.h WindowServer+LibGfx: Automatic "modified" markers in window titles 2021-05-01 19:42:29 +02:00