From 12e4e84f7335c26cd5e17b56c09d50210abebd8c Mon Sep 17 00:00:00 2001 From: Brian Osman Date: Fri, 27 Apr 2018 12:03:51 -0400 Subject: Add test to ensure that skcms' sRGB turns into Skia's sRGB color space Change-Id: Ib69926218895f9c3df8d02906188f5e54d134fad Reviewed-on: https://skia-review.googlesource.com/124265 Commit-Queue: Brian Osman Auto-Submit: Brian Osman Reviewed-by: Mike Klein --- tests/ColorSpaceTest.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'tests/ColorSpaceTest.cpp') diff --git a/tests/ColorSpaceTest.cpp b/tests/ColorSpaceTest.cpp index 6ec59dd01e..05e6893875 100644 --- a/tests/ColorSpaceTest.cpp +++ b/tests/ColorSpaceTest.cpp @@ -19,6 +19,10 @@ #include "Test.h" #include "png.h" +#if defined(SK_USE_SKCMS) +#include "skcms.h" +#endif + #include #include @@ -431,3 +435,10 @@ DEF_TEST(ColorSpace_IsSRGB, r) { REPORTER_ASSERT(r, srgb0->isSRGB()); REPORTER_ASSERT(r, !twoDotTwo->isSRGB()); } + +#if defined(SK_USE_SKCMS) +DEF_TEST(ColorSpace_skcms_IsSRGB, r) { + sk_sp srgb = SkColorSpace::Make(&skcms_sRGB_profile); + REPORTER_ASSERT(r, srgb->isSRGB()); +} +#endif -- cgit v1.2.3