mirror of
https://github.com/UglyToad/PdfPig.git
synced 2025-11-24 08:47:01 +08:00
Eliminate allocations in PatternParser, PdfFunctionParser, and ShadingParser
This commit is contained in:
@@ -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))
|
||||
{
|
||||
|
||||
@@ -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))
|
||||
{
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user