Lines Matching refs:bm
58 SkBitmap bm;
59 bool imageDecodeSuccess = decode_memory(data, size, &bm);
61 REPORTER_ASSERT(r, bm.width() == 1);
62 REPORTER_ASSERT(r, bm.height() == 1);
63 REPORTER_ASSERT(r, !(bm.empty()));
64 if (!(bm.empty())) {
65 REPORTER_ASSERT(r, bm.getColor(0, 0) == 0x00000000);
69 SkBitmap bm;
70 bool imageDecodeSuccess = decode_memory(data, size, &bm);
72 REPORTER_ASSERT(r, bm.width() == 3);
73 REPORTER_ASSERT(r, bm.height() == 3);
74 REPORTER_ASSERT(r, !(bm.empty()));
75 if (!(bm.empty())) {
76 REPORTER_ASSERT(r, bm.getColor(0, 0) == 0xffff0000);
77 REPORTER_ASSERT(r, bm.getColor(1, 0) == 0xffffff00);
78 REPORTER_ASSERT(r, bm.getColor(2, 0) == 0xff00ffff);
79 REPORTER_ASSERT(r, bm.getColor(0, 1) == 0xff808080);
80 REPORTER_ASSERT(r, bm.getColor(1, 1) == 0xff000000);
81 REPORTER_ASSERT(r, bm.getColor(2, 1) == 0xff00ff00);
82 REPORTER_ASSERT(r, bm.getColor(0, 2) == 0xffffffff);
83 REPORTER_ASSERT(r, bm.getColor(1, 2) == 0xffff00ff);
84 REPORTER_ASSERT(r, bm.getColor(2, 2) == 0xff0000ff);
89 SkBitmap bm;
90 bool imageDecodeSuccess = decode_memory(data, size, &bm);
92 REPORTER_ASSERT(r, bm.width() == width);
93 REPORTER_ASSERT(r, bm.height() == height);
94 REPORTER_ASSERT(r, !(bm.empty()));
99 SkBitmap bm;
100 bool imageDecodeSuccess = decode_memory(data, size, &bm);
102 REPORTER_ASSERT(r, bm.width() == 9);
103 REPORTER_ASSERT(r, bm.height() == 9);
104 REPORTER_ASSERT(r, !(bm.empty()));
105 if (!(bm.empty())) {
106 REPORTER_ASSERT(r, bm.getColor(0, 0) == 0xffff0000);
107 REPORTER_ASSERT(r, bm.getColor(1, 0) == 0xffffff00);
108 REPORTER_ASSERT(r, bm.getColor(2, 0) == 0xff00ffff);
110 REPORTER_ASSERT(r, bm.getColor(0, 2) == 0xffffffff);
111 REPORTER_ASSERT(r, bm.getColor(1, 2) == 0xffff00ff);
112 REPORTER_ASSERT(r, bm.getColor(2, 2) == 0xff0000ff);
114 REPORTER_ASSERT(r, bm.getColor(0, 4) == 0xff808080);
115 REPORTER_ASSERT(r, bm.getColor(1, 4) == 0xff000000);
116 REPORTER_ASSERT(r, bm.getColor(2, 4) == 0xff00ff00);
118 REPORTER_ASSERT(r, bm.getColor(0, 6) == 0xffff0000);
119 REPORTER_ASSERT(r, bm.getColor(1, 6) == 0xffffff00);
120 REPORTER_ASSERT(r, bm.getColor(2, 6) == 0xff00ffff);
122 REPORTER_ASSERT(r, bm.getColor(0, 8) == 0xffffffff);
123 REPORTER_ASSERT(r, bm.getColor(1, 8) == 0xffff00ff);
124 REPORTER_ASSERT(r, bm.getColor(2, 8) == 0xff0000ff);
131 SkBitmap bm;
132 bool imageDecodeSuccess = decode_memory(data, size, &bm);
134 REPORTER_ASSERT(r, bm.width() == 3);
135 REPORTER_ASSERT(r, bm.height() == 3);
136 REPORTER_ASSERT(r, !(bm.empty()));
137 if (!(bm.empty())) {
138 REPORTER_ASSERT(r, bm.getColor(0, 0) == 0xffff0000);
139 REPORTER_ASSERT(r, bm.getColor(1, 0) == 0xffffff00);
140 REPORTER_ASSERT(r, bm.getColor(2, 0) == 0xff00ffff);
141 REPORTER_ASSERT(r, bm.getColor(0, 1) == 0xff808080);
142 REPORTER_ASSERT(r, bm.getColor(1, 1) == 0xff000000);
143 REPORTER_ASSERT(r, bm.getColor(2, 1) == 0xff00ff00);
217 SkBitmap bm;
218 bm.allocPixels(info);
220 info, bm.getPixels(), bm.rowBytes()));
222 REPORTER_ASSERT(reporter, bm.width() == 1);
223 REPORTER_ASSERT(reporter, bm.height() == 1);
224 REPORTER_ASSERT(reporter, !(bm.empty()));
225 if (!(bm.empty())) {
226 REPORTER_ASSERT(reporter, bm.getColor(0, 0) == 0x00000000);
267 SkBitmap bm;
268 bool imageDecodeSuccess = decode_memory(data, sizeof(data), &bm);
270 REPORTER_ASSERT(r, bm.width() == 9);
271 REPORTER_ASSERT(r, bm.height() == 9);
284 REPORTER_ASSERT(r, bm.getColor(0, 7) != 0);
305 SkBitmap bm;
306 bm.allocPixels(codec->getInfo());
307 const SkCodec::Result result = codec->getAndroidPixels(codec->getInfo(), bm.getPixels(),
308 bm.rowBytes(), &options);
450 SkBitmap bm;
451 if (!bm.tryAllocPixels(SkImageInfo::MakeN32Premul(200, 55))) {
456 bm.eraseColor(SK_ColorTRANSPARENT);
458 SkCanvas canvas(bm);
463 SkColor actual = SkUnPreMultiply::PMColorToColor(*bm.getAddr32(i, j));
489 SkBitmap bm;
490 bm.allocPixels(codec->getInfo());
491 auto result = codec->getPixels(bm.pixmap());
506 auto actual = bm.getColor(pixel.x, pixel.y);
540 SkBitmap bm;
541 bm.allocPixels(use565 ? info.makeColorType(kRGB_565_SkColorType) : info);
547 auto result = codec->getPixels(bm.pixmap(), &options);
594 auto actual = bm.getColor(x, y);
631 SkBitmap bm;
632 bm.allocPixels(info);
642 REPORTER_ASSERT(r, SkCodec::kSuccess == codec->getPixels(bm.pixmap(), &options));
644 REPORTER_ASSERT(r, bm.getColor(0, 0) == SK_ColorRED);