1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 08:08:12 +00:00
serenity/Userland/Libraries/LibPDF
Nico Weber 9875ce0c78 LibPDF: Reorder loops in SampledFunction::evaluate()
Previously, we'd loop over the index of the output coordinate,
for example for a CMYK->RGB function, we'd loop over RGB. For
every output index, we'd then sample the function at the CMYK
input point.

Now, we sample at CMYK once and return a span for all outputs,
since they're stored in contiguous memory. And we then loop
over the outputs only to do weighting and mapping to the target
range at the end.

Reduces the runtime of

      (cd Tests/LibPDF; \
          ../../Build/lagom/bin/BenchmarkPDF --benchmark_repetitions 5)

from 235.6±2.3ms to 103.2±3.3ms on my system, and makes
SampledFunction::evaluate() more similar to lerp_nd() in TagTypes.h.
2024-02-13 19:45:19 +01:00
..
Fonts LibPDF: Scale default glyph width by font size and x scale 2024-02-12 14:32:04 +00:00
CMakeLists.txt LibPDF+Meta: Use a CMYK ICC profile to convert CMYK to RGB 2024-02-01 13:42:04 -07:00
ColorSpace.cpp LibPDF+Meta: Use a CMYK ICC profile to convert CMYK to RGB 2024-02-01 13:42:04 -07:00
ColorSpace.h LibPDF: Make DeviceCMYKColorSpace::the() fallible 2024-02-01 13:42:04 -07:00
CommonNames.cpp AK+Everywhere: Rename FlyString to DeprecatedFlyString 2023-01-09 23:00:24 +00:00
CommonNames.h LibPDF: Add some CIDFontType0C scaffolding 2024-02-12 13:59:00 +01:00
Document.cpp LibPDF: Return null for invalid refs, tolerate null objects as outline 2024-01-31 12:10:19 -05:00
Document.h LibPDF: Draw inline images 2023-12-20 12:45:16 -07:00
DocumentParser.cpp LibPDF: Return null for invalid refs, tolerate null objects as outline 2024-01-31 12:10:19 -05:00
DocumentParser.h LibPDF: Scan for PDF file start in first 1024 bytes 2024-01-03 10:12:35 +01:00
Encoding.cpp LibPDF: Add a FIXME and a spec comment to Encoding::from_object() 2024-01-04 10:12:11 +01:00
Encoding.h Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30
Encryption.cpp Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30
Encryption.h Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30
Error.h Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30
Filter.cpp LibPDF: Be more forgiving about trailing image data 2024-01-16 09:55:11 -05:00
Filter.h LibPDF: Start implementing the TIFF predictor 2024-01-15 23:06:06 -07:00
Forward.h Everywhere: Remove unused includes of AK/StdLibExtras.h 2023-01-02 20:27:20 -05:00
Function.cpp LibPDF: Reorder loops in SampledFunction::evaluate() 2024-02-13 19:45:19 +01:00
Function.h LibPDF: Add scaffolding for function objects 2023-11-06 10:01:05 +01:00
Interpolation.cpp LibPDF: Add first interpolation methods 2022-12-10 10:49:03 +01:00
Interpolation.h LibPDF: Add first interpolation methods 2022-12-10 10:49:03 +01:00
Object.h Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30
ObjectDerivatives.cpp LibPDF: Always treat /Subtype /Image as binary data when dumping 2024-02-05 21:18:19 -05:00
ObjectDerivatives.h Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30
Operator.h Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30
Page.cpp LibPDF: Don't accidentally form new tokens on pages with contents arrays 2023-10-23 13:23:54 -04:00
Page.h Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30
Parser.cpp LibPDF: Improve hex string parsing 2024-01-02 22:13:21 +01:00
Parser.h LibPDF: Extract Parser::parse_inline_image() 2023-12-22 10:58:54 +01:00
Reader.cpp LibPDF: Add Reader::consume_non_eol_whitespace() 2024-01-04 10:14:30 +01:00
Reader.h LibPDF: Add Reader::consume_non_eol_whitespace() 2024-01-04 10:14:30 +01:00
Reference.h LibPDF: Make Reference store two u32s instead of one 2023-07-10 17:48:15 +01:00
Renderer.cpp LibPDF: Make DeviceCMYKColorSpace::the() fallible 2024-02-01 13:42:04 -07:00
Renderer.h LibPDF+MacPDF: Clip text, and add a debug option for disabling it 2024-01-20 08:56:03 +01:00
Value.cpp Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30
Value.h Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30
XRefTable.h Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30