Revert "Measure the running composer border once per size"

Measured at 4K it saved nothing (602 ms -> 621 ms over a streamed reply):
on the web the engine rebuilds every drawn path from its recorded
operations, so keeping the measured outline in Dart does not avoid the
CanvasKit path work. The border needs a path-free drawing instead.

This reverts commit 9d37db59.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-22 18:36:29 +00:00
parent 6a0b49853c
commit e8baf07bf4
3 changed files with 14 additions and 70 deletions
@@ -208,33 +208,4 @@ void main() {
// Curve metrics are approximations; a fraction of a pixel is exact enough.
expect(_length(pieceMetrics), closeTo(20, .5));
});
test('a measured outline draws the same strokes as measuring each time', () {
final outline = Path()
..addRRect(
RRect.fromRectAndRadius(
const Rect.fromLTWH(0, 0, 300, 56),
const Radius.circular(28),
),
);
final measured = RunningOutline(outline);
for (final progress in [0.0, 0.3, 0.97]) {
final once = runningHighlightStrokes(
outline: outline,
progress: progress,
primary: const Color(0xFF0000FF),
tertiary: const Color(0xFFFF0000),
);
final kept = measured.strokes(
progress: progress,
primary: const Color(0xFF0000FF),
tertiary: const Color(0xFFFF0000),
);
expect(kept.length, once.length);
for (var i = 0; i < kept.length; i++) {
expect(kept[i].color, once[i].color);
expect(kept[i].path.getBounds(), once[i].path.getBounds());
}
}
});
}