1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 11:38:11 +00:00
serenity/Userland/Libraries/LibGfx/ICC
Nico Weber 27e369cd19 LibGfx/ICC: Add a one-element cache for CLUT conversions
Our current CLUT code is pretty slow. A one-element cache can make
it quite a bit faster for images that have long runs of a single
color, such as illustrations.

It also seems to help with photos some (in `0000711.pdf` page 1) --
I suppose even them have enough repeating pixels for it to be worth
it.

Some numbers, with `pdf --render-bench`:

`0000711.pdf --page 1` (high-res photo)
before: 2.9s
after: 2.43s

`0000277.pdf --page 19` (my nemesis PDF, large-ish illustration)
before: 2.17s
after: 0.58s (!)

`0000502.pdf --page 2` (wat hoe dat)
before: 0.66s
after: 0.27s

`0000521.pdf --page 10 ` (japanese)
before: 0.52s
after: 0.29s

`0000364.pdf --page 1` (4 min test case)
before: 0.48s
after: 0.19s

Thanks to that last one, reduces the time for
`time Meta/test_pdf.py ~/Downloads/0000` from 4m22s to 1m28s.

Helps quite a bit with #23157 (but high-res photos are still too
slow).
2024-02-19 07:16:05 +00:00
..
BinaryFormat.h ICC: Rename XYZ and XYZNumber fields to uppercase 2023-04-29 06:49:36 +02:00
BinaryWriter.cpp LibGfx: Drop tags of unknown type instead of writing invalid icc files 2023-02-24 19:42:00 +01:00
BinaryWriter.h LibGfx: Add start of an ICC profile writer 2023-02-17 20:05:50 -07:00
DistinctFourCC.h LibGfx/ICC: Move enums to dedicated Enums.{cpp,h} 2023-12-04 08:02:36 +00:00
Enums.cpp LibGfx/ICC: Move enums to dedicated Enums.{cpp,h} 2023-12-04 08:02:36 +00:00
Enums.h LibGfx/ICC: Move enums to dedicated Enums.{cpp,h} 2023-12-04 08:02:36 +00:00
Profile.cpp LibGfx/ICC: Add a one-element cache for CLUT conversions 2024-02-19 07:16:05 +00:00
Profile.h LibGfx/ICC: Add a one-element cache for CLUT conversions 2024-02-19 07:16:05 +00:00
Tags.cpp LibGfx: Split ICC/Profile.{h,cpp} into several files 2023-01-28 00:27:07 +00:00
Tags.h LibGfx: Add v2 "ncol" tag, expand comment 2023-02-14 19:28:13 +01:00
TagTypes.cpp LibGfx/ICC: Ensure Macintosh ScriptCode length is within expected range 2023-11-12 07:58:39 +01:00
TagTypes.h LibGfx/ICC: Stop allocating a vector on each call to lerp_nd 2024-02-17 15:39:46 -05:00
WellKnownProfiles.cpp ICC: Add comment with a link to WellKnownProfiles.cpp 2023-04-29 06:49:36 +02:00
WellKnownProfiles.h LibGfx: Forward-declare TagData in WellKnownProfiles 2023-07-20 06:56:41 +01:00