Options
These globals are now defined:
double duration; // The requested duration of the animation. double frame; // A value in [0, 1] of where we are in the animation.
This global is now defined:
GrBackendRenderTarget backEndRenderTarget;
GrBackendTexture backEndTextureRenderTarget;
Optional source image
These globals are now defined:
SkBitmap source; sk_sp<SkImage> image; GrBackendTexture backEndTexture; // GPU Only.
Note:
Adding comments with SK_FOLD_START and SK_FOLD_END creates foldable code
blocks.
These blocks will be folded by default and are useful for highlighting specific lines of code.
You can also use the keyboard shortcuts Ctrl+S and Ctrl+E in the code editor to set them.
These blocks will be folded by default and are useful for highlighting specific lines of code.
You can also use the keyboard shortcuts Ctrl+S and Ctrl+E in the code editor to set them.
xxxxxxxxxx
20
void draw(SkCanvas* canvas) {
SkColorSpacePrimaries p;
// DCI-P3 Primaries from https://en.wikipedia.org/wiki/DCI-P3
p.fRX = 0.680f; p.fRY = 0.320f;
p.fGX = 0.265f; p.fGY = 0.690f;
p.fBX = 0.150f; p.fBY = 0.060f;
// DCI-P3 D65
p.fWX = 0.3127f; p.fWY = 0.3290f;
// DCI-P3 Theater
// p.fWX = 0.314; p.fWY = 0.351;
skcms_Matrix3x3 toXYZ;
p.toXYZD50(&toXYZ);
for (int i = 0; i < 3; ++i) {
SkDebugf("%f %f %f\n", toXYZ.vals[i][0], toXYZ.vals[i][1], toXYZ.vals[i][2]);
}
}