| OLD | NEW | 
|---|
| 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 "render_int.h" | 7 #include "render_int.h" | 
| 8 | 8 | 
| 9 #include <vector> | 9 #include <vector> | 
| 10 | 10 | 
| (...skipping 597 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 608   FX_DWORD src_size = m_pStreamAcc->GetSize(); | 608   FX_DWORD src_size = m_pStreamAcc->GetSize(); | 
| 609   const CPDF_Dictionary* pParams = m_pStreamAcc->GetImageParam(); | 609   const CPDF_Dictionary* pParams = m_pStreamAcc->GetImageParam(); | 
| 610   if (decoder == "CCITTFaxDecode") { | 610   if (decoder == "CCITTFaxDecode") { | 
| 611     m_pDecoder = FPDFAPI_CreateFaxDecoder(src_data, src_size, m_Width, m_Height, | 611     m_pDecoder = FPDFAPI_CreateFaxDecoder(src_data, src_size, m_Width, m_Height, | 
| 612                                           pParams); | 612                                           pParams); | 
| 613   } else if (decoder == "DCTDecode") { | 613   } else if (decoder == "DCTDecode") { | 
| 614     m_pDecoder = CPDF_ModuleMgr::Get()->GetJpegModule()->CreateDecoder( | 614     m_pDecoder = CPDF_ModuleMgr::Get()->GetJpegModule()->CreateDecoder( | 
| 615         src_data, src_size, m_Width, m_Height, m_nComponents, | 615         src_data, src_size, m_Width, m_Height, m_nComponents, | 
| 616         pParams ? pParams->GetInteger("ColorTransform", 1) : 1); | 616         pParams ? pParams->GetInteger("ColorTransform", 1) : 1); | 
| 617     if (!m_pDecoder) { | 617     if (!m_pDecoder) { | 
| 618       FX_BOOL bTransform = FALSE; | 618       bool bTransform = false; | 
| 619       int comps, bpc; | 619       int comps, bpc; | 
| 620       ICodec_JpegModule* pJpegModule = CPDF_ModuleMgr::Get()->GetJpegModule(); | 620       ICodec_JpegModule* pJpegModule = CPDF_ModuleMgr::Get()->GetJpegModule(); | 
| 621       if (pJpegModule->LoadInfo(src_data, src_size, m_Width, m_Height, comps, | 621       if (pJpegModule->LoadInfo(src_data, src_size, &m_Width, &m_Height, &comps, | 
| 622                                 bpc, bTransform)) { | 622                                 &bpc, &bTransform)) { | 
| 623         if (m_nComponents != comps) { | 623         if (m_nComponents != comps) { | 
| 624           FX_Free(m_pCompData); | 624           FX_Free(m_pCompData); | 
| 625           m_nComponents = comps; | 625           m_nComponents = comps; | 
| 626           if (m_Family == PDFCS_LAB && m_nComponents != 3) { | 626           if (m_Family == PDFCS_LAB && m_nComponents != 3) { | 
| 627             m_pCompData = NULL; | 627             m_pCompData = NULL; | 
| 628             return 0; | 628             return 0; | 
| 629           } | 629           } | 
| 630           m_pCompData = GetDecodeAndMaskArray(m_bDefaultDecode, m_bColorKey); | 630           m_pCompData = GetDecodeAndMaskArray(m_bDefaultDecode, m_bColorKey); | 
| 631           if (!m_pCompData) { | 631           if (!m_pCompData) { | 
| 632             return 0; | 632             return 0; | 
| (...skipping 989 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1622 FX_BOOL CPDF_ImageLoader::Continue(CPDF_ImageLoaderHandle* LoadHandle, | 1622 FX_BOOL CPDF_ImageLoader::Continue(CPDF_ImageLoaderHandle* LoadHandle, | 
| 1623                                    IFX_Pause* pPause) { | 1623                                    IFX_Pause* pPause) { | 
| 1624   return LoadHandle->Continue(pPause); | 1624   return LoadHandle->Continue(pPause); | 
| 1625 } | 1625 } | 
| 1626 CPDF_ImageLoader::~CPDF_ImageLoader() { | 1626 CPDF_ImageLoader::~CPDF_ImageLoader() { | 
| 1627   if (!m_bCached) { | 1627   if (!m_bCached) { | 
| 1628     delete m_pBitmap; | 1628     delete m_pBitmap; | 
| 1629     delete m_pMask; | 1629     delete m_pMask; | 
| 1630   } | 1630   } | 
| 1631 } | 1631 } | 
| OLD | NEW | 
|---|