summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolás Peña <npm@chromium.org>2017-09-27 13:20:57 +0900
committerChromium commit bot <commit-bot@chromium.org>2017-09-27 12:59:38 +0000
commitfe9ea0eff300458314d8a422d064597eb588e25d (patch)
treeade586b483789dbb7c8ac597ccd4fac06a5a295a
parent620223167f1d3a89db4a4ce4bce7b33bda8e726f (diff)
downloadpdfium-fe9ea0eff300458314d8a422d064597eb588e25d.tar.xz
Remove unreachable code in fx_codec_icc
This CL removes unreachable code and also removes the flag Icc_Format_DEFAULT which becomes unused. Bug: chromium:346399 Change-Id: I1cdd0f70ffec2abcd20ddf5b181273971b92ecaa Reviewed-on: https://pdfium-review.googlesource.com/14850 Commit-Queue: Nico Weber <thakis@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org> Reviewed-by: Nico Weber <thakis@chromium.org>
-rw-r--r--core/fxcodec/codec/fx_codec_icc.cpp8
-rw-r--r--core/fxcodec/fx_codec_def.h1
2 files changed, 2 insertions, 7 deletions
diff --git a/core/fxcodec/codec/fx_codec_icc.cpp b/core/fxcodec/codec/fx_codec_icc.cpp
index 7f6078a636..29b37d19ac 100644
--- a/core/fxcodec/codec/fx_codec_icc.cpp
+++ b/core/fxcodec/codec/fx_codec_icc.cpp
@@ -78,9 +78,6 @@ std::unique_ptr<CLcmsCmm> CCodec_IccModule::CreateTransform_sRGB(
} else {
srcFormat =
COLORSPACE_SH(PT_ANY) | CHANNELS_SH(*nSrcComponents) | BYTES_SH(1);
- if (srcCS == cmsSigRgbData && T_DOSWAP(Icc_FORMAT_DEFAULT)) {
- srcFormat |= DOSWAP_SH(1);
- }
}
cmsColorSpaceSignature dstCS = cmsGetColorSpace(dstProfile);
if (!Check3Components(dstCS, true)) {
@@ -101,9 +98,8 @@ std::unique_ptr<CLcmsCmm> CCodec_IccModule::CreateTransform_sRGB(
TYPE_BGR_8, intent, 0);
break;
case cmsSigCmykData:
- hTransform = cmsCreateTransform(
- srcProfile, srcFormat, dstProfile,
- T_DOSWAP(Icc_FORMAT_DEFAULT) ? TYPE_KYMC_8 : TYPE_CMYK_8, intent, 0);
+ hTransform = cmsCreateTransform(srcProfile, srcFormat, dstProfile,
+ TYPE_CMYK_8, intent, 0);
break;
default:
break;
diff --git a/core/fxcodec/fx_codec_def.h b/core/fxcodec/fx_codec_def.h
index 04696a11dd..1d9b1dc832 100644
--- a/core/fxcodec/fx_codec_def.h
+++ b/core/fxcodec/fx_codec_def.h
@@ -50,7 +50,6 @@ enum FXCODEC_STATUS {
#define Icc_INTENT_RELATIVE_COLORIMETRIC 1
#define Icc_INTENT_SATURATION 2
#define Icc_INTENT_ABSOLUTE_COLORIMETRIC 3
-#define Icc_FORMAT_DEFAULT 0
#define Icc_FORMAT_SWAP (1 << 10)
#define Icc_FLAGS_DEFAULT 0x0000
#define Icc_FLAGS_BLACKPOINTCOMPENSATION 0x2000