diff options
Diffstat (limited to 'tests/ColorSpaceXformTest.cpp')
-rw-r--r-- | tests/ColorSpaceXformTest.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/ColorSpaceXformTest.cpp b/tests/ColorSpaceXformTest.cpp index 3cac160e6c..0beb38fb7a 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 + |