diff options
author | dsinclair <dsinclair@chromium.org> | 2016-04-12 11:21:22 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-04-12 11:21:23 -0700 |
commit | d55e11eeb8ebf1e226a1166f395ba77248ce84c3 (patch) | |
tree | c28b1c1d6ac1597e569618cdeb02e3e0009bf8ed /core/fpdfapi/fpdf_page | |
parent | ea98238666e33cd16b69cb23dcaca047c21c9998 (diff) | |
download | pdfium-d55e11eeb8ebf1e226a1166f395ba77248ce84c3.tar.xz |
Remove ICodec_* Interfaces.
All of the ICodec_* interfaces had a single implementation. This CL removes
the interfaces and uses the concrete classes in their place.
BUG=pdfium:468
Review URL: https://codereview.chromium.org/1876023003
Diffstat (limited to 'core/fpdfapi/fpdf_page')
-rw-r--r-- | core/fpdfapi/fpdf_page/cpdf_colorspace.cpp | 10 | ||||
-rw-r--r-- | core/fpdfapi/fpdf_page/fpdf_page_parser_old.cpp | 8 |
2 files changed, 10 insertions, 8 deletions
diff --git a/core/fpdfapi/fpdf_page/cpdf_colorspace.cpp b/core/fpdfapi/fpdf_page/cpdf_colorspace.cpp index 79faebafc9..aa31f9cbac 100644 --- a/core/fpdfapi/fpdf_page/cpdf_colorspace.cpp +++ b/core/fpdfapi/fpdf_page/cpdf_colorspace.cpp @@ -863,12 +863,14 @@ FX_BOOL CPDF_ICCBasedCS::GetRGB(FX_FLOAT* pBuf, B = pBuf[2]; return TRUE; } - ICodec_IccModule* pIccModule = CPDF_ModuleMgr::Get()->GetIccModule(); + CCodec_IccModule* pIccModule = CPDF_ModuleMgr::Get()->GetIccModule(); if (!m_pProfile->m_pTransform || !pIccModule) { - if (m_pAlterCS) { + if (m_pAlterCS) return m_pAlterCS->GetRGB(pBuf, R, G, B); - } - R = G = B = 0.0f; + + R = 0.0f; + G = 0.0f; + B = 0.0f; return TRUE; } FX_FLOAT rgb[3]; diff --git a/core/fpdfapi/fpdf_page/fpdf_page_parser_old.cpp b/core/fpdfapi/fpdf_page/fpdf_page_parser_old.cpp index 5ec25d9fde..48bb667ec7 100644 --- a/core/fpdfapi/fpdf_page/fpdf_page_parser_old.cpp +++ b/core/fpdfapi/fpdf_page/fpdf_page_parser_old.cpp @@ -44,7 +44,7 @@ CPDF_StreamParser::~CPDF_StreamParser() { } } -uint32_t DecodeAllScanlines(ICodec_ScanlineDecoder* pDecoder, +uint32_t DecodeAllScanlines(CCodec_ScanlineDecoder* pDecoder, uint8_t*& dest_buf, uint32_t& dest_size) { if (!pDecoder) { @@ -73,7 +73,7 @@ uint32_t DecodeAllScanlines(ICodec_ScanlineDecoder* pDecoder, return srcoff; } -ICodec_ScanlineDecoder* FPDFAPI_CreateFaxDecoder( +CCodec_ScanlineDecoder* FPDFAPI_CreateFaxDecoder( const uint8_t* src_buf, uint32_t src_size, int width, @@ -89,7 +89,7 @@ uint32_t PDF_DecodeInlineStream(const uint8_t* src_buf, uint8_t*& dest_buf, uint32_t& dest_size) { if (decoder == "CCITTFaxDecode" || decoder == "CCF") { - ICodec_ScanlineDecoder* pDecoder = + CCodec_ScanlineDecoder* pDecoder = FPDFAPI_CreateFaxDecoder(src_buf, limit, width, height, pParam); return DecodeAllScanlines(pDecoder, dest_buf, dest_size); } @@ -108,7 +108,7 @@ uint32_t PDF_DecodeInlineStream(const uint8_t* src_buf, dest_size); } if (decoder == "DCTDecode" || decoder == "DCT") { - ICodec_ScanlineDecoder* pDecoder = + CCodec_ScanlineDecoder* pDecoder = CPDF_ModuleMgr::Get()->GetJpegModule()->CreateDecoder( src_buf, limit, width, height, 0, pParam ? pParam->GetIntegerBy("ColorTransform", 1) : 1); |