diff options
author | Brian Osman <brianosman@google.com> | 2018-04-27 12:03:51 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-04-30 13:24:00 +0000 |
commit | 12e4e84f7335c26cd5e17b56c09d50210abebd8c (patch) | |
tree | 482b3b6623fcfcd5e66b3e2239b7fd9f6969014f /tests/ColorSpaceTest.cpp | |
parent | 58b90f7f1757bd70b836c9daeb8f1cf6c2cd660b (diff) |
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 <brianosman@google.com>
Auto-Submit: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
Diffstat (limited to 'tests/ColorSpaceTest.cpp')
-rw-r--r-- | tests/ColorSpaceTest.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
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 <memory> #include <utility> @@ -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<SkColorSpace> srgb = SkColorSpace::Make(&skcms_sRGB_profile); + REPORTER_ASSERT(r, srgb->isSRGB()); +} +#endif |