Lines Matching defs:reporter
24 static void test_peekpixels(skiatest::Reporter* reporter) {
31 REPORTER_ASSERT(reporter, !bm.peekPixels(nullptr));
32 REPORTER_ASSERT(reporter, !bm.peekPixels(&pmap));
36 REPORTER_ASSERT(reporter, !bm.peekPixels(nullptr));
37 REPORTER_ASSERT(reporter, !bm.peekPixels(&pmap));
41 REPORTER_ASSERT(reporter, bm.peekPixels(nullptr));
42 REPORTER_ASSERT(reporter, bm.peekPixels(&pmap));
43 REPORTER_ASSERT(reporter, pmap.info() == bm.info());
44 REPORTER_ASSERT(reporter, pmap.addr() == bm.getPixels());
45 REPORTER_ASSERT(reporter, pmap.rowBytes() == bm.rowBytes());
49 static void test_bigalloc(skiatest::Reporter* reporter) {
55 REPORTER_ASSERT(reporter, !bm.tryAllocPixels(info));
58 REPORTER_ASSERT(reporter, !pr);
61 static void test_allocpixels(skiatest::Reporter* reporter) {
69 REPORTER_ASSERT(reporter, info.minRowBytes() == bm.rowBytes());
71 REPORTER_ASSERT(reporter, info.minRowBytes() == bm.rowBytes());
74 REPORTER_ASSERT(reporter, info.minRowBytes() == bm.rowBytes());
77 REPORTER_ASSERT(reporter, explicitRowBytes == bm.rowBytes());
79 REPORTER_ASSERT(reporter, explicitRowBytes == bm.rowBytes());
82 REPORTER_ASSERT(reporter, explicitRowBytes == bm.rowBytes());
86 REPORTER_ASSERT(reporter, info.minRowBytes() == bm.rowBytes());
89 REPORTER_ASSERT(reporter, info.minRowBytes() == bm.rowBytes());
93 REPORTER_ASSERT(reporter, !success);
94 REPORTER_ASSERT(reporter, bm.isNull());
121 REPORTER_ASSERT(reporter, success);
123 REPORTER_ASSERT(reporter, success);
126 REPORTER_ASSERT(reporter, !success);
127 REPORTER_ASSERT(reporter, bm.isNull());
133 static void test_bigwidth(skiatest::Reporter* reporter) {
138 REPORTER_ASSERT(reporter, bm.setInfo(info));
139 REPORTER_ASSERT(reporter, bm.setInfo(info.makeColorType(kRGB_565_SkColorType)));
147 REPORTER_ASSERT(reporter, !bm.setInfo(info.makeColorType(kN32_SkColorType)));
150 DEF_TEST(Bitmap, reporter) {
156 REPORTER_ASSERT(reporter, setConf);
160 REPORTER_ASSERT(reporter, SkToBool(width & height) != bm.empty());
164 test_bigwidth(reporter);
165 test_allocpixels(reporter);
166 test_bigalloc(reporter);
167 test_peekpixels(reporter);
191 static void test_erasecolor_premul(skiatest::Reporter* reporter, SkColorType ct, SkColor input,
196 INFOF(reporter, "expected: %x actual: %x\n", expected, bm.getColor(0, 0));
197 REPORTER_ASSERT(reporter, bm.getColor(0, 0) == expected);
307 static void check_alphas(skiatest::Reporter* reporter, const SkBitmap& bm,
318 ERRORF(reporter, "%s: got %g, want %g\n",
345 DEF_TEST(getalphaf, reporter) {
406 check_alphas(reporter, tmp, rec.fPred, rec.fColorType);
420 DEF_TEST(bitmap_zerowidth_crbug_1103827, reporter) {
435 REPORTER_ASSERT(reporter, size == r.expected_size);
439 REPORTER_ASSERT(reporter, size == bm.computeByteSize());