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

Unified Diff: tests/ColorSpaceXformTest.cpp

Issue 2326043002: Delete some LUTs from SkColorSpaceXform (Closed)
Patch Set: Type f for float 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 | « src/core/SkColorSpaceXform.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/ColorSpaceXformTest.cpp
diff --git a/tests/ColorSpaceXformTest.cpp b/tests/ColorSpaceXformTest.cpp
index 3cac160e6c265403510d43a98166531b9546b9f1..0beb38fb7a3c65978ebb7e561893aeac87ff5010 100644
--- a/tests/ColorSpaceXformTest.cpp
+++ b/tests/ColorSpaceXformTest.cpp
@@ -113,6 +113,15 @@ DEF_TEST(ColorSpaceXform_ExponentialGamma, r) {
test_identity_xform(r, gammas);
}
+DEF_TEST(ColorSpaceXform_NamedGamma, r) {
+ sk_sp<SkGammas> gammas = sk_sp<SkGammas>(new SkGammas());
+ gammas->fRedType = gammas->fGreenType = gammas->fBlueType = SkGammas::Type::kNamed_Type;
+ gammas->fRedData.fNamed = kSRGB_SkGammaNamed;
+ gammas->fGreenData.fNamed = k2Dot2Curve_SkGammaNamed;
+ gammas->fBlueData.fNamed = kLinear_SkGammaNamed;
+ test_identity_xform(r, gammas);
+}
+
DEF_TEST(ColorSpaceXform_NonMatchingGamma, r) {
constexpr size_t tableSize = 10;
void* memory = sk_malloc_throw(sizeof(SkGammas) + sizeof(float) * tableSize +
« no previous file with comments | « src/core/SkColorSpaceXform.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698