Home | History | Annotate | Download | only in tests

Lines Matching refs:bm

17     SkBitmap bm;
20 REPORTER_ASSERT(reporter, !bm.peekPixels(nullptr));
21 REPORTER_ASSERT(reporter, !bm.peekPixels(&pmap));
24 bm.setInfo(SkImageInfo::MakeN32Premul(10, 10));
25 REPORTER_ASSERT(reporter, !bm.peekPixels(nullptr));
26 REPORTER_ASSERT(reporter, !bm.peekPixels(&pmap));
29 bm.allocPixels(info);
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());
44 SkBitmap bm;
45 REPORTER_ASSERT(reporter, !bm.tryAllocPixels(info));
57 SkBitmap bm;
58 bm.setInfo(info);
59 REPORTER_ASSERT(reporter, info.minRowBytes() == bm.rowBytes());
60 bm.allocPixels();
61 REPORTER_ASSERT(reporter, info.minRowBytes() == bm.rowBytes());
62 bm.reset();
63 bm.allocPixels(info);
64 REPORTER_ASSERT(reporter, info.minRowBytes() == bm.rowBytes());
66 bm.setInfo(info, explicitRowBytes);
67 REPORTER_ASSERT(reporter, explicitRowBytes == bm.rowBytes());
68 bm.allocPixels();
69 REPORTER_ASSERT(reporter, explicitRowBytes == bm.rowBytes());
70 bm.reset();
71 bm.allocPixels(info, explicitRowBytes);
72 REPORTER_ASSERT(reporter, explicitRowBytes == bm.rowBytes());
74 bm.reset();
75 bm.setInfo(info, 0);
76 REPORTER_ASSERT(reporter, info.minRowBytes() == bm.rowBytes());
77 bm.reset();
78 bm.allocPixels(info, 0);
79 REPORTER_ASSERT(reporter, info.minRowBytes() == bm.rowBytes());
81 bm.reset();
82 bool success = bm.setInfo(info, info.minRowBytes() - 1); // invalid for 32bit
84 REPORTER_ASSERT(reporter, bm.isNull());
88 SkBitmap bm;
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)));
111 SkBitmap bm;
112 bool setConf = bm.setInfo(SkImageInfo::MakeN32Premul(width, height));
115 bm.allocPixels();
117 REPORTER_ASSERT(reporter, SkToBool(width & height) != bm.empty());
152 SkBitmap bm;
153 bm.allocPixels(SkImageInfo::Make(1, 1, ct, kPremul_SkAlphaType));
154 bm.eraseColor(input);
155 INFOF(reporter, "expected: %x actual: %x\n", expected, bm.getColor(0, 0));
156 REPORTER_ASSERT(reporter, bm.getColor(0, 0) == expected);
186 SkBitmap bm;
187 REPORTER_ASSERT(r, !SkBitmap::ComputeIsOpaque(bm));
189 bm.allocPixels(SkImageInfo::Make(13, 17, type.fCT, type.fAT));
190 bm.eraseColor(SkColorSetARGB(255, 10, 20, 30));
191 REPORTER_ASSERT(r, SkBitmap::ComputeIsOpaque(bm));
193 bm.eraseColor(SkColorSetARGB(128, 255, 255, 255));
194 bool isOpaque = SkBitmap::ComputeIsOpaque(bm);
204 SkBitmap bm;
205 bm.allocPixels(SkImageInfo::Make(1, 1, kRGBA_F16_SkColorType, kPremul_SkAlphaType));
206 REPORTER_ASSERT(r, bm.peekPixels(&pm));