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

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

Issue 294353002: Fix warnings in android build, fix font rendering issue, fix issue 357588: wrong characters represe… (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Patch Set after rebase Created 6 years, 6 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/include/fxcrt/fx_system.h ('k') | core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp » ('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 "../../../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 1018 matching lines...) Expand 10 before | Expand all | Expand 10 after
1029 int steps = 0; 1029 int steps = 0;
1030 while (m_Status == ToBeContinued) { 1030 while (m_Status == ToBeContinued) {
1031 if (m_InternalStage == PAGEPARSE_STAGE_GETCONTENT) { 1031 if (m_InternalStage == PAGEPARSE_STAGE_GETCONTENT) {
1032 if (m_CurrentOffset == m_nStreams) { 1032 if (m_CurrentOffset == m_nStreams) {
1033 if (m_pStreamArray) { 1033 if (m_pStreamArray) {
1034 m_Size = 0; 1034 m_Size = 0;
1035 FX_DWORD i; 1035 FX_DWORD i;
1036 for (i = 0; i < m_nStreams; i ++) { 1036 for (i = 0; i < m_nStreams; i ++) {
1037 FX_DWORD size = m_pStreamArray[i]->GetSize(); 1037 FX_DWORD size = m_pStreamArray[i]->GetSize();
1038 if (m_Size + size + 1 <= m_Size) { 1038 if (m_Size + size + 1 <= m_Size) {
1039 » » » » » » » m_Status = Done; 1039 m_Status = Done;
1040 » » » » » » » return; 1040 return;
1041 } 1041 }
1042 m_Size += size + 1; 1042 m_Size += size + 1;
1043 } 1043 }
1044 m_pData = FX_Alloc(FX_BYTE, m_Size); 1044 m_pData = FX_Alloc(FX_BYTE, m_Size);
1045 if (!m_pData) { 1045 if (!m_pData) {
1046 m_Status = Done; 1046 m_Status = Done;
1047 return; 1047 return;
1048 } 1048 }
1049 FX_DWORD pos = 0; 1049 FX_DWORD pos = 0;
1050 for (i = 0; i < m_nStreams; i ++) { 1050 for (i = 0; i < m_nStreams; i ++) {
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
1137 return 100; 1137 return 100;
1138 } 1138 }
1139 if (m_InternalStage == PAGEPARSE_STAGE_GETCONTENT) { 1139 if (m_InternalStage == PAGEPARSE_STAGE_GETCONTENT) {
1140 return 10; 1140 return 10;
1141 } 1141 }
1142 if (m_InternalStage == PAGEPARSE_STAGE_CHECKCLIP) { 1142 if (m_InternalStage == PAGEPARSE_STAGE_CHECKCLIP) {
1143 return 90; 1143 return 90;
1144 } 1144 }
1145 return 10 + 80 * m_CurrentOffset / m_Size; 1145 return 10 + 80 * m_CurrentOffset / m_Size;
1146 } 1146 }
OLDNEW
« no previous file with comments | « core/include/fxcrt/fx_system.h ('k') | core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698