summaryrefslogtreecommitdiff
path: root/core/src/fpdfapi
diff options
context:
space:
mode:
authordan sinclair <dsinclair@chromium.org>2015-10-15 19:34:45 -0400
committerdan sinclair <dsinclair@chromium.org>2015-10-15 19:34:45 -0400
commitc2f38e93f5f456fda392f1f8b6b4a17dbd5fd971 (patch)
tree6fe82ba45867e9c7a45034947daac0d7d2b23a90 /core/src/fpdfapi
parent471a1034e70ddcfc93ce2a93b28a8385109e83de (diff)
downloadpdfium-c2f38e93f5f456fda392f1f8b6b4a17dbd5fd971.tar.xz
Merge to XFA: Return result of GetRBG instead of TRUE
Propagate the return value of GetRBG to the callers instead of forcing the return of TRUE. BUG=pdfium:44 TBR=thestig@chromium.org, tsepez@chromium.org Review URL: https://codereview.chromium.org/1398633008 . (cherry picked from commit b456ba7f62fa416f456ef78750c18fd2bdf837be) Review URL: https://codereview.chromium.org/1411443003 .
Diffstat (limited to 'core/src/fpdfapi')
-rw-r--r--core/src/fpdfapi/fpdf_page/fpdf_page_colors.cpp17
1 files changed, 6 insertions, 11 deletions
diff --git a/core/src/fpdfapi/fpdf_page/fpdf_page_colors.cpp b/core/src/fpdfapi/fpdf_page/fpdf_page_colors.cpp
index a3fef3df82..3f0de2d416 100644
--- a/core/src/fpdfapi/fpdf_page/fpdf_page_colors.cpp
+++ b/core/src/fpdfapi/fpdf_page/fpdf_page_colors.cpp
@@ -762,10 +762,9 @@ FX_BOOL CPDF_ICCBasedCS::GetRGB(FX_FLOAT* pBuf,
ICodec_IccModule* pIccModule = CPDF_ModuleMgr::Get()->GetIccModule();
if (m_pProfile->m_pTransform == NULL || pIccModule == NULL) {
if (m_pAlterCS) {
- m_pAlterCS->GetRGB(pBuf, R, G, B);
- } else {
- R = G = B = 0.0f;
+ return m_pAlterCS->GetRGB(pBuf, R, G, B);
}
+ R = G = B = 0.0f;
return TRUE;
}
FX_FLOAT rgb[3];
@@ -944,8 +943,7 @@ FX_BOOL CPDF_IndexedCS::GetRGB(FX_FLOAT* pBuf,
m_pCompMinMax[i * 2] +
m_pCompMinMax[i * 2 + 1] * pTable[index * m_nBaseComponents + i] / 255;
}
- m_pBaseCS->GetRGB(comps, R, G, B);
- return TRUE;
+ return m_pBaseCS->GetRGB(comps, R, G, B);
}
CPDF_ColorSpace* CPDF_IndexedCS::GetBaseCS() const {
return m_pBaseCS;
@@ -1084,8 +1082,7 @@ FX_BOOL CPDF_SeparationCS::GetRGB(FX_FLOAT* pBuf,
for (int i = 0; i < nComps; i++) {
results[i] = *pBuf;
}
- m_pAltCS->GetRGB(results, R, G, B);
- return TRUE;
+ return m_pAltCS->GetRGB(results, R, G, B);
}
CFX_FixedBufGrow<FX_FLOAT, 16> results(m_pFunc->CountOutputs());
int nresults = 0;
@@ -1094,8 +1091,7 @@ FX_BOOL CPDF_SeparationCS::GetRGB(FX_FLOAT* pBuf,
return FALSE;
}
if (m_pAltCS) {
- m_pAltCS->GetRGB(results, R, G, B);
- return TRUE;
+ return m_pAltCS->GetRGB(results, R, G, B);
}
R = G = B = 0;
return FALSE;
@@ -1177,8 +1173,7 @@ FX_BOOL CPDF_DeviceNCS::GetRGB(FX_FLOAT* pBuf,
if (nresults == 0) {
return FALSE;
}
- m_pAltCS->GetRGB(results, R, G, B);
- return TRUE;
+ return m_pAltCS->GetRGB(results, R, G, B);
}
void CPDF_DeviceNCS::EnableStdConversion(FX_BOOL bEnabled) {
CPDF_ColorSpace::EnableStdConversion(bEnabled);