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

Unified Diff: src/core/SkColorSpace.cpp

Issue 2319073002: Add gammaIsLinear() API to SkColorSpace (Closed)
Patch Set: 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 | « include/core/SkColorSpace.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkColorSpace.cpp
diff --git a/src/core/SkColorSpace.cpp b/src/core/SkColorSpace.cpp
index 191d077223da772f7b71a4840ba6bf6b090b0f21..486699ecf60d65ea9ee742143bcf92b48be2db40 100644
--- a/src/core/SkColorSpace.cpp
+++ b/src/core/SkColorSpace.cpp
@@ -407,42 +407,3 @@ bool SkColorSpace::Equals(const SkColorSpace* src, const SkColorSpace* dst) {
0 == memcmp(srcData->data(), dstData->data(), srcData->size());
}
}
-
-bool SkColorSpace::gammasAreMatching() const {
- const SkGammas* gammas = as_CSB(this)->gammas();
- SkASSERT(gammas);
- return gammas->fRedType == gammas->fGreenType && gammas->fGreenType == gammas->fBlueType &&
- gammas->fRedData == gammas->fGreenData && gammas->fGreenData == gammas->fBlueData;
-}
-
-bool SkColorSpace::gammasAreNamed() const {
- const SkGammas* gammas = as_CSB(this)->gammas();
- SkASSERT(gammas);
- return gammas->fRedType == SkGammas::Type::kNamed_Type &&
- gammas->fGreenType == SkGammas::Type::kNamed_Type &&
- gammas->fBlueType == SkGammas::Type::kNamed_Type;
-}
-
-bool SkColorSpace::gammasAreValues() const {
- const SkGammas* gammas = as_CSB(this)->gammas();
- SkASSERT(gammas);
- return gammas->fRedType == SkGammas::Type::kValue_Type &&
- gammas->fGreenType == SkGammas::Type::kValue_Type &&
- gammas->fBlueType == SkGammas::Type::kValue_Type;
-}
-
-bool SkColorSpace::gammasAreTables() const {
- const SkGammas* gammas = as_CSB(this)->gammas();
- SkASSERT(gammas);
- return gammas->fRedType == SkGammas::Type::kTable_Type &&
- gammas->fGreenType == SkGammas::Type::kTable_Type &&
- gammas->fBlueType == SkGammas::Type::kTable_Type;
-}
-
-bool SkColorSpace::gammasAreParams() const {
- const SkGammas* gammas = as_CSB(this)->gammas();
- SkASSERT(gammas);
- return gammas->fRedType == SkGammas::Type::kParam_Type &&
- gammas->fGreenType == SkGammas::Type::kParam_Type &&
- gammas->fBlueType == SkGammas::Type::kParam_Type;
-}
« no previous file with comments | « include/core/SkColorSpace.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698