31 const int16_t runs[]) {
63 const size_t dstRB = fDevice.
rowBytes();
72 const size_t dstRB = fDevice.
rowBytes();
93 const size_t dstRB = fDevice.
rowBytes();
104static inline uint8_t
div255(
unsigned prod) {
106 return (prod + 128) * 257 >> 16;
109static inline unsigned u8_lerp(uint8_t
a, uint8_t
b, uint8_t t) {
110 return div255((255 - t) *
a + t *
b);
119 for (
int i = 0;
i <
N; ++
i) {
125template <
typename Mode>
129 for (
int i = 0;
i <
N; ++
i) {
133 for (
int i = 0;
i <
N; ++
i) {
140#define WRAP_BLIT(proc, canFoldAA) \
142 [](uint8_t dst[], uint8_t src, int N) \
143 { A8_row_bw(dst, src, N, proc); }, \
144 [](uint8_t dst[], uint8_t src, int N, uint8_t aa) \
145 { A8_row_aa(dst, src, N, aa, proc, canFoldAA); }
161 if (pair.mode == bm) {
172 void blitAntiH(
int x,
int y,
const SkAlpha antialias[],
const int16_t runs[])
override;
196 fOneProc = pair->oneProc;
197 fBWProc = pair->bwProc;
198 fAAProc = pair->aaProc;
199 fSrc =
paint.getAlpha();
213 if (antialias[0] == 0xFF) {
215 }
else if (antialias[0] != 0) {
234 const size_t dstRB = fDevice.
rowBytes();
241 }
else if (aa != 0) {
243 fAAProc(
device, fSrc, 1, aa);
251 const size_t dstRB = fDevice.
rowBytes();
273 const size_t dstRB = fDevice.
rowBytes();
296 if (
paint.getShader() ||
paint.getColorFilter()) {
@ kSrcOver
r = s + (1-sa)*d
constexpr A8_RowBlitBWPair gA8_RowBlitPairs[]
static uint8_t srcover_p(uint8_t src, uint8_t dst)
void(*)(uint8_t[], uint8_t, int, uint8_t aa) A8_RowBlitAA
void A8_row_bw(uint8_t dst[], uint8_t src, int N, Mode proc)
#define WRAP_BLIT(proc, canFoldAA)
void A8_row_aa(uint8_t dst[], uint8_t src, int N, uint8_t aa, Mode proc, const bool canFoldAA)
uint8_t(*)(uint8_t src, uint8_t dst) AlphaProc
static uint8_t div255(unsigned prod)
static const A8_RowBlitBWPair * find_a8_rowproc_pair(SkBlendMode bm)
void(*)(uint8_t[], uint8_t, int) A8_RowBlitBW
static unsigned u8_lerp(uint8_t a, uint8_t b, uint8_t t)
SkBlitter * SkA8Blitter_Choose(const SkPixmap &dst, const SkMatrix &ctm, const SkPaint &paint, SkArenaAlloc *alloc, bool drawCoverage, sk_sp< SkShader > clipShader, const SkSurfaceProps &)
static uint8_t src_p(uint8_t src, uint8_t dst)
@ kAlpha_8_SkColorType
pixel with alpha in 8-bit byte
static SkPath clip(const SkPath &path, const SkHalfPlane &plane)
SkDEBUGCODE(SK_SPI) SkThreadID SkGetThreadID()
void blitAntiH(int x, int y, const SkAlpha antialias[], const int16_t runs[]) override
SkA8_Blitter(const SkPixmap &device, const SkPaint &paint)
void blitV(int x, int y, int height, SkAlpha alpha) override
Blit a vertical run of pixels with a constant alpha value.
void blitH(int x, int y, int width) override
Blit a horizontal run of one or more pixels.
void blitMask(const SkMask &, const SkIRect &) override
void blitRect(int x, int y, int width, int height) override
Blit a solid rectangle one or more pixels wide.
void blitMask(const SkMask &, const SkIRect &) override
void blitRect(int x, int y, int width, int height) override
Blit a solid rectangle one or more pixels wide.
void blitH(int x, int y, int width) override
Blit a horizontal run of one or more pixels.
SkA8_Coverage_Blitter(const SkPixmap &device, const SkPaint &paint)
void blitV(int x, int y, int height, SkAlpha alpha) override
Blit a vertical run of pixels with a constant alpha value.
void blitAntiH(int x, int y, const SkAlpha antialias[], const int16_t runs[]) override
auto make(Ctor &&ctor) -> decltype(ctor(nullptr))
virtual void blitMask(const SkMask &, const SkIRect &clip)
uint8_t * writable_addr8(int x, int y) const
it will be possible to load the file into Perfetto s trace viewer disable asset Prevents usage of any non test fonts unless they were explicitly Loaded via prefetched default font Indicates whether the embedding started a prefetch of the default font manager before creating the engine run In non interactive mode
@ kA8_Format
8bits per pixel mask (e.g. antialiasing)
const uint8_t * getAddr8(int x, int y) const