OLD | NEW |
1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 PDFium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
6 | 6 |
7 #include "core/fpdfapi/fpdf_page/pageint.h" | 7 #include "core/fpdfapi/fpdf_page/pageint.h" |
8 | 8 |
9 #include <limits.h> | 9 #include <limits.h> |
10 | 10 |
(...skipping 756 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
767 m_StreamArray[m_CurrentOffset]->LoadAllData(pStreamObj, FALSE); | 767 m_StreamArray[m_CurrentOffset]->LoadAllData(pStreamObj, FALSE); |
768 m_CurrentOffset++; | 768 m_CurrentOffset++; |
769 } | 769 } |
770 } | 770 } |
771 if (m_InternalStage == STAGE_PARSE) { | 771 if (m_InternalStage == STAGE_PARSE) { |
772 if (!m_pParser) { | 772 if (!m_pParser) { |
773 m_pParser.reset(new CPDF_StreamContentParser( | 773 m_pParser.reset(new CPDF_StreamContentParser( |
774 m_pObjectHolder->m_pDocument, m_pObjectHolder->m_pPageResources, | 774 m_pObjectHolder->m_pDocument, m_pObjectHolder->m_pPageResources, |
775 nullptr, nullptr, m_pObjectHolder, m_pObjectHolder->m_pResources, | 775 nullptr, nullptr, m_pObjectHolder, m_pObjectHolder->m_pResources, |
776 &m_pObjectHolder->m_BBox, nullptr, 0)); | 776 &m_pObjectHolder->m_BBox, nullptr, 0)); |
777 m_pParser->GetCurStates()->m_ColorState.GetPrivateCopy()->Default(); | 777 m_pParser->GetCurStates()->m_ColorState.SetDefault(); |
778 } | 778 } |
779 if (m_CurrentOffset >= m_Size) { | 779 if (m_CurrentOffset >= m_Size) { |
780 m_InternalStage = STAGE_CHECKCLIP; | 780 m_InternalStage = STAGE_CHECKCLIP; |
781 } else { | 781 } else { |
782 m_CurrentOffset += | 782 m_CurrentOffset += |
783 m_pParser->Parse(m_pData + m_CurrentOffset, | 783 m_pParser->Parse(m_pData + m_CurrentOffset, |
784 m_Size - m_CurrentOffset, PARSE_STEP_LIMIT); | 784 m_Size - m_CurrentOffset, PARSE_STEP_LIMIT); |
785 } | 785 } |
786 } | 786 } |
787 if (m_InternalStage == STAGE_CHECKCLIP) { | 787 if (m_InternalStage == STAGE_CHECKCLIP) { |
(...skipping 30 matching lines...) Expand all Loading... |
818 } | 818 } |
819 m_Status = Done; | 819 m_Status = Done; |
820 return; | 820 return; |
821 } | 821 } |
822 steps++; | 822 steps++; |
823 if (pPause && pPause->NeedToPauseNow()) { | 823 if (pPause && pPause->NeedToPauseNow()) { |
824 break; | 824 break; |
825 } | 825 } |
826 } | 826 } |
827 } | 827 } |
OLD | NEW |