Lines Matching refs:Reporter
22 static void test_big_grad(skiatest::Reporter* reporter) {
51 void gradCheck(skiatest::Reporter* reporter, const sk_sp<SkShader>& shader,
60 REPORTER_ASSERT(reporter, shader->asAGradient(info) == gt);
62 REPORTER_ASSERT(reporter, info->fColorCount == fColorCount);
63 REPORTER_ASSERT(reporter,
65 REPORTER_ASSERT(reporter,
67 REPORTER_ASSERT(reporter, fTileMode == info->fTileMode);
72 static void none_gradproc(skiatest::Reporter* reporter, const GradRec&, const GradRec&) {
74 REPORTER_ASSERT(reporter, SkShader::kNone_GradientType == s->asAGradient(nullptr));
77 static void color_gradproc(skiatest::Reporter* reporter, const GradRec& rec, const GradRec&) {
79 REPORTER_ASSERT(reporter, SkShader::kColor_GradientType == s->asAGradient(nullptr));
85 REPORTER_ASSERT(reporter, 1 == info.fColorCount);
88 static void linear_gradproc(skiatest::Reporter* reporter, const GradRec& buildRec,
94 checkRec.gradCheck(reporter, s, &info, SkShader::kLinear_GradientType);
95 REPORTER_ASSERT(reporter, !memcmp(info.fPoint, checkRec.fPoint, 2 * sizeof(SkPoint)));
98 static void radial_gradproc(skiatest::Reporter* reporter, const GradRec& buildRec,
105 checkRec.gradCheck(reporter, s, &info, SkShader::kRadial_GradientType);
106 REPORTER_ASSERT(reporter, info.fPoint[0] == checkRec.fPoint[0]);
107 REPORTER_ASSERT(reporter, info.fRadius[0] == checkRec.fRadius[0]);
110 static void sweep_gradproc(skiatest::Reporter* reporter, const GradRec& buildRec,
117 checkRec.gradCheck(reporter, s, &info, SkShader::kSweep_GradientType);
118 REPORTER_ASSERT(reporter, info.fPoint[0] == checkRec.fPoint[0]);
121 static void conical_gradproc(skiatest::Reporter* reporter, const GradRec& buildRec,
133 checkRec.gradCheck(reporter, s, &info, SkShader::kConical_GradientType);
134 REPORTER_ASSERT(reporter, !memcmp(info.fPoint, checkRec.fPoint, 2 * sizeof(SkPoint)));
135 REPORTER_ASSERT(reporter, !memcmp(info.fRadius, checkRec.fRadius, 2 * sizeof(SkScalar)));
139 static void TestConstantGradient(skiatest::Reporter*) {
157 // REPORTER_ASSERT(reporter, SK_ColorBLUE == outBitmap.getColor(i, 0));
161 typedef void (*GradProc)(skiatest::Reporter* reporter, const GradRec&, const GradRec&);
163 static void TestGradientShaders(skiatest::Reporter* reporter) {
190 gProcs[i](reporter, rec, rec);
194 static void TestGradientOptimization(skiatest::Reporter* reporter) {
266 gProcInfo[i].fProc(reporter, rec, expected);
272 static void test_nearly_vertical(skiatest::Reporter* reporter) {
284 static void test_vertical(skiatest::Reporter* reporter) {
300 static void test_linear_fuzz(skiatest::Reporter* reporter) {
316 static void test_two_point_conical_zero_radius(skiatest::Reporter* reporter) {
332 REPORTER_ASSERT(reporter, SkGetPackedR32(centerPMColor) == 0);
336 static void test_clamping_overflow(skiatest::Reporter*) {
355 static void test_degenerate_linear(skiatest::Reporter*) {
371 static void test_linear_fuzzer(skiatest::Reporter*) {
485 DEF_TEST(Gradient, reporter) {
486 TestGradientShaders(reporter);
487 TestGradientOptimization(reporter);
488 TestConstantGradient(reporter);
489 test_big_grad(reporter);
490 test_nearly_vertical(reporter);
491 test_vertical(reporter);
492 test_linear_fuzz(reporter);
493 test_two_point_conical_zero_radius(reporter);
494 test_clamping_overflow(reporter);
495 test_degenerate_linear(reporter);
496 test_linear_fuzzer(reporter);