aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkColorSpace_XYZ.h
diff options
context:
space:
mode:
authorGravatar Matt Sarett <msarett@google.com>2016-12-15 13:05:53 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2016-12-16 20:41:36 +0000
commit595599f46261225dfc67ab4d91d326e099558239 (patch)
treeba51e94ee340db3eacdf0297df382ce5af221cd4 /src/core/SkColorSpace_XYZ.h
parent4cd68653e32928536854769ba132db5b43b5d337 (diff)
Rearrange ICC profile parsing
None of the small details have changed, just some high level reorganization: (1) Check for XYZ spaces before A2B. (2) If we fail to parse the XYZ space, fallback by trying to parse the A2B space. This should cause no image diffs on Gold. There is an image from the ICC website that is *supposed* to test that we parse the A2B tag before the XYZ tag. Our behavior on this image will actually not change - the XYZ tag is invalid (non-D50 matrix), so we fall back to A2B anyway. I think this behavior is ok. BUG:674584 Change-Id: I271fd990937268e03e98f5037a0837a574e775ef Reviewed-on: https://skia-review.googlesource.com/6143 Reviewed-by: Robert Aftias <raftias@google.com> Commit-Queue: Matt Sarett <msarett@google.com>
Diffstat (limited to 'src/core/SkColorSpace_XYZ.h')
-rw-r--r--src/core/SkColorSpace_XYZ.h18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/core/SkColorSpace_XYZ.h b/src/core/SkColorSpace_XYZ.h
index a179c1a501..4a32188d53 100644
--- a/src/core/SkColorSpace_XYZ.h
+++ b/src/core/SkColorSpace_XYZ.h
@@ -20,34 +20,34 @@ public:
const SkMatrix44* fromXYZD50() const override;
bool onGammaCloseToSRGB() const override;
-
+
bool onGammaIsLinear() const override;
-
+
Type type() const override { return Type::kXYZ; }
-
+
sk_sp<SkColorSpace> makeLinearGamma() override;
sk_sp<SkColorSpace> makeSRGBGamma() override;
-
+
SkGammaNamed gammaNamed() const { return fGammaNamed; }
-
+
const SkGammas* gammas() const { return fGammas.get(); }
-
+
void toDstGammaTables(const uint8_t* tables[3], sk_sp<SkData>* storage, int numTables) const;
-private:
SkColorSpace_XYZ(SkGammaNamed gammaNamed, const SkMatrix44& toXYZ);
SkColorSpace_XYZ(SkGammaNamed gammaNamed, sk_sp<SkGammas> gammas,
const SkMatrix44& toXYZ, sk_sp<SkData> profileData);
+private:
const SkGammaNamed fGammaNamed;
sk_sp<SkGammas> fGammas;
const SkMatrix44 fToXYZD50;
uint32_t fToXYZD50Hash;
-
+
mutable SkMatrix44 fFromXYZD50;
mutable SkOnce fFromXYZOnce;
-
+
mutable sk_sp<SkData> fDstStorage;
mutable const uint8_t* fToDstGammaTables[3];
mutable SkOnce fToDstGammaOnce;