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>
This commit is contained in:
parent
58b90f7f17
commit
12e4e84f73
1
BUILD.gn
1
BUILD.gn
@ -1388,6 +1388,7 @@ if (skia_enable_tools) {
|
||||
":skia",
|
||||
":tool_utils",
|
||||
"//third_party/libpng",
|
||||
"//third_party/skcms",
|
||||
"//third_party/zlib",
|
||||
]
|
||||
public_deps = [
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user