[flutter_tools] remove raster stats CLI option. (#152501)
The raster stats feature is being removed from devtools and the engine. Remove the CLI option as well. Fixes https://github.com/flutter/flutter/issues/144191 Fixes https://github.com/flutter/flutter/issues/132169
This commit is contained in:
@@ -113,18 +113,6 @@ final FakeVmServiceRequest listViews = FakeVmServiceRequest(
|
||||
},
|
||||
);
|
||||
|
||||
const FakeVmServiceRequest renderFrameRasterStats = FakeVmServiceRequest(
|
||||
method: kRenderFrameWithRasterStatsMethod,
|
||||
args: <String, Object>{
|
||||
'viewId': 'a',
|
||||
'isolateId': '1',
|
||||
},
|
||||
error: FakeRPCError(
|
||||
code: RPCErrorCodes.kServerError,
|
||||
error: 'Raster status not supported on Impeller backend',
|
||||
),
|
||||
);
|
||||
|
||||
const FakeVmServiceRequest setAssetBundlePath = FakeVmServiceRequest(
|
||||
method: '_flutter.setAssetBundlePath',
|
||||
args: <String, Object>{
|
||||
|
||||
@@ -326,31 +326,6 @@ void main() {
|
||||
Usage: () => TestUsage(),
|
||||
}));
|
||||
|
||||
testUsingContext('ResidentRunner can handle an RPC exception from debugFrameJankMetrics', () => testbed.run(() async {
|
||||
fakeVmServiceHost = FakeVmServiceHost(requests: <VmServiceExpectation>[
|
||||
listViews,
|
||||
listViews,
|
||||
listViews,
|
||||
renderFrameRasterStats,
|
||||
]);
|
||||
final Completer<DebugConnectionInfo> futureConnectionInfo = Completer<DebugConnectionInfo>.sync();
|
||||
final Completer<void> futureAppStart = Completer<void>.sync();
|
||||
unawaited(residentRunner.attach(
|
||||
appStartedCompleter: futureAppStart,
|
||||
connectionInfoCompleter: futureConnectionInfo,
|
||||
));
|
||||
await futureAppStart.future;
|
||||
|
||||
final bool result = await residentRunner.debugFrameJankMetrics();
|
||||
expect(result, true);
|
||||
expect((globals.flutterUsage as TestUsage).events, isEmpty);
|
||||
expect(fakeAnalytics.sentEvents, isEmpty);
|
||||
expect(fakeVmServiceHost?.hasRemainingExpectations, false);
|
||||
expect((globals.logger as BufferLogger).warningText, contains('Unable to get jank metrics for Impeller renderer'));
|
||||
}, overrides: <Type, Generator>{
|
||||
Usage: () => TestUsage(),
|
||||
}));
|
||||
|
||||
testUsingContext('ResidentRunner fails its operation if the device initialization is not complete', () => testbed.run(() async {
|
||||
fakeVmServiceHost = FakeVmServiceHost(requests: <VmServiceExpectation>[
|
||||
listViews,
|
||||
@@ -1335,7 +1310,6 @@ flutter:
|
||||
commandHelp.a,
|
||||
commandHelp.M,
|
||||
commandHelp.g,
|
||||
commandHelp.j,
|
||||
commandHelp.hWithDetails,
|
||||
commandHelp.c,
|
||||
commandHelp.q,
|
||||
|
||||
@@ -179,12 +179,6 @@ void main() {
|
||||
await terminalHandler.processTerminalInput('a');
|
||||
});
|
||||
|
||||
testWithoutContext('j unsupported jank metrics for web', () async {
|
||||
final TerminalHandler terminalHandler = setUpTerminalHandler(<FakeVmServiceRequest>[], web: true);
|
||||
await terminalHandler.processTerminalInput('j');
|
||||
expect(terminalHandler.logger.warningText.contains('Unable to get jank metrics for web'), true);
|
||||
});
|
||||
|
||||
testWithoutContext('a - debugToggleProfileWidgetBuilds without service protocol is skipped', () async {
|
||||
final TerminalHandler terminalHandler = setUpTerminalHandler(<FakeVmServiceRequest>[], supportsServiceProtocol: false);
|
||||
|
||||
|
||||
@@ -424,14 +424,6 @@ void main() {
|
||||
method: 'getVMTimeline',
|
||||
error: FakeRPCError(code: RPCErrorCodes.kServiceDisappeared),
|
||||
),
|
||||
const FakeVmServiceRequest(
|
||||
method: kRenderFrameWithRasterStatsMethod,
|
||||
args: <String, dynamic>{
|
||||
'viewId': '1',
|
||||
'isolateId': '12',
|
||||
},
|
||||
error: FakeRPCError(code: RPCErrorCodes.kServiceDisappeared),
|
||||
),
|
||||
]
|
||||
);
|
||||
|
||||
@@ -452,10 +444,6 @@ void main() {
|
||||
final vm_service.Response? timeline = await fakeVmServiceHost.vmService.getTimeline();
|
||||
expect(timeline, isNull);
|
||||
|
||||
final Map<String, Object?>? rasterStats =
|
||||
await fakeVmServiceHost.vmService.renderFrameWithRasterStats(viewId: '1', uiIsolateId: '12');
|
||||
expect(rasterStats, isNull);
|
||||
|
||||
expect(fakeVmServiceHost.hasRemainingExpectations, false);
|
||||
});
|
||||
|
||||
@@ -480,35 +468,6 @@ void main() {
|
||||
expect(fakeVmServiceHost.hasRemainingExpectations, false);
|
||||
});
|
||||
|
||||
testWithoutContext('renderWithStats forwards stats correctly', () async {
|
||||
// ignore: always_specify_types
|
||||
const Map<String, dynamic> response = {
|
||||
'type': 'RenderFrameWithRasterStats',
|
||||
'snapshots':<dynamic>[
|
||||
// ignore: always_specify_types
|
||||
{
|
||||
'layer_unique_id':1512,
|
||||
'duration_micros':477,
|
||||
'snapshot':'',
|
||||
},
|
||||
],
|
||||
};
|
||||
final FakeVmServiceHost fakeVmServiceHost = FakeVmServiceHost(
|
||||
requests: <VmServiceExpectation>[
|
||||
const FakeVmServiceRequest(method: kRenderFrameWithRasterStatsMethod, args: <String, Object>{
|
||||
'isolateId': 'isolate/123',
|
||||
'viewId': 'view/1',
|
||||
}, jsonResponse: response),
|
||||
]
|
||||
);
|
||||
|
||||
final Map<String, Object?>? rasterStats =
|
||||
await fakeVmServiceHost.vmService.renderFrameWithRasterStats(viewId: 'view/1', uiIsolateId: 'isolate/123');
|
||||
expect(rasterStats, equals(response));
|
||||
|
||||
expect(fakeVmServiceHost.hasRemainingExpectations, false);
|
||||
});
|
||||
|
||||
testWithoutContext('getFlutterViews polls until a view is returned', () async {
|
||||
final FakeVmServiceHost fakeVmServiceHost = FakeVmServiceHost(
|
||||
requests: <VmServiceExpectation>[
|
||||
|
||||
@@ -345,7 +345,6 @@ void main() {
|
||||
'a Toggle timeline events for all widget build methods. (debugProfileWidgetBuilds)',
|
||||
'M Write SkSL shaders to a unique file in the project directory.',
|
||||
'g Run source code generators.',
|
||||
'j Dump frame raster stats for the current frame. (Unsupported for web)',
|
||||
'h Repeat this help message.',
|
||||
'd Detach (terminate "flutter run" but leave application running).',
|
||||
'c Clear the screen',
|
||||
|
||||
Reference in New Issue
Block a user