Lines Matching refs:alpha
25 static inline SkAlpha CatchOverflow(int alpha) { in CatchOverflow() argument
26 SkASSERT(alpha >= 0 && alpha <= 256); in CatchOverflow()
27 return alpha - (alpha >> 8); in CatchOverflow()
61 uint8_t* alpha = fAlpha + offsetX; in add() local
62 uint8_t* lastAlpha = alpha; in add()
66 SkAlphaRuns::Break(runs, alpha, x, 1); in add()
72 unsigned tmp = alpha[x] + startAlpha; in add()
74 …alpha[x] = SkToU8(tmp - (tmp >> 8)); // was (tmp >> 7), but that seems wrong if we're trying to… in add()
77 alpha += x + 1; in add()
83 SkAlphaRuns::Break(runs, alpha, x, middleCount); in add()
84 alpha += x; in add()
88 alpha[0] = SkToU8(CatchOverflow(alpha[0] + maxValue)); in add()
91 alpha += n; in add()
96 lastAlpha = alpha; in add()
100 SkAlphaRuns::Break(runs, alpha, x, 1); in add()
101 alpha += x; in add()
102 alpha[0] = SkToU8(alpha[0] + stopAlpha); in add()
104 lastAlpha = alpha; in add()
121 static void Break(int16_t runs[], uint8_t alpha[], int x, int count) {
128 uint8_t* next_alpha = alpha + x;
135 alpha[x] = alpha[0];
141 alpha += n;
146 alpha = next_alpha;
154 alpha[x] = alpha[0];
164 alpha += n;
174 static void BreakAt(int16_t runs[], uint8_t alpha[], int x) { in BreakAt() argument
180 alpha[x] = alpha[0]; in BreakAt()
186 alpha += n; in BreakAt()