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

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

Issue 361553002: Remove "this==NULL" and adjust corresponding callers (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: fix if check warning 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/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 1064 matching lines...) Expand 10 before | Expand all | Expand 10 after
1075 return NULL; 1075 return NULL;
1076 } 1076 }
1077 #endif 1077 #endif
1078 CFX_DIBitmap& bitmap = *bitmap_device.GetBitmap(); 1078 CFX_DIBitmap& bitmap = *bitmap_device.GetBitmap();
1079 CPDF_Object* pCSObj = NULL; 1079 CPDF_Object* pCSObj = NULL;
1080 CPDF_ColorSpace* pCS = NULL; 1080 CPDF_ColorSpace* pCS = NULL;
1081 if (bLuminosity) { 1081 if (bLuminosity) {
1082 CPDF_Array* pBC = pSMaskDict->GetArray(FX_BSTRC("BC")); 1082 CPDF_Array* pBC = pSMaskDict->GetArray(FX_BSTRC("BC"));
1083 FX_ARGB back_color = 0xff000000; 1083 FX_ARGB back_color = 0xff000000;
1084 if (pBC) { 1084 if (pBC) {
1085 pCSObj = pGroup->GetDict()->GetDict(FX_BSTRC("Group"))->GetElementVa lue(FX_BSTRC("CS")); 1085 CPDF_Dictionary* pDict = pGroup->GetDict();
1086 if (pDict && pDict->GetDict(FX_BSTRC("Group")))
1087 pCSObj = pDict->GetDict(FX_BSTRC("Group"))->GetElementValue(FX_B STRC("CS"));
1088 else
1089 pCSObj = NULL;
1086 pCS = m_pContext->m_pDocument->LoadColorSpace(pCSObj); 1090 pCS = m_pContext->m_pDocument->LoadColorSpace(pCSObj);
1087 if (pCS) { 1091 if (pCS) {
1088 FX_FLOAT R, G, B; 1092 FX_FLOAT R, G, B;
1089 FX_DWORD num_floats = 8; 1093 FX_DWORD num_floats = 8;
1090 if (pCS->CountComponents() > (FX_INT32)num_floats) { 1094 if (pCS->CountComponents() > (FX_INT32)num_floats) {
1091 num_floats = (FX_DWORD)pCS->CountComponents(); 1095 num_floats = (FX_DWORD)pCS->CountComponents();
1092 } 1096 }
1093 CFX_FixedBufGrow<FX_FLOAT, 8> float_array(num_floats); 1097 CFX_FixedBufGrow<FX_FLOAT, 8> float_array(num_floats);
1094 FX_FLOAT* pFloats = float_array; 1098 FX_FLOAT* pFloats = float_array;
1095 FXSYS_memset32(pFloats, 0, num_floats * sizeof(FX_FLOAT)); 1099 FXSYS_memset32(pFloats, 0, num_floats * sizeof(FX_FLOAT));
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
1156 } 1160 }
1157 } else { 1161 } else {
1158 FXSYS_memcpy32(dest_buf, src_buf, dest_pitch * height); 1162 FXSYS_memcpy32(dest_buf, src_buf, dest_pitch * height);
1159 } 1163 }
1160 if (pFunc) { 1164 if (pFunc) {
1161 delete pFunc; 1165 delete pFunc;
1162 } 1166 }
1163 FX_Free(pTransfer); 1167 FX_Free(pTransfer);
1164 return pMask; 1168 return pMask;
1165 } 1169 }
OLDNEW
« no previous file with comments | « core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp ('k') | core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698