summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2018-06-29 19:47:49 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-06-29 19:47:49 +0000
commitf7155bf3c8fa8cf4593f2517ef3f005e3190609f (patch)
tree5cbf86f10173ff8a93bcd62df77c59d873323311 /core
parent2895880fa8354b273b4e2b72e61a5b78d1985fa8 (diff)
downloadpdfium-f7155bf3c8fa8cf4593f2517ef3f005e3190609f.tar.xz
Delete dead code in CCodec_IccModule.
Change-Id: I711654cfb1ab43a5d17afbe6f877c1860dd1b7f0 Reviewed-on: https://pdfium-review.googlesource.com/36630 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Diffstat (limited to 'core')
-rw-r--r--core/fxcodec/codec/fx_codec_icc.cpp25
1 files changed, 8 insertions, 17 deletions
diff --git a/core/fxcodec/codec/fx_codec_icc.cpp b/core/fxcodec/codec/fx_codec_icc.cpp
index 0aaaf98075..60768f63bf 100644
--- a/core/fxcodec/codec/fx_codec_icc.cpp
+++ b/core/fxcodec/codec/fx_codec_icc.cpp
@@ -13,20 +13,14 @@
namespace {
-bool Check3Components(cmsColorSpaceSignature cs, bool bDst) {
+bool Check3Components(cmsColorSpaceSignature cs) {
switch (cs) {
case cmsSigGrayData:
- return false;
case cmsSigCmykData:
- if (bDst)
- return false;
- break;
- case cmsSigLabData:
- case cmsSigRgbData:
+ return false;
default:
- break;
+ return true;
}
- return true;
}
} // namespace
@@ -90,26 +84,23 @@ std::unique_ptr<CLcmsCmm> CCodec_IccModule::CreateTransform_sRGB(
srcCS == cmsSigCmykData;
}
cmsColorSpaceSignature dstCS = cmsGetColorSpace(dstProfile);
- if (!Check3Components(dstCS, true)) {
+ if (!Check3Components(dstCS)) {
cmsCloseProfile(srcProfile);
cmsCloseProfile(dstProfile);
return nullptr;
}
cmsHTRANSFORM hTransform = nullptr;
- int intent = 0;
+ const int intent = 0;
switch (dstCS) {
- case cmsSigGrayData:
- hTransform = cmsCreateTransform(srcProfile, srcFormat, dstProfile,
- TYPE_GRAY_8, intent, 0);
- break;
case cmsSigRgbData:
hTransform = cmsCreateTransform(srcProfile, srcFormat, dstProfile,
TYPE_BGR_8, intent, 0);
break;
+ case cmsSigGrayData:
case cmsSigCmykData:
- hTransform = cmsCreateTransform(srcProfile, srcFormat, dstProfile,
- TYPE_CMYK_8, intent, 0);
+ // Check3Components() already filtered these types.
+ NOTREACHED();
break;
default:
break;