Lines Matching refs:Reporter
12 static void test_peekpixels(skiatest::Reporter* reporter) {
19 REPORTER_ASSERT(reporter, !bm.peekPixels(nullptr));
20 REPORTER_ASSERT(reporter, !bm.peekPixels(&pmap));
24 REPORTER_ASSERT(reporter, !bm.peekPixels(nullptr));
25 REPORTER_ASSERT(reporter, !bm.peekPixels(&pmap));
29 REPORTER_ASSERT(reporter, bm.peekPixels(nullptr));
30 REPORTER_ASSERT(reporter, bm.peekPixels(&pmap));
31 REPORTER_ASSERT(reporter, pmap.info() == bm.info());
32 REPORTER_ASSERT(reporter, pmap.addr() == bm.getPixels());
33 REPORTER_ASSERT(reporter, pmap.rowBytes() == bm.rowBytes());
34 REPORTER_ASSERT(reporter, pmap.ctable() == bm.getColorTable());
38 static void test_bigalloc(skiatest::Reporter* reporter) {
44 REPORTER_ASSERT(reporter, !bm.tryAllocPixels(info));
47 REPORTER_ASSERT(reporter, !pr);
50 static void test_allocpixels(skiatest::Reporter* reporter) {
58 REPORTER_ASSERT(reporter, info.minRowBytes() == bm.rowBytes());
60 REPORTER_ASSERT(reporter, info.minRowBytes() == bm.rowBytes());
63 REPORTER_ASSERT(reporter, info.minRowBytes() == bm.rowBytes());
66 REPORTER_ASSERT(reporter, explicitRowBytes == bm.rowBytes());
68 REPORTER_ASSERT(reporter, explicitRowBytes == bm.rowBytes());
71 REPORTER_ASSERT(reporter, explicitRowBytes == bm.rowBytes());
75 REPORTER_ASSERT(reporter, info.minRowBytes() == bm.rowBytes());
78 REPORTER_ASSERT(reporter, info.minRowBytes() == bm.rowBytes());
82 REPORTER_ASSERT(reporter, !success);
83 REPORTER_ASSERT(reporter, bm.isNull());
86 static void test_bigwidth(skiatest::Reporter* reporter) {
91 REPORTER_ASSERT(reporter, bm.setInfo(info));
92 REPORTER_ASSERT(reporter, bm.setInfo(info.makeColorType(kRGB_565_SkColorType)));
100 REPORTER_ASSERT(reporter, !bm.setInfo(info.makeColorType(kN32_SkColorType)));
106 DEF_TEST(Bitmap, reporter) {
112 REPORTER_ASSERT(reporter, setConf);
116 REPORTER_ASSERT(reporter, SkToBool(width & height) != bm.empty());
120 test_bigwidth(reporter);
121 test_allocpixels(reporter);
122 test_bigalloc(reporter);
123 test_peekpixels(reporter);
149 static void test_erasecolor_premul(skiatest::Reporter* reporter, SkColorType ct, SkColor input,
154 INFOF(reporter, "expected: %x actual: %x\n", expected, bm.getColor(0, 0));
155 REPORTER_ASSERT(reporter, bm.getColor(0, 0) == expected);