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

Unified Diff: core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp

Issue 1783023002: Re-enable MSVC warning 4800 for compiling with chromium_code (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: remove cast change on security_handler file Created 4 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « core/src/fpdfapi/fpdf_parser/cpdf_syntax_parser.cpp ('k') | core/src/fpdfdoc/doc_formfield.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp
diff --git a/core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp b/core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp
index 6618a13709e53059c39e4a6417fc17ac361ab23e..93b867005cc4b3a935b25008a46757725f4b91c9 100644
--- a/core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp
+++ b/core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp
@@ -628,13 +628,14 @@ int CPDF_DIBSource::CreateDecoder() {
pParams ? pParams->GetIntegerBy("ColorTransform", 1) : 1));
if (!m_pDecoder) {
FX_BOOL bTransform = FALSE;
- int comps, bpc;
+ int comps;
+ int bpc;
ICodec_JpegModule* pJpegModule = CPDF_ModuleMgr::Get()->GetJpegModule();
if (pJpegModule->LoadInfo(src_data, src_size, m_Width, m_Height, comps,
bpc, bTransform)) {
- if (m_nComponents != comps) {
+ if (m_nComponents != static_cast<FX_DWORD>(comps)) {
FX_Free(m_pCompData);
- m_nComponents = comps;
+ m_nComponents = static_cast<FX_DWORD>(comps);
if (m_Family == PDFCS_LAB && m_nComponents != 3) {
m_pCompData = nullptr;
return 0;
@@ -1440,7 +1441,9 @@ void CPDF_DIBSource::DownSampleScanline32Bit(int orig_Bpp,
FX_BOOL bFlipX,
int clip_left,
int clip_width) const {
- int last_src_x = -1;
+ // last_src_x used to store the last seen src_x position which should be
+ // in [0, src_width). Set the initial value to be an invalid src_x value.
+ FX_DWORD last_src_x = src_width;
FX_ARGB last_argb = FXARGB_MAKE(0xFF, 0xFF, 0xFF, 0xFF);
FX_FLOAT unit_To8Bpc = 255.0f / ((1 << m_bpc) - 1);
for (int i = 0; i < clip_width; i++) {
« no previous file with comments | « core/src/fpdfapi/fpdf_parser/cpdf_syntax_parser.cpp ('k') | core/src/fpdfdoc/doc_formfield.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698