412 {
413
414 static const int kNumRRects = 4;
415 static const SkVector gRadii[kNumRRects][4] = {
416 { { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 } },
417 { { 20, 20 }, { 20, 20 }, { 20, 20 }, { 20, 20 } },
418 { { 10, 10 }, { 10, 10 }, { 10, 10 }, { 10, 10 } },
419 { { 0, 0 }, { 20, 20 }, { 10, 10 }, { 30, 30 } }
420 };
421
423 for (
int i = 0;
i < kNumRRects; ++
i) {
425 }
426
427
428
429 static const SkRect easyOuts[] = {
430 { -5, -5, 5, 5 },
431 { 15, -5, 20, 5 },
432 { 35, -5, 45, 5 },
433 { 35, 15, 45, 20 },
434 { 35, 45, 35, 45 },
435 { 15, 35, 20, 45 },
436 { -5, 35, 5, 45 },
437 { -5, 15, 5, 20 }
438 };
439
440 for (
int i = 0;
i < kNumRRects; ++
i) {
441 for (
size_t j = 0; j <
std::size(easyOuts); ++j) {
443 }
444 }
445
446
447
448
449 static const int kNumSteps = 15;
450 bool answers[kNumRRects][8][kNumSteps] = {
451
452 {
453
454 { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 },
455 { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 },
456 { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 },
457 { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 },
458 { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 },
459 { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 },
460 { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 },
461 { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 },
462 },
463
464
465
466
467 {
468
469 { 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1 },
470 { 0, 1, 1, 1, 1, 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 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 },
507
508 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1 },
509
510 { 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 },
511 }
512 };
513
514 for (
int i = 0;
i < kNumRRects; ++
i) {
523 }
524}
static const double answers[][2]
static void test_direction(skiatest::Reporter *reporter, const SkRRect &rr, SkScalar initX, int stepX, SkScalar initY, int stepY, int numSteps, const bool *contains)