Lines Matching refs:bm
43 SkBitmap bm; in image_compute_is_opaque() local
44 image_get_ro_pixels(image, &bm); in image_compute_is_opaque()
45 return SkBitmap::ComputeIsOpaque(bm); in image_compute_is_opaque()
113 static void get_neighbor_avg_color(const SkBitmap& bm, in get_neighbor_avg_color() argument
121 int ymax = SkTMin(yOrig + 1, bm.height() - 1); in get_neighbor_avg_color()
123 int xmax = SkTMin(xOrig + 1, bm.width() - 1); in get_neighbor_avg_color()
125 uint32_t* scanline = bm.getAddr32(0, y); in get_neighbor_avg_color()
143 static size_t pixel_count(const SkBitmap& bm) { in pixel_count() argument
144 return SkToSizeT(bm.width()) * SkToSizeT(bm.height()); in pixel_count()
183 const SkBitmap& bm = not4444(bitmap, ©); in bitmap_to_pdf_pixels() local
184 SkAutoLockPixels autoLockPixels(bm); in bitmap_to_pdf_pixels()
185 SkColorType colorType = bm.colorType(); in bitmap_to_pdf_pixels()
190 SkAutoTMalloc<uint8_t> scanline(3 * bm.width()); in bitmap_to_pdf_pixels()
191 for (int y = 0; y < bm.height(); ++y) { in bitmap_to_pdf_pixels()
192 const uint32_t* src = bm.getAddr32(0, y); in bitmap_to_pdf_pixels()
194 for (int x = 0; x < bm.width(); ++x) { in bitmap_to_pdf_pixels()
200 get_neighbor_avg_color(bm, x, y, dst, colorType); in bitmap_to_pdf_pixels()
204 out->write(scanline.get(), 3 * bm.width()); in bitmap_to_pdf_pixels()
210 SkAutoTMalloc<uint8_t> scanline(3 * bm.width()); in bitmap_to_pdf_pixels()
211 for (int y = 0; y < bm.height(); ++y) { in bitmap_to_pdf_pixels()
212 const uint16_t* src = bm.getAddr16(0, y); in bitmap_to_pdf_pixels()
214 for (int x = 0; x < bm.width(); ++x) { in bitmap_to_pdf_pixels()
220 out->write(scanline.get(), 3 * bm.width()); in bitmap_to_pdf_pixels()
226 fill_stream(out, '\x00', pixel_count(bm)); in bitmap_to_pdf_pixels()
232 for (int y = 0; y < bm.height(); ++y) { in bitmap_to_pdf_pixels()
233 out->write(bm.getAddr8(0, y), bm.width()); in bitmap_to_pdf_pixels()
251 const SkBitmap& bm = not4444(bitmap, ©); in bitmap_alpha_to_a8() local
252 SkAutoLockPixels autoLockPixels(bm); in bitmap_alpha_to_a8()
253 SkColorType colorType = bm.colorType(); in bitmap_alpha_to_a8()
257 SkAutoTMalloc<uint8_t> scanline(bm.width()); in bitmap_alpha_to_a8()
258 for (int y = 0; y < bm.height(); ++y) { in bitmap_alpha_to_a8()
260 const SkPMColor* src = bm.getAddr32(0, y); in bitmap_alpha_to_a8()
261 for (int x = 0; x < bm.width(); ++x) { in bitmap_alpha_to_a8()
264 out->write(scanline.get(), bm.width()); in bitmap_alpha_to_a8()
269 for (int y = 0; y < bm.height(); ++y) { in bitmap_alpha_to_a8()
270 out->write(bm.getAddr8(0, y), bm.width()); in bitmap_alpha_to_a8()
274 SkColorTable* ct = bm.getColorTable(); in bitmap_alpha_to_a8()
276 SkAutoTMalloc<uint8_t> scanline(bm.width()); in bitmap_alpha_to_a8()
277 for (int y = 0; y < bm.height(); ++y) { in bitmap_alpha_to_a8()
279 const uint8_t* src = bm.getAddr8(0, y); in bitmap_alpha_to_a8()
280 for (int x = 0; x < bm.width(); ++x) { in bitmap_alpha_to_a8()
283 out->write(scanline.get(), bm.width()); in bitmap_alpha_to_a8()
492 SkBitmap bm; in SkPDFCreateBitmapObject() local
494 if (as_IB(image)->getROPixels(&bm) && bm.requestLock(&apu)) { in SkPDFCreateBitmapObject()