Lines Matching defs:image
109 static void draw_image(GrDirectContext* dContext, SkCanvas* canvas, SkImage* image,
112 size_t rowBytes = image->width() * SkColorTypeBytesPerPixel(dstColorType);
113 sk_sp<SkData> data = SkData::MakeUninitialized(rowBytes * image->height());
114 SkImageInfo dstInfo = SkImageInfo::Make(image->width(), image->height(), dstColorType,
116 if (!image->readPixels(dContext, dstInfo, data->writable_data(), rowBytes, 0, 0, hint)) {
117 memset(data->writable_data(), 0, rowBytes * image->height());
120 // Now that we have called readPixels(), dump the raw pixels into an srgb image.
158 sk_sp<SkImage> image = make_raster_image(srcColorType);
159 if (!image) {
164 image = image->makeTextureImage(dContext);
166 if (image) {
169 draw_image(dContext, canvas, image.get(), dstColorType, dstAlphaType,
224 sk_sp<SkImage> image = make_codec_image();
230 draw_image(nullptr, canvas, image.get(), dstColorType, dstAlphaType,
291 for (const sk_sp<SkImage>& image : images) {
297 draw_image(nullptr, canvas, image.get(), dstColorType, dstAlphaType,