LibPDF: Dedicated messages for Indexed and Pattern spaces

Makes them easier to interpret in `pdf --debugging-stats` output.
This commit is contained in:
Nico Weber 2023-07-23 22:44:52 -04:00 committed by Tim Flynn
parent 4bb29e6ac4
commit 5aab31dc40
Notes: sideshowbarker 2024-07-17 02:28:18 +09:00
2 changed files with 7 additions and 2 deletions

View file

@ -39,8 +39,6 @@ PDFErrorOr<NonnullRefPtr<ColorSpace>> ColorSpace::create(DeprecatedFlyString con
return DeviceRGBColorSpace::the();
if (name == CommonNames::DeviceCMYK)
return DeviceCMYKColorSpace::the();
if (name == CommonNames::Pattern)
return Error::rendering_unsupported_error("Pattern color spaces not yet implemented");
VERIFY_NOT_REACHED();
}
@ -59,6 +57,12 @@ PDFErrorOr<NonnullRefPtr<ColorSpace>> ColorSpace::create(Document* document, Non
if (color_space_name == CommonNames::ICCBased)
return TRY(ICCBasedColorSpace::create(document, move(parameters)));
if (color_space_name == CommonNames::Indexed)
return Error::rendering_unsupported_error("Indexed color spaces not yet implemented");
if (color_space_name == CommonNames::Pattern)
return Error::rendering_unsupported_error("Pattern color spaces not yet implemented");
if (color_space_name == CommonNames::Separation)
return TRY(SeparationColorSpace::create(document, move(parameters)));

View file

@ -84,6 +84,7 @@
A(Image) \
A(ImageMask) \
A(Index) \
A(Indexed) \
A(Info) \
A(JBIG2Decode) \
A(JPXDecode) \