Lines Matching refs:bm
16 SkBitmap bm; in test_peekpixels() local
19 REPORTER_ASSERT(reporter, !bm.peekPixels(nullptr)); in test_peekpixels()
20 REPORTER_ASSERT(reporter, !bm.peekPixels(&pmap)); in test_peekpixels()
23 bm.setInfo(SkImageInfo::MakeN32Premul(10, 10)); in test_peekpixels()
24 REPORTER_ASSERT(reporter, !bm.peekPixels(nullptr)); in test_peekpixels()
25 REPORTER_ASSERT(reporter, !bm.peekPixels(&pmap)); in test_peekpixels()
28 bm.allocPixels(info); in test_peekpixels()
29 REPORTER_ASSERT(reporter, bm.peekPixels(nullptr)); in test_peekpixels()
30 REPORTER_ASSERT(reporter, bm.peekPixels(&pmap)); in test_peekpixels()
31 REPORTER_ASSERT(reporter, pmap.info() == bm.info()); in test_peekpixels()
32 REPORTER_ASSERT(reporter, pmap.addr() == bm.getPixels()); in test_peekpixels()
33 REPORTER_ASSERT(reporter, pmap.rowBytes() == bm.rowBytes()); in test_peekpixels()
34 REPORTER_ASSERT(reporter, pmap.ctable() == bm.getColorTable()); in test_peekpixels()
43 SkBitmap bm; in test_bigalloc() local
44 REPORTER_ASSERT(reporter, !bm.tryAllocPixels(info)); in test_bigalloc()
56 SkBitmap bm; in test_allocpixels() local
57 bm.setInfo(info); in test_allocpixels()
58 REPORTER_ASSERT(reporter, info.minRowBytes() == bm.rowBytes()); in test_allocpixels()
59 bm.allocPixels(); in test_allocpixels()
60 REPORTER_ASSERT(reporter, info.minRowBytes() == bm.rowBytes()); in test_allocpixels()
61 bm.reset(); in test_allocpixels()
62 bm.allocPixels(info); in test_allocpixels()
63 REPORTER_ASSERT(reporter, info.minRowBytes() == bm.rowBytes()); in test_allocpixels()
65 bm.setInfo(info, explicitRowBytes); in test_allocpixels()
66 REPORTER_ASSERT(reporter, explicitRowBytes == bm.rowBytes()); in test_allocpixels()
67 bm.allocPixels(); in test_allocpixels()
68 REPORTER_ASSERT(reporter, explicitRowBytes == bm.rowBytes()); in test_allocpixels()
69 bm.reset(); in test_allocpixels()
70 bm.allocPixels(info, explicitRowBytes); in test_allocpixels()
71 REPORTER_ASSERT(reporter, explicitRowBytes == bm.rowBytes()); in test_allocpixels()
73 bm.reset(); in test_allocpixels()
74 bm.setInfo(info, 0); in test_allocpixels()
75 REPORTER_ASSERT(reporter, info.minRowBytes() == bm.rowBytes()); in test_allocpixels()
76 bm.reset(); in test_allocpixels()
77 bm.allocPixels(info, 0); in test_allocpixels()
78 REPORTER_ASSERT(reporter, info.minRowBytes() == bm.rowBytes()); in test_allocpixels()
80 bm.reset(); in test_allocpixels()
81 bool success = bm.setInfo(info, info.minRowBytes() - 1); // invalid for 32bit in test_allocpixels()
83 REPORTER_ASSERT(reporter, bm.isNull()); in test_allocpixels()
87 SkBitmap bm; in test_bigwidth() local
91 REPORTER_ASSERT(reporter, bm.setInfo(info)); in test_bigwidth()
92 REPORTER_ASSERT(reporter, bm.setInfo(info.makeColorType(kRGB_565_SkColorType))); in test_bigwidth()
100 REPORTER_ASSERT(reporter, !bm.setInfo(info.makeColorType(kN32_SkColorType))); in test_bigwidth()
110 SkBitmap bm; in DEF_TEST() local
111 bool setConf = bm.setInfo(SkImageInfo::MakeN32Premul(width, height)); in DEF_TEST()
114 bm.allocPixels(); in DEF_TEST()
116 REPORTER_ASSERT(reporter, SkToBool(width & height) != bm.empty()); in DEF_TEST()
151 SkBitmap bm; in test_erasecolor_premul() local
152 bm.allocPixels(SkImageInfo::Make(1, 1, ct, kPremul_SkAlphaType)); in test_erasecolor_premul()
153 bm.eraseColor(input); in test_erasecolor_premul()
154 INFOF(reporter, "expected: %x actual: %x\n", expected, bm.getColor(0, 0)); in test_erasecolor_premul()
155 REPORTER_ASSERT(reporter, bm.getColor(0, 0) == expected); in test_erasecolor_premul()