aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--BUILD.gn1
-rw-r--r--tests/ColorSpaceTest.cpp11
2 files changed, 12 insertions, 0 deletions
diff --git a/BUILD.gn b/BUILD.gn
index 1ebd6e6d73..7eaeed16fb 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -1388,6 +1388,7 @@ if (skia_enable_tools) {
":skia",
":tool_utils",
"//third_party/libpng",
+ "//third_party/skcms",
"//third_party/zlib",
]
public_deps = [
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