collectAllMaskRectsSync static method
Returns all currently-active mask rects in logical pixels.
Combines _MaskRegistry entries (MaskedWidget rects) and
text-region results from _collectTextRegions when maskAllTexts or
textsToMask is configured. Fully synchronous — safe to call in the
same synchronous slice as the rasterisation kickoff (see
lib/src/replay/flutter_frame_source.dart).
Implementation
static List<Rect> collectAllMaskRectsSync() {
final rects = _MaskRegistry.instance.allRects();
if (_maskAllTexts) {
rects.addAll(_textRectsSync());
} else if (_textsToMask.isNotEmpty) {
rects.addAll(_textRectsSync(patterns: _textsToMask));
}
if (_maskAllImages) {
rects.addAll(_imageRectsSync());
}
return rects;
}