Lines Matching defs:bitmap
256 SkBitmap bitmap;
257 if (!bitmap.tryAllocPixels(info)) {
261 void* dst = bitmap.getPixels();
268 SkRectMemcpy(dst, bitmap.rowBytes(), src, fBitmap.rowBytes(), bitmap.rowBytes(),
271 bitmap.setImmutable();
272 return bitmap.asImage();
327 SkBitmap bitmap;
328 if (!bitmap.tryAllocPixels(ii)) {
332 if (!SkDecompress(std::move(data), { width, height }, type, &bitmap)) {
336 bitmap.setImmutable();
337 return MakeFromBitmap(bitmap);
377 bool SkImage_Raster::onAsLegacyBitmap(GrDirectContext*, SkBitmap* bitmap) const {
378 // When we're a snapshot from a surface, our bitmap may not be marked immutable
384 bitmap->setInfo(fBitmap.info(), fBitmap.rowBytes());
385 bitmap->setPixelRef(sk_ref_sp(fBitmap.pixelRef()), origin.x(), origin.y());
388 return this->INHERITED::onAsLegacyBitmap(nullptr, bitmap);
408 // TODO: If our bitmap is immutable, then we could theoretically create another image sharing
410 // gen ID from the bitmap, which gets it from the pixelRef.