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

Side by Side Diff: core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp

Issue 417263008: Correct the names of the FX_SAFE_* typedefs. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Fix FX_SAFE_SIZE_T and whitespace too. Created 6 years, 4 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/fxcrt/extension.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 "../../../include/fxge/fx_ge.h" 7 #include "../../../include/fxge/fx_ge.h"
8 #include "../../../include/fxcodec/fx_codec.h" 8 #include "../../../include/fxcodec/fx_codec.h"
9 #include "../../../include/fpdfapi/fpdf_module.h" 9 #include "../../../include/fpdfapi/fpdf_module.h"
10 #include "../../../include/fpdfapi/fpdf_render.h" 10 #include "../../../include/fpdfapi/fpdf_render.h"
(...skipping 1186 matching lines...) Expand 10 before | Expand all | Expand 10 after
1197 pSrcLine = m_pStreamAcc->GetData() + line * src_pitch; 1197 pSrcLine = m_pStreamAcc->GetData() + line * src_pitch;
1198 } 1198 }
1199 } 1199 }
1200 int orig_Bpp = bpc * m_nComponents / 8; 1200 int orig_Bpp = bpc * m_nComponents / 8;
1201 int dest_Bpp = dest_bpp / 8; 1201 int dest_Bpp = dest_bpp / 8;
1202 if (pSrcLine == NULL) { 1202 if (pSrcLine == NULL) {
1203 FXSYS_memset32(dest_scan, 0xff, dest_Bpp * clip_width); 1203 FXSYS_memset32(dest_scan, 0xff, dest_Bpp * clip_width);
1204 return; 1204 return;
1205 } 1205 }
1206 1206
1207 FX_SAFE_INT max_src_x = clip_left; 1207 FX_SAFE_INT32 max_src_x = clip_left;
1208 max_src_x += clip_width - 1; 1208 max_src_x += clip_width - 1;
1209 max_src_x *= src_width; 1209 max_src_x *= src_width;
1210 max_src_x /= dest_width; 1210 max_src_x /= dest_width;
1211 if (!max_src_x.IsValid()) { 1211 if (!max_src_x.IsValid()) {
1212 return; 1212 return;
1213 } 1213 }
1214 1214
1215 CFX_FixedBufGrow<FX_BYTE, 128> temp(orig_Bpp); 1215 CFX_FixedBufGrow<FX_BYTE, 128> temp(orig_Bpp);
1216 if (bpc * m_nComponents == 1) { 1216 if (bpc * m_nComponents == 1) {
1217 FX_DWORD set_argb = (FX_DWORD) - 1, reset_argb = 0; 1217 FX_DWORD set_argb = (FX_DWORD) - 1, reset_argb = 0;
(...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after
1516 if (!m_bCached) { 1516 if (!m_bCached) {
1517 if (m_pBitmap) { 1517 if (m_pBitmap) {
1518 delete m_pBitmap; 1518 delete m_pBitmap;
1519 m_pBitmap = NULL; 1519 m_pBitmap = NULL;
1520 } 1520 }
1521 if (m_pMask) { 1521 if (m_pMask) {
1522 delete m_pMask; 1522 delete m_pMask;
1523 } 1523 }
1524 } 1524 }
1525 } 1525 }
OLDNEW
« no previous file with comments | « core/include/fxcrt/fx_system.h ('k') | core/src/fxcrt/extension.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698