Lines Matching full:a
4 * Permission is hereby granted, free of charge, to any person obtaining a copy
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
45 …tor()(const SwFill* fill, uint8_t* dst, uint32_t y, uint32_t x, uint32_t len, SwMask op, uint8_t a) in operator ()()
47 fillLinear(fill, dst, y, x, len, op, a); in operator ()()
50 …Fill* fill, uint8_t* dst, uint32_t y, uint32_t x, uint32_t len, uint8_t* cmp, SwMask op, uint8_t a) in operator ()()
52 fillLinear(fill, dst, y, x, len, cmp, op, a); in operator ()()
55 …)(const SwFill* fill, uint32_t* dst, uint32_t y, uint32_t x, uint32_t len, SwBlender op, uint8_t a) in operator ()()
57 fillLinear(fill, dst, y, x, len, op, a); in operator ()()
65 … fill, uint32_t* dst, uint32_t y, uint32_t x, uint32_t len, SwBlender op, SwBlender op2, uint8_t a) in operator ()()
67 fillLinear(fill, dst, y, x, len, op, op2, a); in operator ()()
74 …tor()(const SwFill* fill, uint8_t* dst, uint32_t y, uint32_t x, uint32_t len, SwMask op, uint8_t a) in operator ()()
76 fillRadial(fill, dst, y, x, len, op, a); in operator ()()
79 …Fill* fill, uint8_t* dst, uint32_t y, uint32_t x, uint32_t len, uint8_t* cmp, SwMask op, uint8_t a) in operator ()()
81 fillRadial(fill, dst, y, x, len, cmp, op, a); in operator ()()
84 …)(const SwFill* fill, uint32_t* dst, uint32_t y, uint32_t x, uint32_t len, SwBlender op, uint8_t a) in operator ()()
86 fillRadial(fill, dst, y, x, len, op, a); in operator ()()
94 … fill, uint32_t* dst, uint32_t y, uint32_t x, uint32_t len, SwBlender op, SwBlender op2, uint8_t a) in operator ()()
96 fillRadial(fill, dst, y, x, len, op, op2, a); in operator ()()
101 static inline uint8_t _alpha(uint8_t* a) in _alpha() argument
103 return *a; in _alpha()
107 static inline uint8_t _ialpha(uint8_t* a) in _ialpha() argument
109 return ~(*a); in _ialpha()
139 static inline uint32_t _abgrJoin(uint8_t r, uint8_t g, uint8_t b, uint8_t a) in _abgrJoin() argument
141 return (a << 24 | b << 16 | g << 8 | r); in _abgrJoin()
145 static inline uint32_t _argbJoin(uint8_t r, uint8_t g, uint8_t b, uint8_t a) in _argbJoin() argument
147 return (a << 24 | r << 16 | g << 8 | b); in _argbJoin()
171 static inline uint8_t _opMaskNone(uint8_t s, TVG_UNUSED uint8_t d, TVG_UNUSED uint8_t a) in _opMaskNone() argument
176 static inline uint8_t _opMaskAdd(uint8_t s, uint8_t d, uint8_t a) in _opMaskAdd() argument
178 return s + MULTIPLY(d, a); in _opMaskAdd()
182 static inline uint8_t _opMaskSubtract(uint8_t s, uint8_t d, TVG_UNUSED uint8_t a) in _opMaskSubtract() argument
188 static inline uint8_t _opMaskIntersect(uint8_t s, uint8_t d, TVG_UNUSED uint8_t a) in _opMaskIntersect() argument
194 static inline uint8_t _opMaskDifference(uint8_t s, uint8_t d, uint8_t a) in _opMaskDifference() argument
196 return MULTIPLY(s, 255 - d) + MULTIPLY(d, a); in _opMaskDifference()
200 static inline uint8_t _opMaskLighten(uint8_t s, uint8_t d, uint8_t a) in _opMaskLighten() argument
206 static inline uint8_t _opMaskDarken(uint8_t s, uint8_t d, uint8_t a) in _opMaskDarken() argument
308 c[0] += A(*p); in _interpDownScaler()
330 …wSurface* surface, const SwBBox& region, SwMask maskOp, uint8_t r, uint8_t g, uint8_t b, uint8_t a) in _rasterCompositeMaskedRect() argument
336 auto ialpha = 255 - a; in _rasterCompositeMaskedRect()
341 *cmp = maskOp(a, *cmp, ialpha); in _rasterCompositeMaskedRect()
349 …wSurface* surface, const SwBBox& region, SwMask maskOp, uint8_t r, uint8_t g, uint8_t b, uint8_t a) in _rasterDirectMaskedRect() argument
360 auto tmp = maskOp(a, *cmp, 0); //not use alpha. in _rasterDirectMaskedRect()
370 …terMaskedRect(SwSurface* surface, const SwBBox& region, uint8_t r, uint8_t g, uint8_t b, uint8_t a) in _rasterMaskedRect() argument
378 …(surface->compositor->method)) return _rasterDirectMaskedRect(surface, region, maskOp, r, g, b, a); in _rasterMaskedRect()
379 else return _rasterCompositeMaskedRect(surface, region, maskOp, r, g, b, a); in _rasterMaskedRect()
384 …terMattedRect(SwSurface* surface, const SwBBox& region, uint8_t r, uint8_t g, uint8_t b, uint8_t a) in _rasterMattedRect() argument
396 auto color = surface->join(r, g, b, a); in _rasterMattedRect()
413 *dst = INTERPOLATE8(a, *dst, alpha(cmp)); in _rasterMattedRect()
421 …rBlendingRect(SwSurface* surface, const SwBBox& region, uint8_t r, uint8_t g, uint8_t b, uint8_t a) in _rasterBlendingRect() argument
427 auto color = surface->join(r, g, b, a); in _rasterBlendingRect()
440 …anslucentRect(SwSurface* surface, const SwBBox& region, uint8_t r, uint8_t g, uint8_t b, uint8_t a) in _rasterTranslucentRect() argument
443 return avxRasterTranslucentRect(surface, region, r, g, b, a); in _rasterTranslucentRect()
445 return neonRasterTranslucentRect(surface, region, r, g, b, a); in _rasterTranslucentRect()
447 return cRasterTranslucentRect(surface, region, r, g, b, a); in _rasterTranslucentRect()
477 …l _rasterRect(SwSurface* surface, const SwBBox& region, uint8_t r, uint8_t g, uint8_t b, uint8_t a) in _rasterRect() argument
480 if (_matting(surface)) return _rasterMattedRect(surface, region, r, g, b, a); in _rasterRect()
481 else return _rasterMaskedRect(surface, region, r, g, b, a); in _rasterRect()
483 return _rasterBlendingRect(surface, region, r, g, b, a); in _rasterRect()
485 if (a == 255) return _rasterSolidRect(surface, region, r, g, b); in _rasterRect()
486 else return _rasterTranslucentRect(surface, region, r, g, b, a); in _rasterRect()
496 …askedRle(SwSurface* surface, SwRle* rle, SwMask maskOp, uint8_t r, uint8_t g, uint8_t b, uint8_t a) in _rasterCompositeMaskedRle() argument
505 if (span->coverage == 255) src = a; in _rasterCompositeMaskedRle()
506 else src = MULTIPLY(a, span->coverage); in _rasterCompositeMaskedRle()
516 …askedRle(SwSurface* surface, SwRle* rle, SwMask maskOp, uint8_t r, uint8_t g, uint8_t b, uint8_t a) in _rasterDirectMaskedRle() argument
526 if (span->coverage == 255) src = a; in _rasterDirectMaskedRle()
527 else src = MULTIPLY(a, span->coverage); in _rasterDirectMaskedRle()
537 …c bool _rasterMaskedRle(SwSurface* surface, SwRle* rle, uint8_t r, uint8_t g, uint8_t b, uint8_t a) in _rasterMaskedRle() argument
545 …rect(surface->compositor->method)) return _rasterDirectMaskedRle(surface, rle, maskOp, r, g, b, a); in _rasterMaskedRle()
546 else return _rasterCompositeMaskedRle(surface, rle, maskOp, r, g, b, a); in _rasterMaskedRle()
551 …c bool _rasterMattedRle(SwSurface* surface, SwRle* rle, uint8_t r, uint8_t g, uint8_t b, uint8_t a) in _rasterMattedRle() argument
563 auto color = surface->join(r, g, b, a); in _rasterMattedRle()
580 if (span->coverage == 255) src = a; in _rasterMattedRle()
581 else src = MULTIPLY(a, span->coverage); in _rasterMattedRle()
591 …rasterBlendingRle(SwSurface* surface, const SwRle* rle, uint8_t r, uint8_t g, uint8_t b, uint8_t a) in _rasterBlendingRle() argument
596 auto color = surface->join(r, g, b, a); in _rasterBlendingRle()
615 …terTranslucentRle(SwSurface* surface, const SwRle* rle, uint8_t r, uint8_t g, uint8_t b, uint8_t a) in _rasterTranslucentRle() argument
618 return avxRasterTranslucentRle(surface, rle, r, g, b, a); in _rasterTranslucentRle()
620 return neonRasterTranslucentRle(surface, rle, r, g, b, a); in _rasterTranslucentRle()
622 return cRasterTranslucentRle(surface, rle, r, g, b, a); in _rasterTranslucentRle()
664 static bool _rasterRle(SwSurface* surface, SwRle* rle, uint8_t r, uint8_t g, uint8_t b, uint8_t a) in _rasterRle() argument
669 if (_matting(surface)) return _rasterMattedRle(surface, rle, r, g, b, a); in _rasterRle()
670 else return _rasterMaskedRle(surface, rle, r, g, b, a); in _rasterRle()
672 return _rasterBlendingRle(surface, rle, r, g, b, a); in _rasterRle()
674 if (a == 255) return _rasterSolidRle(surface, rle, r, g, b); in _rasterRle()
675 else return _rasterTranslucentRle(surface, rle, r, g, b, a); in _rasterRle()
722 auto a = MULTIPLY(span->coverage, opacity); in _rasterScaledMattedRleImage() local
726 src = ALPHA_BLEND(src, (a == 255) ? alpha(cmp) : MULTIPLY(alpha(cmp), a)); in _rasterScaledMattedRleImage()
750 *dst = INTERPOLATE(tmp, *dst, A(src)); in _rasterScaledBlendingRleImage()
757 *dst = INTERPOLATE(tmp, *dst, MULTIPLY(alpha, A(src))); in _rasterScaledBlendingRleImage()
827 auto a = MULTIPLY(span->coverage, opacity); in _rasterDirectMattedRleImage() local
828 if (a == 255) { in _rasterDirectMattedRleImage()
835 auto tmp = ALPHA_BLEND(*img, MULTIPLY(a, alpha(cmp))); in _rasterDirectMattedRleImage()
859 *dst = INTERPOLATE(tmp, *dst, MULTIPLY(alpha, A(*img))); in _rasterDirectBlendingRleImage()
981 *dst = INTERPOLATE(tmp, *dst, MULTIPLY(opacity, A(src))); in _rasterScaledBlendingImage()
1015 *dst = MULTIPLY(A(src), opacity); in _rasterScaledImage()
1094 auto tmp = MULTIPLY(A(*src), alpha(cmp)); in _rasterDirectMattedImage()
1099 auto tmp = MULTIPLY(A(*src), MULTIPLY(opacity, alpha(cmp))); in _rasterDirectMattedImage()
1128 *dst = INTERPOLATE(tmp, *dst, A(*src)); in _rasterDirectBlendingImage()
1133 *dst = INTERPOLATE(tmp, *dst, MULTIPLY(opacity, A(*src))); in _rasterDirectBlendingImage()
1180 *dst = INTERPOLATE8(A(*src), *dst, opacity); in _rasterDirectImage()
1211 *dst = INTERPOLATE(surface->blender(tmp, *dst, 255), *dst, A(tmp)); in _rasterDirectMattedBlendingImage()
1216 … *dst = INTERPOLATE(surface->blender(tmp, *dst, 255), *dst, MULTIPLY(opacity, A(tmp))); in _rasterDirectMattedBlendingImage()
1692 uint8_t a = buffer[x] >> 24; in rasterUnpremultiply() local
1693 if (a == 255) { in rasterUnpremultiply()
1695 } else if (a == 0) { in rasterUnpremultiply()
1698 uint16_t r = ((buffer[x] >> 8) & 0xff00) / a; in rasterUnpremultiply()
1699 uint16_t g = ((buffer[x]) & 0xff00) / a; in rasterUnpremultiply()
1700 uint16_t b = ((buffer[x] << 8) & 0xff00) / a; in rasterUnpremultiply()
1704 buffer[x] = (a << 24) | (r << 16) | (g << 8) | (b); in rasterUnpremultiply()
1726 auto a = (c >> 24); in rasterPremultiply() local
1727 …*dst = (c & 0xff000000) + ((((c >> 8) & 0xff) * a) & 0xff00) + ((((c & 0x00ff00ff) * a) >> 8) & 0x… in rasterPremultiply()
1738 auto a = MULTIPLY(color->a, opacity); in rasterGradientShape() local
1739 return a > 0 ? rasterShape(surface, shape, color->r, color->g, color->b, a) : true; in rasterGradientShape()
1759 auto a = MULTIPLY(color->a, opacity); in rasterGradientStroke() local
1760 return a > 0 ? rasterStroke(surface, shape, color->r, color->g, color->b, a) : true; in rasterGradientStroke()
1771 bool rasterShape(SwSurface* surface, SwShape* shape, uint8_t r, uint8_t g, uint8_t b, uint8_t a) in rasterShape() argument
1773 if (a < 255) { in rasterShape()
1774 r = MULTIPLY(r, a); in rasterShape()
1775 g = MULTIPLY(g, a); in rasterShape()
1776 b = MULTIPLY(b, a); in rasterShape()
1778 if (shape->fastTrack) return _rasterRect(surface, shape->bbox, r, g, b, a); in rasterShape()
1779 else return _rasterRle(surface, shape->rle, r, g, b, a); in rasterShape()
1783 bool rasterStroke(SwSurface* surface, SwShape* shape, uint8_t r, uint8_t g, uint8_t b, uint8_t a) in rasterStroke() argument
1785 if (a < 255) { in rasterStroke()
1786 r = MULTIPLY(r, a); in rasterStroke()
1787 g = MULTIPLY(g, a); in rasterStroke()
1788 b = MULTIPLY(b, a); in rasterStroke()
1791 return _rasterRle(surface, shape->strokeRle, r, g, b, a); in rasterStroke()