clearDirtyTracking method
void
clearDirtyTracking()
Implementation
void clearDirtyTracking() {
if (!tracksDirty) {
touched = <LineData?>[];
dirtyRows = <bool>[];
dirtyBits = <Uint32List>[];
return;
}
final height = lines.length;
final wordCount = _dirtyWordCount(width());
if (touched.length != height) {
touched = List<LineData?>.filled(height, LineData.clean);
} else {
touched.fillRange(0, height, LineData.clean);
}
if (dirtyRows.length != height) {
dirtyRows = List<bool>.filled(height, false);
} else {
dirtyRows.fillRange(0, height, false);
}
if (dirtyBits.length != height ||
(height > 0 && dirtyBits.first.length != wordCount)) {
dirtyBits = List<Uint32List>.generate(
height,
(_) => Uint32List(wordCount),
);
} else {
for (final bits in dirtyBits) {
bits.fillRange(0, bits.length, 0);
}
}
}