Lines Matching defs:xyz
321 static void load_gamut(SkPoint rgb[], const SkMatrix44& xyz) {
325 float rSum = xyz.get(0, 0) + xyz.get(1, 0) + xyz.get(2, 0);
326 float gSum = xyz.get(0, 1) + xyz.get(1, 1) + xyz.get(2, 1);
327 float bSum = xyz.get(0, 2) + xyz.get(1, 2) + xyz.get(2, 2);
328 rgb[0].fX = xyz.get(0, 0) / rSum;
329 rgb[0].fY = xyz.get(1, 0) / rSum;
330 rgb[1].fX = xyz.get(0, 1) / gSum;
331 rgb[1].fY = xyz.get(1, 1) / gSum;
332 rgb[2].fX = xyz.get(0, 2) / bSum;
333 rgb[2].fY = xyz.get(1, 2) / bSum;
346 static void draw_gamut(SkCanvas* canvas, const SkMatrix44& xyz, const char* name, SkColor color,
348 // Report the XYZ values.
351 SkDebugf("X %.3f %.3f %.3f\n", xyz.get(0, 0), xyz.get(0, 1), xyz.get(0, 2));
352 SkDebugf("Y %.3f %.3f %.3f\n", xyz.get(1, 0), xyz.get(1, 1), xyz.get(1, 2));
353 SkDebugf("Z %.3f %.3f %.3f\n", xyz.get(2, 0), xyz.get(2, 1), xyz.get(2, 2));
355 // Calculate the points in the gamut from the XYZ values.
357 load_gamut(rgb, xyz);
497 SkDebugf("XYZ/TRC color space\n");
499 // Load a graph of the CIE XYZ color gamut.
524 auto xyz = static_cast<SkColorSpace_XYZ*>(colorSpace.get());
534 draw_transfer_fn(gammaCanvas.canvas(), xyz->gammaNamed(), xyz->gammas(), 0xFF000000);
560 SkDebugf("XYZ\n");