Lines Matching refs:Reporter
13 static void test_peekpixels(skiatest::Reporter* reporter) {
20 REPORTER_ASSERT(reporter, !bm.peekPixels(nullptr));
21 REPORTER_ASSERT(reporter, !bm.peekPixels(&pmap));
25 REPORTER_ASSERT(reporter, !bm.peekPixels(nullptr));
26 REPORTER_ASSERT(reporter, !bm.peekPixels(&pmap));
30 REPORTER_ASSERT(reporter, bm.peekPixels(nullptr));
31 REPORTER_ASSERT(reporter, bm.peekPixels(&pmap));
32 REPORTER_ASSERT(reporter, pmap.info() == bm.info());
33 REPORTER_ASSERT(reporter, pmap.addr() == bm.getPixels());
34 REPORTER_ASSERT(reporter, pmap.rowBytes() == bm.rowBytes());
35 REPORTER_ASSERT(reporter, pmap.ctable() == bm.getColorTable());
39 static void test_bigalloc(skiatest::Reporter* reporter) {
45 REPORTER_ASSERT(reporter, !bm.tryAllocPixels(info));
48 REPORTER_ASSERT(reporter, !pr);
51 static void test_allocpixels(skiatest::Reporter* reporter) {
59 REPORTER_ASSERT(reporter, info.minRowBytes() == bm.rowBytes());
61 REPORTER_ASSERT(reporter, info.minRowBytes() == bm.rowBytes());
64 REPORTER_ASSERT(reporter, info.minRowBytes() == bm.rowBytes());
67 REPORTER_ASSERT(reporter, explicitRowBytes == bm.rowBytes());
69 REPORTER_ASSERT(reporter, explicitRowBytes == bm.rowBytes());
72 REPORTER_ASSERT(reporter, explicitRowBytes == bm.rowBytes());
76 REPORTER_ASSERT(reporter, info.minRowBytes() == bm.rowBytes());
79 REPORTER_ASSERT(reporter, info.minRowBytes() == bm.rowBytes());
83 REPORTER_ASSERT(reporter, !success);
84 REPORTER_ASSERT(reporter, bm.isNull());
87 static void test_bigwidth(skiatest::Reporter* reporter) {
92 REPORTER_ASSERT(reporter, bm.setInfo(info));
93 REPORTER_ASSERT(reporter, bm.setInfo(info.makeColorType(kRGB_565_SkColorType)));
101 REPORTER_ASSERT(reporter, !bm.setInfo(info.makeColorType(kN32_SkColorType)));
107 DEF_TEST(Bitmap, reporter) {
113 REPORTER_ASSERT(reporter, setConf);
117 REPORTER_ASSERT(reporter, SkToBool(width & height) != bm.empty());
121 test_bigwidth(reporter);
122 test_allocpixels(reporter);
123 test_bigalloc(reporter);
124 test_peekpixels(reporter);
150 static void test_erasecolor_premul(skiatest::Reporter* reporter, SkColorType ct, SkColor input,
155 INFOF(reporter, "expected: %x actual: %x\n", expected, bm.getColor(0, 0));
156 REPORTER_ASSERT(reporter, bm.getColor(0, 0) == expected);