Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1223)

Unified Diff: include/core/SkColorSpace.h

Issue 2000713003: Add SkColorSpace to SkImageInfo (Closed) Base URL: https://skia.googlesource.com/skia.git@public
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: include/core/SkColorSpace.h
diff --git a/include/core/SkColorSpace.h b/include/core/SkColorSpace.h
index 12087f5e336d05b40cce498714d59996883d4554..ba7a4cfde2f5f1b1fdba1d4fab0c7e5d8b9a065e 100644
--- a/include/core/SkColorSpace.h
+++ b/include/core/SkColorSpace.h
@@ -48,6 +48,28 @@ public:
*/
SkGammas* gammas() const { return fGammas.get(); }
+ enum GammaNamed {
+ kLinear_GammaNamed,
+
+ /**
+ * Gamma curve is a close match to the canonical sRGB gamma curve or another
+ * similar gamma curve.
+ *
+ * sRGB gamma curves have a short linear segment followed by an exponential (e = 2.4f).
+ * This is very similar to another common exponential curve (e = 2.2f).
+ */
+ kSRGBCurve_GammaNamed,
+
+ /**
+ * Gamma is represented by a look-up table, a parametric curve, or an uncommon
+ * exponential curve. Or there is an additional pre-processing step before the
+ * applying the gamma.
+ */
+ kNonStandard_GammaNamed,
+ };
+
+ GammaNamed gammaNamed() { return fGammaNamed; }
+
/**
* Returns the matrix used to transform src gamut to XYZ D50.
*/
@@ -70,10 +92,13 @@ private:
SkColorSpace(sk_sp<SkGammas> gammas, const SkMatrix44& toXYZ, Named);
+ SkColorSpace(sk_sp<SkGammas> gammas, GammaNamed gammaNamed, const SkMatrix44& toXYZ, Named);
+
SkColorSpace(SkColorLookUpTable* colorLUT, sk_sp<SkGammas> gammas, const SkMatrix44& toXYZ);
SkAutoTDelete<SkColorLookUpTable> fColorLUT;
sk_sp<SkGammas> fGammas;
+ const GammaNamed fGammaNamed;
const SkMatrix44 fToXYZD50;
const Named fNamed;
};

Powered by Google App Engine
This is Rietveld 408576698