markDirty method
Damages columns [x0, x1) of row y: the row's damage grows to span
them and what it had.
Implementation
@pragma('vm:prefer-inline')
void markDirty(int y, int x0, int x1) {
final lo = dirtyLo[y];
final hi = dirtyHi[y];
if (lo >= hi) {
dirtyLo[y] = x0;
dirtyHi[y] = x1;
return;
}
if (x0 < lo) {
dirtyLo[y] = x0;
}
if (x1 > hi) {
dirtyHi[y] = x1;
}
}