Eliminate allocations in PatternParser, PdfFunctionParser, and ShadingParser

This commit is contained in:
Jason Nelson
2024-04-08 13:57:12 -07:00
committed by BobLd
parent c3a2e8c08f
commit 90e07bc639
3 changed files with 3 additions and 3 deletions

View File

@@ -20,7 +20,7 @@
if (DirectObjectFinder.TryGet(pattern, scanner, out StreamToken? fs))
{
patternDictionary = fs.StreamDictionary;
patternStream = new StreamToken(fs.StreamDictionary, fs.Decode(filterProvider, scanner).ToArray());
patternStream = new StreamToken(fs.StreamDictionary, fs.Decode(filterProvider, scanner));
}
else if (DirectObjectFinder.TryGet(pattern, scanner, out DictionaryToken? fd))
{

View File

@@ -20,7 +20,7 @@
if (DirectObjectFinder.TryGet(function, scanner, out StreamToken? fs))
{
functionDictionary = fs.StreamDictionary;
functionStream = new StreamToken(fs.StreamDictionary, fs.Decode(filterProvider, scanner).ToArray());
functionStream = new StreamToken(fs.StreamDictionary, fs.Decode(filterProvider, scanner));
}
else if (DirectObjectFinder.TryGet(function, scanner, out DictionaryToken? fd))
{

View File

@@ -21,7 +21,7 @@
if (shading is StreamToken fs)
{
shadingDictionary = fs.StreamDictionary;
shadingStream = new StreamToken(fs.StreamDictionary, fs.Decode(filterProvider, scanner).ToArray());
shadingStream = new StreamToken(fs.StreamDictionary, fs.Decode(filterProvider, scanner));
}
else if (shading is DictionaryToken fd)
{