diff options
author | Matt Sarett <msarett@google.com> | 2017-02-24 17:22:09 -0500 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-02-24 23:13:15 +0000 |
commit | 7f15b682f4e3e0f61a56d3bbdb8163d3a54b997c (patch) | |
tree | 0810c4c47d1bf33b468b40da6afa02c929e86143 /src/core/SkColorSpace_A2B.h | |
parent | 443ec1b794ec5ec8a155a9cdc641e95a95914533 (diff) |
Fix bug handling CMYK images without color profiles
We need the swizzler to convert CMYK->RGB in some
cases where we do have a color xform.
BUG=skia:
Change-Id: Id467ad03df64368fd5a6c3bd5461566582eb492e
Reviewed-on: https://skia-review.googlesource.com/8973
Commit-Queue: Matt Sarett <msarett@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
Diffstat (limited to 'src/core/SkColorSpace_A2B.h')
-rw-r--r-- | src/core/SkColorSpace_A2B.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/core/SkColorSpace_A2B.h b/src/core/SkColorSpace_A2B.h index 99248b80fd..610f07e9d0 100644 --- a/src/core/SkColorSpace_A2B.h +++ b/src/core/SkColorSpace_A2B.h @@ -52,6 +52,8 @@ public: bool onGammaIsLinear() const override { return false; } bool onIsNumericalTransferFn(SkColorSpaceTransferFn* coeffs) const override { return false; } + bool onIsCMYK() const override { return kCMYK_ICCTypeFlag == fICCType; } + sk_sp<SkColorSpace> makeLinearGamma() override { // TODO: Analyze the extrema of our projection into XYZ and use suitable primaries? // For now, just fall back to a default, because we don't have a good answer. |