Cheaper frosted-glass blurs: sigma 4 and one backdrop read per bar
Blur sigma 16 -> 4 keeps CanvasKit on its direct blur path; under the 84% fill the look is unchanged (max 13/255 inside the pieces). SegmentedBar's pieces share a BackdropGroup so Impeller reads the content behind them once. Adds a scroll frame-time bench, a backdrop census and filler rows to the full-app probe. CPU CanvasKit, 560x900: run timeline p50 31.8 -> 22.1 ms, runs list 25.3 -> 19.9 ms.
This commit is contained in:
@@ -27,6 +27,7 @@ import 'package:flutter/widgets.dart';
|
||||
import 'package:web/web.dart' as web;
|
||||
import 'package:web_socket_channel/web_socket_channel.dart';
|
||||
|
||||
import 'perf/backdrop_census.dart';
|
||||
import 'probe_folder_fixture.dart';
|
||||
|
||||
/// The run every run-scoped hit names. Its recorded sequences are deliberately
|
||||
@@ -79,9 +80,42 @@ JsonMap probeRunDetail() => {
|
||||
'started_at': '2026-10-20T08:12:00Z',
|
||||
'finished_at': '2026-10-20T08:14:00Z',
|
||||
},
|
||||
..._fillerSteps(),
|
||||
],
|
||||
};
|
||||
|
||||
/// Extra rows for scroll-performance captures (`?runs=N`, `?steps=N`). Both
|
||||
/// default to none, so every other capture sees the fixture unchanged.
|
||||
int _fillerRunCount = 0;
|
||||
int _fillerStepCount = 0;
|
||||
|
||||
List<JsonMap> _fillerSteps() => [
|
||||
for (var i = 0; i < _fillerStepCount; i++)
|
||||
{
|
||||
'stage': i.isEven ? 'build' : 'plan',
|
||||
'sequence': 100 + i,
|
||||
'status': 'completed',
|
||||
'outcome': 'success',
|
||||
'target': i.isEven ? 'plan' : 'build',
|
||||
'started_at': '2026-10-20T08:32:00Z',
|
||||
'finished_at': '2026-10-20T08:33:00Z',
|
||||
'diagnostic': 'filler step $i for scroll captures',
|
||||
},
|
||||
];
|
||||
|
||||
List<JsonMap> _fillerRuns() => [
|
||||
for (var i = 0; i < _fillerRunCount; i++)
|
||||
{
|
||||
'id': 1000 + i,
|
||||
'title': 'Filler run $i for scroll captures',
|
||||
'name': 'filler-$i',
|
||||
'status': i % 3 == 0 ? 'failed' : 'succeeded',
|
||||
'created_at': '2026-10-18T08:12:00Z',
|
||||
'finished_at': '2026-10-18T08:42:00Z',
|
||||
'pipeline_id': i.isEven ? 24 : 22,
|
||||
},
|
||||
];
|
||||
|
||||
List<JsonMap> probeRuns() => [
|
||||
{
|
||||
'id': 7,
|
||||
@@ -101,6 +135,7 @@ List<JsonMap> probeRuns() => [
|
||||
'finished_at': '2026-10-19T22:03:00Z',
|
||||
'pipeline_id': 22,
|
||||
},
|
||||
..._fillerRuns(),
|
||||
];
|
||||
|
||||
List<JsonMap> probePipelines() => [
|
||||
@@ -480,6 +515,8 @@ class _FixtureSink implements WebSocketSink {
|
||||
/// fallback for `/runs/7`) can still open a deep location:
|
||||
///
|
||||
/// `?route=/runs/7/stage/build%3Fvisit%3D1` opens that app location;
|
||||
/// `?runs=200` / `?steps=60` append filler runs / run-7 steps for scroll
|
||||
/// performance captures;
|
||||
/// `?q=release` types that query into Search once its field is shown;
|
||||
/// `?platform=cupertino` renders the Cupertino host (`material`, the
|
||||
/// default, renders Material as browsers do);
|
||||
@@ -489,6 +526,9 @@ class _FixtureSink implements WebSocketSink {
|
||||
/// app/tool/capture/ drives this entry generically; see its README.
|
||||
void main() {
|
||||
final params = Uri.base.queryParameters;
|
||||
installBackdropCensus();
|
||||
_fillerRunCount = int.tryParse(params['runs'] ?? '') ?? 0;
|
||||
_fillerStepCount = int.tryParse(params['steps'] ?? '') ?? 0;
|
||||
final cupertino = params['platform'] == 'cupertino';
|
||||
final route = params['route'];
|
||||
if (route != null && route.startsWith('/')) {
|
||||
|
||||
Reference in New Issue
Block a user