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

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

Issue 372473003: Remove custom memory manager (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Change malloc to calloc Created 6 years, 5 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
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 "../../../include/fpdfapi/fpdf_page.h" 7 #include "../../../include/fpdfapi/fpdf_page.h"
8 #include "../../../include/fpdfapi/fpdf_module.h" 8 #include "../../../include/fpdfapi/fpdf_module.h"
9 #include "../../../include/fxcodec/fx_codec.h" 9 #include "../../../include/fxcodec/fx_codec.h"
10 #include "pageint.h" 10 #include "pageint.h"
(...skipping 944 matching lines...) Expand 10 before | Expand all | Expand 10 after
955 m_pSingleStream = FX_NEW CPDF_StreamAcc; 955 m_pSingleStream = FX_NEW CPDF_StreamAcc;
956 m_pSingleStream->LoadAllData((CPDF_Stream*)pContent, FALSE); 956 m_pSingleStream->LoadAllData((CPDF_Stream*)pContent, FALSE);
957 } else if (pContent->GetType() == PDFOBJ_ARRAY) { 957 } else if (pContent->GetType() == PDFOBJ_ARRAY) {
958 CPDF_Array* pArray = (CPDF_Array*)pContent; 958 CPDF_Array* pArray = (CPDF_Array*)pContent;
959 m_nStreams = pArray->GetCount(); 959 m_nStreams = pArray->GetCount();
960 if (m_nStreams == 0) { 960 if (m_nStreams == 0) {
961 m_Status = Done; 961 m_Status = Done;
962 return; 962 return;
963 } 963 }
964 m_pStreamArray = FX_Alloc(CPDF_StreamAcc*, m_nStreams); 964 m_pStreamArray = FX_Alloc(CPDF_StreamAcc*, m_nStreams);
965 FXSYS_memset32(m_pStreamArray, 0, sizeof(CPDF_StreamAcc*) * m_nStreams);
966 } else { 965 } else {
967 m_Status = Done; 966 m_Status = Done;
968 return; 967 return;
969 } 968 }
970 } 969 }
971 void CPDF_ContentParser::Start(CPDF_Form* pForm, CPDF_AllStates* pGraphicStates, 970 void CPDF_ContentParser::Start(CPDF_Form* pForm, CPDF_AllStates* pGraphicStates,
972 CFX_AffineMatrix* pParentMatrix, CPDF_Type3Char* pType3Char, CPDF_ParseOptions* pOptions, int level) 971 CFX_AffineMatrix* pParentMatrix, CPDF_Type3Char* pType3Char, CPDF_ParseOptions* pOptions, int level)
973 { 972 {
974 m_pType3Char = pType3Char; 973 m_pType3Char = pType3Char;
975 m_pObjects = pForm; 974 m_pObjects = pForm;
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
1137 return 100; 1136 return 100;
1138 } 1137 }
1139 if (m_InternalStage == PAGEPARSE_STAGE_GETCONTENT) { 1138 if (m_InternalStage == PAGEPARSE_STAGE_GETCONTENT) {
1140 return 10; 1139 return 10;
1141 } 1140 }
1142 if (m_InternalStage == PAGEPARSE_STAGE_CHECKCLIP) { 1141 if (m_InternalStage == PAGEPARSE_STAGE_CHECKCLIP) {
1143 return 90; 1142 return 90;
1144 } 1143 }
1145 return 10 + 80 * m_CurrentOffset / m_Size; 1144 return 10 + 80 * m_CurrentOffset / m_Size;
1146 } 1145 }
OLDNEW
« no previous file with comments | « core/src/fpdfapi/fpdf_page/fpdf_page_graph_state.cpp ('k') | core/src/fpdfapi/fpdf_render/fpdf_render_text.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698