forked from firka/flutter
update for frametiming (#62933)
This commit is contained in:
@@ -1081,6 +1081,7 @@ mixin SchedulerBinding on BindingBase {
|
||||
'elapsed': frameTiming.totalSpan.inMicroseconds,
|
||||
'build': frameTiming.buildDuration.inMicroseconds,
|
||||
'raster': frameTiming.rasterDuration.inMicroseconds,
|
||||
'vsyncOverhead': frameTiming.vsyncOverhead.inMicroseconds,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -134,7 +134,8 @@ void main() {
|
||||
});
|
||||
|
||||
test('Flutter.Frame event fired', () async {
|
||||
window.onReportTimings(<FrameTiming>[FrameTiming.fromTimeStamps(
|
||||
window.onReportTimings(<FrameTiming>[FrameTiming(
|
||||
vsyncStart: 5000,
|
||||
buildStart: 10000,
|
||||
buildFinish: 15000,
|
||||
rasterStart: 16000,
|
||||
@@ -147,9 +148,10 @@ void main() {
|
||||
final Map<String, dynamic> event = events.first;
|
||||
expect(event['number'], isNonNegative);
|
||||
expect(event['startTime'], 10000);
|
||||
expect(event['elapsed'], 10000);
|
||||
expect(event['elapsed'], 15000);
|
||||
expect(event['build'], 5000);
|
||||
expect(event['raster'], 4000);
|
||||
expect(event['vsyncOverhead'], 5000);
|
||||
});
|
||||
|
||||
test('TimingsCallback exceptions are caught', () {
|
||||
|
||||
Reference in New Issue
Block a user