Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
DCIToXYZD50.cpp
Go to the documentation of this file.
1// Copyright 2020 Google LLC.
2// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
4REG_FIDDLE(DCIToXYZD50, 512, 256, true, 0) {
5void draw(SkCanvas* canvas) {
7 // DCI-P3 Primaries from https://en.wikipedia.org/wiki/DCI-P3
8 p.fRX = 0.680f; p.fRY = 0.320f;
9 p.fGX = 0.265f; p.fGY = 0.690f;
10 p.fBX = 0.150f; p.fBY = 0.060f;
11
12 // DCI-P3 D65
13 p.fWX = 0.3127f; p.fWY = 0.3290f;
14
15 // DCI-P3 Theater
16 // p.fWX = 0.314; p.fWY = 0.351;
17
18 skcms_Matrix3x3 toXYZ;
19 p.toXYZD50(&toXYZ);
20
21 for (int i = 0; i < 3; ++i) {
22 SkDebugf("%f %f %f\n", toXYZ.vals[i][0], toXYZ.vals[i][1], toXYZ.vals[i][2]);
23 }
24}
25} // END FIDDLE
void SK_SPI SkDebugf(const char format[],...) SK_PRINTF_LIKE(1
static void draw(SkCanvas *canvas, SkRect &target, int x, int y)
Definition aaclip.cpp:27
#define REG_FIDDLE(NAME, W, H, TEXT, I)
Definition examples.h:60
float vals[3][3]