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

Unified Diff: include/core/SkColorSpace.h

Issue 2318663003: Delete SkColorSpace::gammaNamed() from public API (Closed) Base URL: https://skia.googlesource.com/skia.git@delunknownnamed
Patch Set: Move GammaNamed field to SkColorSpace_Base Created 4 years, 3 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
« no previous file with comments | « no previous file | src/core/SkColorSpace.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkColorSpace.h
diff --git a/include/core/SkColorSpace.h b/include/core/SkColorSpace.h
index e0ef70eeca22a130a7782f17fc0f7956651942c1..715cc403e3fe8fac354bf46d8ddde7c9e0fc11dc 100644
--- a/include/core/SkColorSpace.h
+++ b/include/core/SkColorSpace.h
@@ -37,22 +37,10 @@ public:
kLinear_GammaNamed,
/**
- * Gamma curve is a close match to the canonical sRGB curve, which has
- * a short linear segment followed by a 2.4f exponential.
+ * Transfer function is the canonical sRGB curve, which has a short linear segment
+ * followed by a 2.4f exponential.
*/
kSRGB_GammaNamed,
-
- /**
- * Gamma curve is a close match to the 2.2f exponential curve. This is
- * used by Adobe RGB profiles and is common on monitors as well.
- */
- k2Dot2Curve_GammaNamed,
-
- /**
- * Gamma is represented by a look-up table, a parametric curve, or an uncommon
- * exponential curve. Or the R, G, and B gammas do not match.
- */
- kNonStandard_GammaNamed,
};
/**
@@ -75,8 +63,6 @@ public:
*/
sk_sp<SkColorSpace> makeLinearGamma();
- GammaNamed gammaNamed() const { return fGammaNamed; }
-
/**
* Returns the matrix used to transform src gamut to XYZ D50.
*/
@@ -85,18 +71,12 @@ public:
/**
* Returns true if the color space gamma is near enough to be approximated as sRGB.
*/
- bool gammaCloseToSRGB() const {
- return kSRGB_GammaNamed == fGammaNamed || k2Dot2Curve_GammaNamed == fGammaNamed;
- }
+ bool gammaCloseToSRGB() const;
msarett 2016/09/06 19:07:02 Patch Set 1 keeps the fGammaNamed field and k2Dot2
/**
- * To be used only by UMA code.
+ * Returns true if the color space gamma is linear.
*/
- bool gammasAreMatching() const;
- bool gammasAreNamed() const;
- bool gammasAreValues() const;
- bool gammasAreTables() const;
- bool gammasAreParams() const;
+ bool gammaIsLinear() const;
/**
* Returns nullptr on failure. Fails when we fallback to serializing ICC data and
@@ -119,9 +99,8 @@ public:
static bool Equals(const SkColorSpace* src, const SkColorSpace* dst);
protected:
- SkColorSpace(GammaNamed gammaNamed, const SkMatrix44& toXYZD50);
+ SkColorSpace(const SkMatrix44& toXYZD50);
- const GammaNamed fGammaNamed;
const SkMatrix44 fToXYZD50;
};
« no previous file with comments | « no previous file | src/core/SkColorSpace.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698