Home | History | Annotate | Download | only in tests

Lines Matching refs:Reporter

21 static void test_big_grad(skiatest::Reporter* reporter) {
50 void gradCheck(skiatest::Reporter* reporter, const sk_sp<SkShader>& shader,
59 REPORTER_ASSERT(reporter, shader->asAGradient(info) == gt);
61 REPORTER_ASSERT(reporter, info->fColorCount == fColorCount);
62 REPORTER_ASSERT(reporter,
64 REPORTER_ASSERT(reporter,
66 REPORTER_ASSERT(reporter, fTileMode == info->fTileMode);
71 static void none_gradproc(skiatest::Reporter* reporter, const GradRec&, const GradRec&) {
73 REPORTER_ASSERT(reporter, SkShader::kNone_GradientType == s->asAGradient(nullptr));
76 static void color_gradproc(skiatest::Reporter* reporter, const GradRec& rec, const GradRec&) {
78 REPORTER_ASSERT(reporter, SkShader::kColor_GradientType == s->asAGradient(nullptr));
84 REPORTER_ASSERT(reporter, 1 == info.fColorCount);
87 static void linear_gradproc(skiatest::Reporter* reporter, const GradRec& buildRec,
93 checkRec.gradCheck(reporter, s, &info, SkShader::kLinear_GradientType);
94 REPORTER_ASSERT(reporter, !memcmp(info.fPoint, checkRec.fPoint, 2 * sizeof(SkPoint)));
97 static void radial_gradproc(skiatest::Reporter* reporter, const GradRec& buildRec,
104 checkRec.gradCheck(reporter, s, &info, SkShader::kRadial_GradientType);
105 REPORTER_ASSERT(reporter, info.fPoint[0] == checkRec.fPoint[0]);
106 REPORTER_ASSERT(reporter, info.fRadius[0] == checkRec.fRadius[0]);
109 static void sweep_gradproc(skiatest::Reporter* reporter, const GradRec& buildRec,
116 checkRec.gradCheck(reporter, s, &info, SkShader::kSweep_GradientType);
117 REPORTER_ASSERT(reporter, info.fPoint[0] == checkRec.fPoint[0]);
120 static void conical_gradproc(skiatest::Reporter* reporter, const GradRec& buildRec,
132 checkRec.gradCheck(reporter, s, &info, SkShader::kConical_GradientType);
133 REPORTER_ASSERT(reporter, !memcmp(info.fPoint, checkRec.fPoint, 2 * sizeof(SkPoint)));
134 REPORTER_ASSERT(reporter, !memcmp(info.fRadius, checkRec.fRadius, 2 * sizeof(SkScalar)));
138 static void TestConstantGradient(skiatest::Reporter*) {
155 // REPORTER_ASSERT(reporter, SK_ColorBLUE == outBitmap.getColor(i, 0));
159 typedef void (*GradProc)(skiatest::Reporter* reporter, const GradRec&, const GradRec&);
161 static void TestGradientShaders(skiatest::Reporter* reporter) {
188 gProcs[i](reporter, rec, rec);
192 static void TestGradientOptimization(skiatest::Reporter* reporter) {
264 gProcInfo[i].fProc(reporter, rec, expected);
270 static void test_nearly_vertical(skiatest::Reporter* reporter) {
282 static void test_vertical(skiatest::Reporter* reporter) {
298 static void test_linear_fuzz(skiatest::Reporter* reporter) {
314 static void test_two_point_conical_zero_radius(skiatest::Reporter* reporter) {
330 REPORTER_ASSERT(reporter, SkGetPackedR32(centerPMColor) == 0);
334 static void test_clamping_overflow(skiatest::Reporter*) {
353 static void test_degenerate_linear(skiatest::Reporter*) {
369 static void test_linear_fuzzer(skiatest::Reporter*) {
491 static void test_sweep_fuzzer(skiatest::Reporter*) {
537 DEF_TEST(Gradient, reporter) {
538 TestGradientShaders(reporter);
539 TestGradientOptimization(reporter);
540 TestConstantGradient(reporter);
541 test_big_grad(reporter);
542 test_nearly_vertical(reporter);
543 test_vertical(reporter);
544 test_linear_fuzz(reporter);
545 test_two_point_conical_zero_radius(reporter);
546 test_clamping_overflow(reporter);
547 test_degenerate_linear(reporter);
548 test_linear_fuzzer(reporter);
549 test_sweep_fuzzer(reporter);