379 {
381 static const SkColor gColors1[] = { 0x30303030, 0x30303030, 0x30303030 };
382
384
385 static const SkScalar gMatrix0[9] = {
386 6.40969056e-10f, 0 , 6.40969056e-10f,
387 0 , 4.42539023e-39f, 6.40969056e-10f,
388 0 , 0 , 1
389 };
390 static const SkScalar gMatrix1[9] = {
391 -2.75294113f , 6.40969056e-10f, 6.40969056e-10f,
392 6.40969056e-10f, 6.40969056e-10f, -3.32810161e+24f,
393 6.40969056e-10f, 6.40969056e-10f, 0
394 };
395 static const SkScalar gMatrix2[9] = {
396 7.93481258e+17f, 6.40969056e-10f, 6.40969056e-10f,
397 6.40969056e-10f, 6.40969056e-10f, 6.40969056e-10f,
398 6.40969056e-10f, 6.40969056e-10f, 0.688235283f
399 };
400 static const SkScalar gMatrix3[9] = {
401 1.89180674e+11f, 6.40969056e-10f, 6.40969056e-10f,
402 6.40969056e-10f, 6.40969056e-10f, 6.40969056e-10f,
403 6.40969056e-10f, 11276.0469f , 8.12524808e+20f
404 };
405
406 static const struct {
415 } gConfigs[] = {
416 {
417 {{0, -2.752941f}, {0, 0}},
419 nullptr,
422 0,
423 gMatrix0,
424 nullptr
425 },
426 {
427 {{4.42539023e-39f, -4.42539023e-39f}, {9.78041162e-15f, 4.42539023e-39f}},
432 0,
433 nullptr,
434 gMatrix1
435 },
436 {
437 {{4.42539023e-39f, 6.40969056e-10f}, {6.40969056e-10f, 1.49237238e-19f}},
442 0,
443 nullptr,
444 gMatrix2
445 },
446 {
447 {{6.40969056e-10f, 6.40969056e-10f}, {6.40969056e-10f, -0.688235283f}},
449 nullptr,
452 0,
453 gMatrix3,
454 nullptr
455 },
456 };
457
460 nullptr,
462 };
463
465
470
471 for (const auto& config : gConfigs) {
474 if (config.fLocalMatrix) {
476 localMatrix->set9(config.fLocalMatrix);
477 }
478
480 config.fColors,
481 config.fPos,
482 config.fCount,
483 config.fTileMode,
484 config.fFlags,
486 if (config.fGlobalMatrix) {
488 m.set9(config.fGlobalMatrix);
491 }
492
494 }
495 }
496}
sk_sp< T > sk_ref_sp(T *obj)
static const SkScalar gPos1[]
void drawPaint(const SkPaint &paint)
void concat(const SkMatrix &matrix)
static sk_sp< SkColorSpace > MakeSRGB()
T * init(Args &&... args)
const T * getMaybeNull() const