Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(179)

Side by Side Diff: core/fpdfapi/fpdf_page/fpdf_page_parser_old.cpp

Issue 2283113002: Add -> operators to CFX_CountRef. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@privatize
Patch Set: Regenerate patch, rebase off of master. Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « core/fpdfapi/fpdf_page/fpdf_page_parser.cpp ('k') | core/fpdfapi/fpdf_page/include/cpdf_path.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 693 matching lines...) Expand 10 before | Expand all | Expand 10 after
704 m_pParser.reset(new CPDF_StreamContentParser( 704 m_pParser.reset(new CPDF_StreamContentParser(
705 pForm->m_pDocument, pForm->m_pPageResources, pForm->m_pResources, 705 pForm->m_pDocument, pForm->m_pPageResources, pForm->m_pResources,
706 pParentMatrix, pForm, pResources, &form_bbox, pGraphicStates, level)); 706 pParentMatrix, pForm, pResources, &form_bbox, pGraphicStates, level));
707 m_pParser->GetCurStates()->m_CTM = form_matrix; 707 m_pParser->GetCurStates()->m_CTM = form_matrix;
708 m_pParser->GetCurStates()->m_ParentMatrix = form_matrix; 708 m_pParser->GetCurStates()->m_ParentMatrix = form_matrix;
709 if (ClipPath) { 709 if (ClipPath) {
710 m_pParser->GetCurStates()->m_ClipPath.AppendPath(ClipPath, FXFILL_WINDING, 710 m_pParser->GetCurStates()->m_ClipPath.AppendPath(ClipPath, FXFILL_WINDING,
711 TRUE); 711 TRUE);
712 } 712 }
713 if (pForm->m_Transparency & PDFTRANS_GROUP) { 713 if (pForm->m_Transparency & PDFTRANS_GROUP) {
714 m_pParser->GetCurStates()->m_GeneralState.MakePrivateCopy();
714 CPDF_GeneralStateData* pData = 715 CPDF_GeneralStateData* pData =
715 m_pParser->GetCurStates()->m_GeneralState.GetPrivateCopy(); 716 m_pParser->GetCurStates()->m_GeneralState.GetObject();
716 pData->m_BlendType = FXDIB_BLEND_NORMAL; 717 pData->m_BlendType = FXDIB_BLEND_NORMAL;
717 pData->m_StrokeAlpha = 1.0f; 718 pData->m_StrokeAlpha = 1.0f;
718 pData->m_FillAlpha = 1.0f; 719 pData->m_FillAlpha = 1.0f;
719 pData->m_pSoftMask = nullptr; 720 pData->m_pSoftMask = nullptr;
720 } 721 }
721 m_nStreams = 0; 722 m_nStreams = 0;
722 m_pSingleStream.reset(new CPDF_StreamAcc); 723 m_pSingleStream.reset(new CPDF_StreamAcc);
723 m_pSingleStream->LoadAllData(pForm->m_pFormStream, FALSE); 724 m_pSingleStream->LoadAllData(pForm->m_pFormStream, FALSE);
724 m_pData = (uint8_t*)m_pSingleStream->GetData(); 725 m_pData = (uint8_t*)m_pSingleStream->GetData();
725 m_Size = m_pSingleStream->GetSize(); 726 m_Size = m_pSingleStream->GetSize();
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
767 m_StreamArray[m_CurrentOffset]->LoadAllData(pStreamObj, FALSE); 768 m_StreamArray[m_CurrentOffset]->LoadAllData(pStreamObj, FALSE);
768 m_CurrentOffset++; 769 m_CurrentOffset++;
769 } 770 }
770 } 771 }
771 if (m_InternalStage == STAGE_PARSE) { 772 if (m_InternalStage == STAGE_PARSE) {
772 if (!m_pParser) { 773 if (!m_pParser) {
773 m_pParser.reset(new CPDF_StreamContentParser( 774 m_pParser.reset(new CPDF_StreamContentParser(
774 m_pObjectHolder->m_pDocument, m_pObjectHolder->m_pPageResources, 775 m_pObjectHolder->m_pDocument, m_pObjectHolder->m_pPageResources,
775 nullptr, nullptr, m_pObjectHolder, m_pObjectHolder->m_pResources, 776 nullptr, nullptr, m_pObjectHolder, m_pObjectHolder->m_pResources,
776 &m_pObjectHolder->m_BBox, nullptr, 0)); 777 &m_pObjectHolder->m_BBox, nullptr, 0));
777 m_pParser->GetCurStates()->m_ColorState.GetPrivateCopy()->Default(); 778 m_pParser->GetCurStates()->m_ColorState.MakePrivateCopy();
779 m_pParser->GetCurStates()->m_ColorState->Default();
778 } 780 }
779 if (m_CurrentOffset >= m_Size) { 781 if (m_CurrentOffset >= m_Size) {
780 m_InternalStage = STAGE_CHECKCLIP; 782 m_InternalStage = STAGE_CHECKCLIP;
781 } else { 783 } else {
782 m_CurrentOffset += 784 m_CurrentOffset +=
783 m_pParser->Parse(m_pData + m_CurrentOffset, 785 m_pParser->Parse(m_pData + m_CurrentOffset,
784 m_Size - m_CurrentOffset, PARSE_STEP_LIMIT); 786 m_Size - m_CurrentOffset, PARSE_STEP_LIMIT);
785 } 787 }
786 } 788 }
787 if (m_InternalStage == STAGE_CHECKCLIP) { 789 if (m_InternalStage == STAGE_CHECKCLIP) {
(...skipping 17 matching lines...) Expand all
805 continue; 807 continue;
806 if (pObj->m_ClipPath.GetTextCount()) 808 if (pObj->m_ClipPath.GetTextCount())
807 continue; 809 continue;
808 CPDF_Path ClipPath = pObj->m_ClipPath.GetPath(0); 810 CPDF_Path ClipPath = pObj->m_ClipPath.GetPath(0);
809 if (!ClipPath.IsRect() || pObj->IsShading()) 811 if (!ClipPath.IsRect() || pObj->IsShading())
810 continue; 812 continue;
811 CFX_FloatRect old_rect(ClipPath.GetPointX(0), ClipPath.GetPointY(0), 813 CFX_FloatRect old_rect(ClipPath.GetPointX(0), ClipPath.GetPointY(0),
812 ClipPath.GetPointX(2), ClipPath.GetPointY(2)); 814 ClipPath.GetPointX(2), ClipPath.GetPointY(2));
813 CFX_FloatRect obj_rect(pObj->m_Left, pObj->m_Bottom, pObj->m_Right, 815 CFX_FloatRect obj_rect(pObj->m_Left, pObj->m_Bottom, pObj->m_Right,
814 pObj->m_Top); 816 pObj->m_Top);
815 if (old_rect.Contains(obj_rect)) { 817 if (old_rect.Contains(obj_rect))
816 pObj->m_ClipPath.SetNull(); 818 pObj->m_ClipPath.Clear();
817 }
818 } 819 }
819 m_Status = Done; 820 m_Status = Done;
820 return; 821 return;
821 } 822 }
822 steps++; 823 steps++;
823 if (pPause && pPause->NeedToPauseNow()) { 824 if (pPause && pPause->NeedToPauseNow()) {
824 break; 825 break;
825 } 826 }
826 } 827 }
827 } 828 }
OLDNEW
« no previous file with comments | « core/fpdfapi/fpdf_page/fpdf_page_parser.cpp ('k') | core/fpdfapi/fpdf_page/include/cpdf_path.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698