Lines Matching defs:bitmap

215 SkBitmapDevice::SkBitmapDevice(const SkBitmap& bitmap)
216 : INHERITED(bitmap.info(), SkSurfaceProps())
217 , fBitmap(bitmap)
218 , fRCStack(bitmap.width(), bitmap.height())
220 bitmap.colorType(),
221 bitmap.colorSpace(),
223 SkASSERT(valid_for_bitmap_device(bitmap.info(), nullptr));
230 SkBitmapDevice::SkBitmapDevice(const SkBitmap& bitmap, const SkSurfaceProps& surfaceProps,
232 : INHERITED(bitmap.info(), surfaceProps)
233 , fBitmap(bitmap)
235 , fRCStack(bitmap.width(), bitmap.height())
237 bitmap.colorType(),
238 bitmap.colorSpace(),
240 SkASSERT(valid_for_bitmap_device(bitmap.info(), nullptr));
243 SkASSERT(coverage->width() == bitmap.width());
244 SkASSERT(coverage->height() == bitmap.height());
260 SkBitmap bitmap;
263 if (!bitmap.setInfo(info)) {
267 hndl = allocator->allocBitmap(info, &bitmap);
272 // If this bitmap is opaque, we don't have any sensible default color,
274 if (!bitmap.tryAllocPixels(info)) {
278 // This bitmap has transparency, so we'll zero the pixels (to transparent).
280 if (!bitmap.tryAllocPixelsFlags(info, SkBitmap::kZeroPixels_AllocFlag)) {
294 return new SkBitmapDevice(bitmap, surfaceProps, hndl, trackCoverage ? &coverage : nullptr);
400 void SkBitmapDevice::drawBitmap(const SkBitmap& bitmap, const SkMatrix& matrix,
406 matrix.mapRect(&storage, SkRect::MakeIWH(bitmap.width(), bitmap.height()));
413 LOOP_TILER(drawBitmap(bitmap, matrix, dstOrNull, sampling, paint), bounds)
431 SkBitmap bitmap;
434 if (!as_IB(image)->getROPixels(dContext, &bitmap)) {
441 bitmapBounds.setIWH(bitmap.width(), bitmap.height());
452 const SkBitmap* bitmapPtr = &bitmap;
454 // clip the tmpSrc to the bounds of the bitmap, and recompute dstRect if
473 // src is smaller than the bounds of the bitmap, and we are filtering, so we don't know
474 // how much more of the bitmap we need, so we can't use extractSubset or drawBitmap,
475 // but we must use a shader w/ dst bounds (which can access all of the bitmap needed).
481 // the bitmap, we extract a subset.
483 if (!bitmap.extractSubset(&tmpBitmap, srcIR)) {
608 sk_sp<SkSpecialImage> SkBitmapDevice::makeSpecial(const SkBitmap& bitmap) {
609 return SkSpecialImage::MakeFromRaster(bitmap.bounds(), bitmap, this->surfaceProps());