Inplace strings - performance optimization

This commit is contained in:
Jakub Melka
2020-05-29 19:56:10 +02:00
parent 702ee98316
commit 91f1779053
12 changed files with 198 additions and 60 deletions

View File

@ -2118,7 +2118,7 @@ void PDFPageContentProcessor::operatorColorSetStrokingColorSpace(PDFPageContentP
return;
}
PDFColorSpacePointer colorSpace = PDFAbstractColorSpace::createColorSpace(m_colorSpaceDictionary, m_document, PDFObject::createName(std::make_shared<PDFString>(QByteArray(name.name))));
PDFColorSpacePointer colorSpace = PDFAbstractColorSpace::createColorSpace(m_colorSpaceDictionary, m_document, PDFObject::createName(name.name));
if (colorSpace)
{
// We must also set default color (it can depend on the color space)
@ -2141,7 +2141,7 @@ void PDFPageContentProcessor::operatorColorSetFillingColorSpace(PDFOperandName n
return;
}
PDFColorSpacePointer colorSpace = PDFAbstractColorSpace::createColorSpace(m_colorSpaceDictionary, m_document, PDFObject::createName(std::make_shared<PDFString>(QByteArray(name.name))));
PDFColorSpacePointer colorSpace = PDFAbstractColorSpace::createColorSpace(m_colorSpaceDictionary, m_document, PDFObject::createName(name.name));
if (colorSpace)
{
// We must also set default color (it can depend on the color space)