34 constexpr size_t kTestCount = 3;
47 constexpr size_t kPixelCount = 7;
50 float pixels[kPixelCount][3] = {
51 { 0.00f, 0.00f, 0.00f, },
52 { 0.50f, 0.50f, 0.50f, },
53 { 0.50f, 0.00f, 0.00f, },
54 { 0.00f, 0.50f, 0.00f, },
55 { 0.00f, 0.00f, 0.50f, },
56 { 0.25f, 0.50f, 0.00f, },
57 { 0.75f, 0.75f, 0.75f, },
61 constexpr float kPQ_05 = 0.3182877451f;
62 constexpr float kPQ_075 = 0.9943588777f;
65 constexpr float kPQ_025 = 0.020679904f;
68 constexpr float kHLG_05 = 0.20188954163f;
69 constexpr float kHLG_075 = 0.5208149688f;
72 constexpr float kSRGB_025 = 0.05087607f;
73 constexpr float kSRGB_05 = 0.21404112f;
74 constexpr float kSRGB_075 = 0.52252153f;
76 float dst_pixels_expected[kTestCount][kPixelCount][3] = {
79 { kPQ_05, kPQ_05, kPQ_05, },
80 { kPQ_05, 0.f, 0.f, },
81 { 0.f, kPQ_05, 0.f, },
82 { 0.f, 0.f, kPQ_05, },
83 { kPQ_025, kPQ_05, 0.f, },
84 { kPQ_075, kPQ_075, kPQ_075, },
88 { kHLG_05, kHLG_05, kHLG_05, },
89 { 0.1618f, 0.f, 0.f, },
90 { 0.f, 0.1895f, 0.f, },
91 { 0.f, 0.f, 0.1251f, },
92 { 0.0513f, 0.1924f, 0.f, },
93 { kHLG_075, kHLG_075, kHLG_075, },
97 { kSRGB_05, kSRGB_05, kSRGB_05, },
98 { kSRGB_05, 0.f, 0.f, },
99 { 0.f, kSRGB_05, 0.f, },
100 { 0.f, 0.f, kSRGB_05, },
101 { kSRGB_025, kSRGB_05, 0.f, },
102 { kSRGB_075, kSRGB_075, kSRGB_075, },
106 bool cicp_expected[kTestCount] = {
true,
true,
false};
107 bool a2b_expected[kTestCount] = {
true,
true,
false};
108 uint32_t cicp_primaries_expected[kTestCount] = {9, 12, 0};
109 uint32_t cicp_trfn_expected[kTestCount] = {16, 18, 0};
117 if (cicp_expected[
test]) {
128 for (
size_t pixel = 0; pixel < kPixelCount; ++pixel) {
129 float dst_pixel_actual[3]{0.f, 0.f, 0.f};
142 for (
size_t i = 0;
i < 3; ++
i) {
static bool approx_equal(const SkColor4f &a, const SkColor4f &b)
sk_sp< SkData > GetResourceAsData(const char *resource)
SK_API sk_sp< SkData > SkWriteICCProfile(const skcms_TransferFunction &, const skcms_Matrix3x3 &toXYZD50)
#define REPORTER_ASSERT(r, cond,...)
static bool Equals(const SkColorSpace *, const SkColorSpace *)
static sk_sp< SkColorSpace > MakeRGB(const skcms_TransferFunction &transferFn, const skcms_Matrix3x3 &toXYZ)
static sk_sp< SkColorSpace > Make(const skcms_ICCProfile &)
static constexpr skcms_Matrix3x3 kSRGB
static constexpr skcms_Matrix3x3 kAdobeRGB
static constexpr skcms_Matrix3x3 kRec2020
static constexpr skcms_Matrix3x3 kDisplayP3
static constexpr skcms_TransferFunction k2Dot2
static constexpr skcms_TransferFunction kSRGB
static constexpr skcms_TransferFunction kHLG
static constexpr skcms_TransferFunction kPQ
static constexpr skcms_TransferFunction kLinear
it will be possible to load the file into Perfetto s trace viewer disable asset Prevents usage of any non test fonts unless they were explicitly Loaded via prefetched default font Indicates whether the embedding started a prefetch of the default font manager before creating the engine run In non interactive keep the shell running after the Dart script has completed enable serial On low power devices with low core running concurrent GC tasks on threads can cause them to contend with the UI thread which could potentially lead to jank This option turns off all concurrent GC activities domain network JSON encoded network policy per domain This overrides the DisallowInsecureConnections switch Embedder can specify whether to allow or disallow insecure connections at a domain level old gen heap size
SIN Vec< N, float > abs(const Vec< N, float > &x)
bool skcms_Transform(const void *src, skcms_PixelFormat srcFmt, skcms_AlphaFormat srcAlpha, const skcms_ICCProfile *srcProfile, void *dst, skcms_PixelFormat dstFmt, skcms_AlphaFormat dstAlpha, const skcms_ICCProfile *dstProfile, size_t nz)
@ skcms_PixelFormat_RGB_fff
static bool skcms_Parse(const void *buf, size_t len, skcms_ICCProfile *profile)
@ skcms_AlphaFormat_Opaque
uint8_t matrix_coefficients
uint8_t video_full_range_flag
uint8_t transfer_characteristics
std::shared_ptr< const fml::Mapping > data