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 758 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
769 m_CurrentOffset++; | 769 m_CurrentOffset++; |
770 } | 770 } |
771 } | 771 } |
772 if (m_InternalStage == STAGE_PARSE) { | 772 if (m_InternalStage == STAGE_PARSE) { |
773 if (!m_pParser) { | 773 if (!m_pParser) { |
774 m_pParser.reset(new CPDF_StreamContentParser( | 774 m_pParser.reset(new CPDF_StreamContentParser( |
775 m_pObjectHolder->m_pDocument, m_pObjectHolder->m_pPageResources, | 775 m_pObjectHolder->m_pDocument, m_pObjectHolder->m_pPageResources, |
776 nullptr, nullptr, m_pObjectHolder, m_pObjectHolder->m_pResources, | 776 nullptr, nullptr, m_pObjectHolder, m_pObjectHolder->m_pResources, |
777 &m_pObjectHolder->m_BBox, nullptr, 0)); | 777 &m_pObjectHolder->m_BBox, nullptr, 0)); |
778 m_pParser->GetCurStates()->m_ColorState.MakePrivateCopy(); | 778 m_pParser->GetCurStates()->m_ColorState.MakePrivateCopy(); |
779 m_pParser->GetCurStates()->m_ColorState->SetDefault(); | 779 m_pParser->GetCurStates()->m_ColorState->Default(); |
780 } | 780 } |
781 if (m_CurrentOffset >= m_Size) { | 781 if (m_CurrentOffset >= m_Size) { |
782 m_InternalStage = STAGE_CHECKCLIP; | 782 m_InternalStage = STAGE_CHECKCLIP; |
783 } else { | 783 } else { |
784 m_CurrentOffset += | 784 m_CurrentOffset += |
785 m_pParser->Parse(m_pData + m_CurrentOffset, | 785 m_pParser->Parse(m_pData + m_CurrentOffset, |
786 m_Size - m_CurrentOffset, PARSE_STEP_LIMIT); | 786 m_Size - m_CurrentOffset, PARSE_STEP_LIMIT); |
787 } | 787 } |
788 } | 788 } |
789 if (m_InternalStage == STAGE_CHECKCLIP) { | 789 if (m_InternalStage == STAGE_CHECKCLIP) { |
(...skipping 29 matching lines...) Expand all Loading... |
819 } | 819 } |
820 m_Status = Done; | 820 m_Status = Done; |
821 return; | 821 return; |
822 } | 822 } |
823 steps++; | 823 steps++; |
824 if (pPause && pPause->NeedToPauseNow()) { | 824 if (pPause && pPause->NeedToPauseNow()) { |
825 break; | 825 break; |
826 } | 826 } |
827 } | 827 } |
828 } | 828 } |
OLD | NEW |