diff options
author | Brian Osman <brianosman@google.com> | 2018-03-26 17:05:48 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-03-27 13:15:24 +0000 |
commit | 094fba9cd6075a81bb039baed31abacb3c34bb18 (patch) | |
tree | c5c08264571b30b35a88dbc7dc42ec80665f332b /tests | |
parent | c26be9c50f27aa53a547f2dac46074f09637f306 (diff) |
Add SkColorSpaceXform_skcms
Currently only enabled in Skia dev builds. Has some diffs
in GMs and images, but (hopefully) nothing major.
Bug: skia:
Change-Id: Ifdf5d2804e59f555a3dc84f657e438dd589a2751
Reviewed-on: https://skia-review.googlesource.com/116520
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
Diffstat (limited to 'tests')
-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 0efd9939c3..bd24f2458a 100644 --- a/tests/ColorSpaceXformTest.cpp +++ b/tests/ColorSpaceXformTest.cpp @@ -107,6 +107,12 @@ static void test_identity_xform(skiatest::Reporter* r, const sk_sp<SkGammas>& ga static void test_identity_xform_A2B(skiatest::Reporter* r, SkGammaNamed gammaNamed, const sk_sp<SkGammas>& gammas, int tol=1) { +#if defined(SK_USE_SKCMS) + (void)r; + (void)gammaNamed; + (void)gammas; + (void)tol; +#else // Arbitrary set of 10 pixels constexpr int width = 10; constexpr uint32_t srcPixels[width] = { @@ -133,6 +139,7 @@ static void test_identity_xform_A2B(skiatest::Reporter* r, SkGammaNamed gammaNam REPORTER_ASSERT(r, almost_equal(((srcPixels[i] >> 24) & 0xFF), SkGetPackedA32(dstPixels[i]), tol)); } +#endif } DEF_TEST(ColorSpaceXform_TableGamma, r) { @@ -264,6 +271,7 @@ DEF_TEST(ColorSpaceXform_NonMatchingGamma, r) { test_identity_xform_A2B(r, kNonStandard_SkGammaNamed, gammas, tolerance); } +#if !defined(SK_USE_SKCMS) DEF_TEST(ColorSpaceXform_A2BCLUT, r) { constexpr int inputChannels = 3; constexpr int gp = 4; // # grid points @@ -325,6 +333,7 @@ DEF_TEST(ColorSpaceXform_A2BCLUT, r) { SkColorGetR(dstPixels[i]))); } } +#endif DEF_TEST(SkColorSpaceXform_LoadTail, r) { std::unique_ptr<uint64_t[]> srcPixel(new uint64_t[1]); |