opt: RepaintBoundary (#1840)

* opt: RepaintBoundary

* fix [skip ci]

* opt time width

* opt: video position

* update

---------

Co-authored-by: dom <githubaccount56556@proton.me>
This commit is contained in:
My-Responsitories
2026-02-20 21:04:34 +08:00
committed by GitHub
parent a63ca93762
commit d7d9655f81
12 changed files with 226 additions and 128 deletions

View File

@@ -226,13 +226,14 @@ abstract class MarqueeRender extends RenderBox
if (_distance > 0) {
updateSize();
_ticker.initIfNeeded(_onTick);
markNeedsCompositingBitsUpdate();
} else {
_ticker.cancel();
}
}
@override
bool get isRepaintBoundary => true;
bool get isRepaintBoundary => _ticker._ticker != null;
void paintCenter(PaintingContext context, Offset offset) {
if (_direction == Axis.horizontal) {