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

@@ -119,7 +119,9 @@ class RenderProgressBar extends RenderBox {
@override
void paint(PaintingContext context, Offset offset) {
final size = this.size;
final canvas = context.canvas;
final canvas = context.canvas
..save()
..translate(offset.dx, offset.dy);
final paint = Paint()..style = .fill;
canvas.clipRect(
@@ -147,8 +149,6 @@ class RenderProgressBar extends RenderBox {
..drawRect(left, paint..color = _color)
..drawRect(right, paint..color = _backgroundColor);
}
canvas.restore();
}
@override
bool get isRepaintBoundary => true;
}