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

@@ -997,12 +997,15 @@ class _RenderBorderIndicator extends RenderBox {
final size = this.size;
final canvas = context.canvas;
final width = size.width / 2;
if (!_isLeft) {
canvas.translate(width, 0);
}
BoxBorder.paintNonUniformBorder(
canvas,
Rect.fromLTRB(0, 0, width, size.height),
Rect.fromLTWH(
offset.dx + (_isLeft ? 0 : width),
offset.dy,
width,
size.height,
),
borderRadius: BorderRadius.only(
topLeft: _isLeft ? _radius : .zero,
topRight: _isLeft ? .zero : _radius,
@@ -1012,9 +1015,6 @@ class _RenderBorderIndicator extends RenderBox {
color: Colors.white38,
);
}
@override
bool get isRepaintBoundary => true;
}
class LiveDanmaku extends StatefulWidget {