Lines Matching defs:bitmap
132 static void fill_dst_bmp_with_init_data(SkBitmap* bitmap) {
133 SkASSERT(bitmap->lockPixelsAreWritable());
134 SkAutoLockPixels alp(*bitmap);
135 int w = bitmap->width();
136 int h = bitmap->height();
137 intptr_t pixels = reinterpret_cast<intptr_t>(bitmap->getPixels());
140 SkPMColor* pixel = reinterpret_cast<SkPMColor*>(pixels + y * bitmap->rowBytes() + x * bitmap->bytesPerPixel());
166 // checks the bitmap contains correct pixels after the readPixels
167 // if the bitmap was prefilled with pixels it checks that these weren't
170 const SkBitmap& bitmap,
174 SkASSERT(4 == bitmap.bytesPerPixel());
175 SkASSERT(!bitmap.isNull());
178 const SkColorType ct = bitmap.colorType();
179 const SkAlphaType at = bitmap.alphaType();
181 int bw = bitmap.width();
182 int bh = bitmap.height();
189 SkAutoLockPixels alp(bitmap);
195 const uint32_t* pixel = bitmap.getAddr32(bx, by);
243 static void init_bitmap(SkBitmap* bitmap, const SkIRect& rect, BitmapInit init, SkColorType ct,
265 bitmap->allocPixels(info, rowBytes);
267 bitmap->setInfo(info, rowBytes);
339 // if the bitmap has pixels allocated before the readPixels,
362 // failed then our bitmap should still not have pixels
367 // bitmap size
418 // if the bitmap has pixels allocated before the readPixels,
570 * Test two different ways to turn a subset of a bitmap into a texture
580 SkBitmap bitmap;
581 make_ringed_bitmap(&bitmap, 6, 6);
588 SkAutoTUnref<GrTexture> fullTx(GrRefCachedBitmapTexture(context, bitmap,
591 GrWrapTextureInBitmap(fullTx, bitmap.width(), bitmap.height(), true, &tx_full);
594 // ... one from a bitmap-subset
596 bitmap.extractSubset(&tmp_subset, subset);