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 + |