Lines Matching defs:mask

136  * Expands fDeviceGamma, fPaintGamma, fContrast, and fLumBits into a mask pre-blend.
201 // If we are going to create the mask, then we cannot keep the color
245 SkMask src = glyph.mask(),
278 static void applyLUTToA8Mask(const SkMask& mask, const uint8_t* lut) {
279 uint8_t* SK_RESTRICT dst = (uint8_t*)mask.fImage;
280 unsigned rowBytes = mask.fRowBytes;
282 for (int y = mask.fBounds.height() - 1; y >= 0; --y) {
283 for (int x = mask.fBounds.width() - 1; x >= 0; --x) {
422 static void packA8ToA1(const SkMask& mask, const uint8_t* src, size_t srcRB) {
423 const int height = mask.fBounds.height();
424 const int width = mask.fBounds.width();
428 uint8_t* dst = mask.fImage;
429 const int dstPad = mask.fRowBytes - SkAlign8(width)/8;
454 static void generateMask(const SkMask& mask, const SkPath& path,
458 SkASSERT(mask.fFormat == SkMask::kBW_Format ||
459 mask.fFormat == SkMask::kA8_Format ||
460 mask.fFormat == SkMask::kLCD16_Format);
466 int srcW = mask.fBounds.width();
467 int srcH = mask.fBounds.height();
472 matrix.setTranslate(-SkIntToScalar(mask.fBounds.fLeft),
473 -SkIntToScalar(mask.fBounds.fTop));
476 paint.setAntiAlias(SkMask::kBW_Format != mask.fFormat);
478 const bool fromLCD = (mask.fFormat == SkMask::kLCD16_Format) ||
479 (mask.fFormat == SkMask::kA8_Format && a8FromLCD);
480 const bool intermediateDst = fromLCD || mask.fFormat == SkMask::kBW_Format;
485 matrix.setAll(0, 4, -SkIntToScalar(mask.fBounds.fTop + 1) * 4,
486 1, 0, -SkIntToScalar(mask.fBounds.fLeft),
490 matrix.setAll(4, 0, -SkIntToScalar(mask.fBounds.fLeft + 1) * 4,
491 0, 1, -SkIntToScalar(mask.fBounds.fTop),
515 // can't allocate offscreen, so empty the mask and return
516 sk_bzero(mask.fImage, mask.computeImageSize());
520 dst.reset(info, mask.fImage, mask.fRowBytes);
531 switch (mask.fFormat) {
533 packA8ToA1(mask, dst.addr8(0, 0), dst.rowBytes());
537 pack4xHToMask(dst, mask, maskPreBlend, doBGR, doVert);
539 applyLUTToA8Mask(mask, maskPreBlend.fG);
543 pack4xHToMask(dst, mask, maskPreBlend, doBGR, doVert);
552 // in case we need to call generateImage on a mask-format that is different
562 // Use the origGlyph storage for the temporary unfiltered mask if it will fit.
578 SkMask mask = unfilteredGlyph->mask();
585 SkASSERT(SkMask::kARGB32_Format != mask.fFormat);
589 generateMask(mask, devPath, fPreBlend, doBGR, doVert, a8LCD, hairline);
594 // k3D_Format should not be mask filtered.
602 if (as_MFB(fMaskFilter)->filterMask(&filteredMask, unfilteredGlyph->mask(), m, nullptr)) {
606 // Filter did nothing; unfiltered mask is independent of origGlyph.fImage.
607 srcMask = unfilteredGlyph->mask();
609 // Filter did nothing; the unfiltered mask is in origGlyph.fImage and matches.
612 // Filter did nothing; the unfiltered mask is in origGlyph.fImage and conflicts.
613 srcMask = unfilteredGlyph->mask();
621 SkMask dstMask = origGlyph.mask();
1013 const SkMatrix::TypeMask mask = deviceMatrix.getType();
1014 if (mask & SkMatrix::kScale_Mask) {
1021 if (mask & SkMatrix::kAffine_Mask) {