aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkColorSpace_A2B.h
diff options
context:
space:
mode:
authorGravatar raftias <raftias@google.com>2016-12-05 14:21:45 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2016-12-08 16:02:55 +0000
commite8ea07a6127971aea8183303b9abfa9856b7a54c (patch)
tree18abfbe218cc91c892288f508161af49befd56f5 /src/core/SkColorSpace_A2B.h
parenta9da22df9606559424853cab547784aa73b11534 (diff)
Added some named gamma recognition to lutnType ICC profile parsing
Most CMYK images I tested had linear gamma specified as tables, which is easily recognized and when present allows an entire SkRasterPipeline stage to be avoided for every single channel. This is likely due to the fact that gamma tables are required in lutntype A2B0 profiles. BUG=skia: Change-Id: I82b65848c4099035d61098abb66e9afe0b080930 Reviewed-on: https://skia-review.googlesource.com/5388 Reviewed-by: Matt Sarett <msarett@google.com> Commit-Queue: Robert Aftias <raftias@google.com>
Diffstat (limited to 'src/core/SkColorSpace_A2B.h')
-rw-r--r--src/core/SkColorSpace_A2B.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/core/SkColorSpace_A2B.h b/src/core/SkColorSpace_A2B.h
index 6c340c6ca3..77f1fa2e43 100644
--- a/src/core/SkColorSpace_A2B.h
+++ b/src/core/SkColorSpace_A2B.h
@@ -77,8 +77,9 @@ public:
, fGammaNamed(gammaNamed)
, fMatrix(SkMatrix44::kUninitialized_Constructor)
, fInputChannels(channelCount)
- , fOutputChannels(channelCount)
- {}
+ , fOutputChannels(channelCount) {
+ SkASSERT(gammaNamed != kNonStandard_SkGammaNamed);
+ }
explicit Element(sk_sp<SkGammas> gammas)
: fType(Type::kGammas)