summaryrefslogtreecommitdiff
path: root/core/fpdfapi/fpdf_render
diff options
context:
space:
mode:
authorthestig <thestig@chromium.org>2016-06-06 17:54:29 -0700
committerCommit bot <commit-bot@chromium.org>2016-06-06 17:54:29 -0700
commitb0fcfad1412c2ddaf33c74fa4b854c3c1390a509 (patch)
treee890bd15ef68a679e06b58e42f51496a050166ed /core/fpdfapi/fpdf_render
parent0abe65264043b8a1b4afbf8d3e9ce88b4a534826 (diff)
downloadpdfium-b0fcfad1412c2ddaf33c74fa4b854c3c1390a509.tar.xz
Remove unused PS generation code.
CFX_PSRenderer, IFX_PSOutput, CPSOutput, CPSPrinterDriver. Also reland commit 2d63eaa. Review-Url: https://codereview.chromium.org/2019603002
Diffstat (limited to 'core/fpdfapi/fpdf_render')
-rw-r--r--core/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp18
1 files changed, 8 insertions, 10 deletions
diff --git a/core/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp b/core/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp
index 4071a115df..2b829d0c56 100644
--- a/core/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp
+++ b/core/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp
@@ -561,19 +561,20 @@ int CPDF_DIBSource::CreateDecoder() {
src_data, src_size, m_Width, m_Height, m_nComponents,
pParams ? pParams->GetIntegerBy("ColorTransform", 1) : 1));
if (!m_pDecoder) {
- FX_BOOL bTransform = FALSE;
+ bool bTransform = false;
int comps;
int bpc;
CCodec_JpegModule* pJpegModule = CPDF_ModuleMgr::Get()->GetJpegModule();
- if (pJpegModule->LoadInfo(src_data, src_size, m_Width, m_Height, comps,
- bpc, bTransform)) {
+ if (pJpegModule->LoadInfo(src_data, src_size, &m_Width, &m_Height, &comps,
+ &bpc, &bTransform)) {
if (m_nComponents != static_cast<uint32_t>(comps)) {
FX_Free(m_pCompData);
m_pCompData = nullptr;
m_nComponents = static_cast<uint32_t>(comps);
if (m_pColorSpace &&
- m_pColorSpace->CountComponents() != m_nComponents)
+ m_pColorSpace->CountComponents() != m_nComponents) {
return 0;
+ }
if (m_Family == PDFCS_LAB && m_nComponents != 3)
return 0;
m_pCompData = GetDecodeAndMaskArray(m_bDefaultDecode, m_bColorKey);
@@ -613,17 +614,14 @@ int CPDF_DIBSource::CreateDecoder() {
FX_SAFE_UINT32 requested_pitch =
CalculatePitch8(m_bpc, m_nComponents, m_Width);
- if (!requested_pitch.IsValid()) {
+ if (!requested_pitch.IsValid())
return 0;
- }
FX_SAFE_UINT32 provided_pitch = CalculatePitch8(
m_pDecoder->GetBPC(), m_pDecoder->CountComps(), m_pDecoder->GetWidth());
- if (!provided_pitch.IsValid()) {
+ if (!provided_pitch.IsValid())
return 0;
- }
- if (provided_pitch.ValueOrDie() < requested_pitch.ValueOrDie()) {
+ if (provided_pitch.ValueOrDie() < requested_pitch.ValueOrDie())
return 0;
- }
return 1;
}