c3186302bd
skcms is part of Skia's public API now. This attempts to recognize that, and pave the way for moving the header to another location more easily in a follow up CL, or - at a minimum - for clients that redistribute Skia as a library + includes to relocate the skcms.h header as part of that. Change-Id: I15da63b0d4ab8916a71fb7e6ab3656db87252707 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/209640 Reviewed-by: Mike Klein <mtklein@google.com> Reviewed-by: Kevin Lubick <kjlubick@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
28 lines
752 B
C++
28 lines
752 B
C++
/*
|
|
* Copyright 2016 Google Inc.
|
|
*
|
|
* Use of this source code is governed by a BSD-style license that can be
|
|
* found in the LICENSE file.
|
|
*/
|
|
|
|
#include "SkTypes.h"
|
|
|
|
#include "Resources.h"
|
|
#include "SkColorSpacePriv.h"
|
|
#include "SkICC.h"
|
|
#include "SkString.h"
|
|
#include "Test.h"
|
|
|
|
#include "skcms.h"
|
|
|
|
DEF_TEST(AdobeRGB, r) {
|
|
if (sk_sp<SkData> profile = GetResourceAsData("icc_profiles/AdobeRGB1998.icc")) {
|
|
skcms_ICCProfile parsed;
|
|
REPORTER_ASSERT(r, skcms_Parse(profile->data(), profile->size(), &parsed));
|
|
|
|
auto got = SkColorSpace::Make(parsed);
|
|
auto want = SkColorSpace::MakeRGB(SkNamedTransferFn::k2Dot2, SkNamedGamut::kAdobeRGB);
|
|
REPORTER_ASSERT(r, SkColorSpace::Equals(got.get(), want.get()));
|
|
}
|
|
}
|