Flutter Engine
The Flutter Engine
third_party
skia
docs
examples
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.
3
#include "
tools/fiddle/examples.h
"
4
REG_FIDDLE
(DCIToXYZD50, 512, 256,
true
, 0) {
5
void
draw
(
SkCanvas
* canvas) {
6
SkColorSpacePrimaries
p
;
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
REG_FIDDLE
REG_FIDDLE(DCIToXYZD50, 512, 256, true, 0)
Definition:
DCIToXYZD50.cpp:4
SkDebugf
void SK_SPI SkDebugf(const char format[],...) SK_PRINTF_LIKE(1
draw
static void draw(SkCanvas *canvas, SkRect &target, int x, int y)
Definition:
aaclip.cpp:27
SkCanvas
Definition:
SkCanvas.h:106
examples.h
i
int i
Definition:
fl_socket_accessible.cc:18
dart_profiler_symbols.p
p
Definition:
dart_profiler_symbols.py:55
SkColorSpacePrimaries
Definition:
SkColorSpace.h:25
skcms_Matrix3x3
Definition:
skcms_public.h:26
skcms_Matrix3x3::vals
float vals[3][3]
Definition:
skcms_public.h:27
Generated on Sun Jun 23 2024 21:55:55 for Flutter Engine by
1.9.4