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

Unified Diff: src/core/SkColorSpace_Base.h

Issue 2409383002: Add SkColorSpaceTransferFn to SkColorSpace (Closed)
Patch Set: Add more comments Created 4 years, 2 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 | « src/core/SkColorSpaceXform.cpp ('k') | src/core/SkColorSpace_ICC.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkColorSpace_Base.h
diff --git a/src/core/SkColorSpace_Base.h b/src/core/SkColorSpace_Base.h
index 07fa3832530d3357a45350043a5a3b2d41b41d52..f0e26be7f2923b2859e9c07115800ca8b84673ba 100644
--- a/src/core/SkColorSpace_Base.h
+++ b/src/core/SkColorSpace_Base.h
@@ -42,19 +42,6 @@ struct SkGammas : SkRefCnt {
}
};
- // Contains the parameters for a parametric curve.
- struct Params {
- // Y = (aX + b)^g + c for X >= d
- // Y = eX + f otherwise
- float fG;
- float fA;
- float fB;
- float fC;
- float fD;
- float fE;
- float fF;
- };
-
// Contains the actual gamma curve information. Should be interpreted
// based on the type of the gamma curve.
union Data {
@@ -72,8 +59,9 @@ struct SkGammas : SkRefCnt {
Table fTable;
size_t fParamOffset;
- const Params& params(const SkGammas* base) const {
- return *SkTAddOffset<const Params>(base, sizeof(SkGammas) + fParamOffset);
+ const SkColorSpaceTransferFn& params(const SkGammas* base) const {
+ return *SkTAddOffset<const SkColorSpaceTransferFn>(
+ base, sizeof(SkGammas) + fParamOffset);
}
};
@@ -112,7 +100,7 @@ struct SkGammas : SkRefCnt {
return this->data(i).fTable.table(this);
}
- const Params& params(int i) const {
+ const SkColorSpaceTransferFn& params(int i) const {
SkASSERT(isParametric(i));
return this->data(i).params(this);
}
« no previous file with comments | « src/core/SkColorSpaceXform.cpp ('k') | src/core/SkColorSpace_ICC.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698