/// Returns true if the scanline contains only a single run, /// of alpha value 0. bool empty() const {
SkASSERT(fRuns[0] > 0); return fAlpha[0] == 0 && fRuns[fRuns[0]] == 0;
}
/// Reinitialize for a new scanline. void reset(int width);
if (startAlpha) {
SkAlphaRuns::Break(runs, alpha, x, 1); /* I should be able to just add alpha[x] + startAlpha. However,ifthetrailingedgeofthepreviousspanandtheleading edgeofthecurrentspanroundtothesamesuper-sampledxvalue, Imightoverflowto256withthisadd,hencethefunnysubtract(crud).
*/ unsigned tmp = alpha[x] + startAlpha;
SkASSERT(tmp <= 256);
alpha[x] = SkToU8(tmp - (tmp >> 8)); // was (tmp >> 7), but that seems wrong if we're trying to catch 256
runs += x + 1;
alpha += x + 1;
x = 0;
SkDEBUGCODE(this->validate();)
}
if (middleCount) {
SkAlphaRuns::Break(runs, alpha, x, middleCount);
alpha += x;
runs += x;
x = 0; do {
alpha[0] = SkToU8(CatchOverflow(alpha[0] + maxValue)); int n = runs[0];
SkASSERT(n <= middleCount);
alpha += n;
runs += n;
middleCount -= n;
} while (middleCount > 0);
SkDEBUGCODE(this->validate();)
lastAlpha = alpha;
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.