summaryrefslogtreecommitdiff
path: root/core/fpdfapi/render
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2018-06-29 18:39:50 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-06-29 18:39:50 +0000
commit2895880fa8354b273b4e2b72e61a5b78d1985fa8 (patch)
tree0df028f2ac4a8548df7817246d13f04326bf6bba /core/fpdfapi/render
parentae82b696f236bc5bd1375532bcf867fcc6aa9126 (diff)
downloadpdfium-2895880fa8354b273b4e2b72e61a5b78d1985fa8.tar.xz
Better determine if ICC colorspaces can be used for blending.
Implement CPDF_ColorSpace::IsNormal() and check it when rendering. While IsNormal() is trivial for most colorspaces, it needs to be implemented separately for ICC colorspaces. This fixes a rendering regression from commit 1c0de38c. BUG=chromium:847346 Change-Id: Iaafed3f8ee40b26ac2cbfbdf2251407f7935311b Reviewed-on: https://pdfium-review.googlesource.com/36571 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'core/fpdfapi/render')
-rw-r--r--core/fpdfapi/render/cpdf_renderstatus.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/core/fpdfapi/render/cpdf_renderstatus.cpp b/core/fpdfapi/render/cpdf_renderstatus.cpp
index 8b58295ab4..29a30157df 100644
--- a/core/fpdfapi/render/cpdf_renderstatus.cpp
+++ b/core/fpdfapi/render/cpdf_renderstatus.cpp
@@ -2638,8 +2638,10 @@ FX_ARGB CPDF_RenderStatus::GetBackColor(const CPDF_Dictionary* pSMaskDict,
return kDefaultColor;
int family = pCS->GetFamily();
- if (family == PDFCS_LAB || family == PDFCS_ICCBASED || pCS->IsSpecial())
+ if (family == PDFCS_LAB || pCS->IsSpecial() ||
+ (family == PDFCS_ICCBASED && !pCS->IsNormal())) {
return kDefaultColor;
+ }
// Store Color Space Family to use in CPDF_RenderStatus::Initialize().
*pCSFamily = family;