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

Side by Side Diff: core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.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
« no previous file with comments | « core/src/fpdfapi/fpdf_render/fpdf_render_image.cpp ('k') | core/src/fpdfdoc/doc_annot.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/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 896 matching lines...) Expand 10 before | Expand all | Expand 10 after
907 } else { 907 } else {
908 m_pColorSpace->GetRGB(color_value, R, G, B); 908 m_pColorSpace->GetRGB(color_value, R, G, B);
909 } 909 }
910 SetPaletteArgb(i, ArgbEncode(255, FXSYS_round(R * 255), FXSYS_round( G * 255), FXSYS_round(B * 255))); 910 SetPaletteArgb(i, ArgbEncode(255, FXSYS_round(R * 255), FXSYS_round( G * 255), FXSYS_round(B * 255)));
911 } 911 }
912 } 912 }
913 } 913 }
914 FX_DWORD CPDF_DIBSource::GetValidBpp() const 914 FX_DWORD CPDF_DIBSource::GetValidBpp() const
915 { 915 {
916 FX_DWORD bpc = m_bpc; 916 FX_DWORD bpc = m_bpc;
917 CPDF_Object * pFilter = m_pDict->GetElementValue(FX_BSTRC("Filter")); 917 » CPDF_Object * pFilter = m_pDict ? m_pDict->GetElementValue(FX_BSTRC("Fil ter")) : NULL;
918 if (pFilter) { 918 if (pFilter) {
919 if (pFilter->GetType() == PDFOBJ_NAME) { 919 if (pFilter->GetType() == PDFOBJ_NAME) {
920 CFX_ByteString filter = pFilter->GetString(); 920 CFX_ByteString filter = pFilter->GetString();
921 if (filter == FX_BSTRC("CCITTFaxDecode") || filter == FX_BSTRC("JBIG 2Decode")) { 921 if (filter == FX_BSTRC("CCITTFaxDecode") || filter == FX_BSTRC("JBIG 2Decode")) {
922 bpc = 1; 922 bpc = 1;
923 } 923 }
924 if (filter == FX_BSTRC("RunLengthDecode") || filter == FX_BSTRC("DCT Decode")) { 924 if (filter == FX_BSTRC("RunLengthDecode") || filter == FX_BSTRC("DCT Decode")) {
925 bpc = 8; 925 bpc = 8;
926 } 926 }
927 } else if (pFilter->GetType() == PDFOBJ_ARRAY) { 927 } else if (pFilter->GetType() == PDFOBJ_ARRAY) {
(...skipping 579 matching lines...) Expand 10 before | Expand all | Expand 10 after
1507 if (!m_bCached) { 1507 if (!m_bCached) {
1508 if (m_pBitmap) { 1508 if (m_pBitmap) {
1509 delete m_pBitmap; 1509 delete m_pBitmap;
1510 m_pBitmap = NULL; 1510 m_pBitmap = NULL;
1511 } 1511 }
1512 if (m_pMask) { 1512 if (m_pMask) {
1513 delete m_pMask; 1513 delete m_pMask;
1514 } 1514 }
1515 } 1515 }
1516 } 1516 }
OLDNEW
« no previous file with comments | « core/src/fpdfapi/fpdf_render/fpdf_render_image.cpp ('k') | core/src/fpdfdoc/doc_annot.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698