33 {
34 constexpr size_t kTestCount = 3;
39 };
40
45 };
46
47 constexpr size_t kPixelCount = 7;
48
49
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, },
58 };
59
60
61 constexpr float kPQ_05 = 0.3182877451f;
62 constexpr float kPQ_075 = 0.9943588777f;
63
64
65 constexpr float kPQ_025 = 0.020679904f;
66
67
68 constexpr float kHLG_05 = 0.20188954163f;
69 constexpr float kHLG_075 = 0.5208149688f;
70
71
72 constexpr float kSRGB_025 = 0.05087607f;
73 constexpr float kSRGB_05 = 0.21404112f;
74 constexpr float kSRGB_075 = 0.52252153f;
75
76 float dst_pixels_expected[kTestCount][kPixelCount][3] = {
77 {
78 { 0.f, 0.f, 0.f, },
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, },
85 },
86 {
87 { 0.f, 0.f, 0.f, },
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, },
94 },
95 {
96 { 0.f, 0.f, 0.f, },
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, },
103 },
104 };
105
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};
110
114
117 if (cicp_expected[
test]) {
122 }
123
127
128 for (size_t pixel = 0; pixel < kPixelCount; ++pixel) {
129 float dst_pixel_actual[3]{0.f, 0.f, 0.f};
133 &parsed,
134 dst_pixel_actual,
137 &dst_parsed,
138 1);
140
142 for (
size_t i = 0;
i < 3; ++
i) {
145 }
146 }
147 }
148}
static bool approx_equal(const SkColor4f &a, const SkColor4f &b)
SK_API sk_sp< SkData > SkWriteICCProfile(const skcms_TransferFunction &, const skcms_Matrix3x3 &toXYZD50)
static constexpr skcms_Matrix3x3 kSRGB
static constexpr skcms_Matrix3x3 kRec2020
static constexpr skcms_Matrix3x3 kDisplayP3
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
@ skcms_AlphaFormat_Opaque
uint8_t matrix_coefficients
uint8_t video_full_range_flag
uint8_t transfer_characteristics
std::shared_ptr< const fml::Mapping > data