Lines Matching defs:mask
102 // This function destroys the mask and either frees or takes the pixels.
103 sk_sp<SkImage> mask_to_greyscale_image(SkMask* mask) {
105 SkPixmap pm(SkImageInfo::Make(mask->fBounds.width(), mask->fBounds.height(),
107 mask->fImage, mask->fRowBytes);
117 SkMask::FreeImage(mask->fImage);
125 *mask = SkMask(); // destructive;
129 sk_sp<SkImage> alpha_image_to_greyscale_image(const SkImage* mask) {
130 int w = mask->width(), h = mask->height();
134 if (!mask->readPixels(nullptr, SkImageInfo::MakeA8(w, h),
519 sk_sp<SkImage> mask = mask_to_greyscale_image(&dstMask);
521 // Must mask with a Form XObject.
525 canvas.drawImage(mask, dstMaskBounds.x(), dstMaskBounds.y());
547 // The no-softmask graphic state is used to "turn off" the mask for later draw calls.
1516 sk_sp<SkImage> mask = alpha_image_to_greyscale_image(imageSubset.image().get());
1517 if (!mask) {
1521 // Must mask with a Form XObject.
1525 // This clip prevents the mask image shader from covering
1531 tmpPaint.setShader(mask->makeShader(SkSamplingOptions(), transform));
1539 canvas.drawImage(mask, 0, 0);