Lines Matching refs:bm
86 static std::unique_ptr<SkBitmap> prepare_for_image_ref(const SkBitmap& bm,
90 if (!get_bitmap_info(bm.colorType(), bm.alphaType(), bitsPerComponent, info, &upscaleTo32)) {
97 copy->allocPixels(bm.info().makeColorType(kRGBA_8888_SkColorType));
98 bm.readPixels(copy->info(), copy->getPixels(), copy->rowBytes(), 0, 0);
101 return std::make_unique<SkBitmap>(bm);
104 CGImageRef SkCreateCGImageRefWithColorspace(const SkBitmap& bm,
106 if (bm.drawsNothing()) {
112 std::unique_ptr<SkBitmap> bitmap = prepare_for_image_ref(bm, &bitsPerComponent, &info);
136 void SkCGDrawBitmap(CGContextRef cg, const SkBitmap& bm, float x, float y) {
137 SkUniqueCFRef<CGImageRef> img(SkCreateCGImageRef(bm));
140 CGRect r = CGRectMake(0, 0, bm.width(), bm.height());
244 SkBitmap bm;
245 if (!SkCreateBitmapFromCGImage(&bm, src)) {
249 bm.setImmutable();
250 return bm.asImage();