Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
78a96b09
Unverified
Commit
78a96b09
authored
May 20, 2021
by
Jonah Williams
Committed by
GitHub
May 20, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[flutter] use engine provided frame number (#82934)
parent
25fa2e6c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
8 deletions
+5
-8
binding.dart
packages/flutter/lib/src/scheduler/binding.dart
+3
-7
scheduler_test.dart
packages/flutter/test/scheduler/scheduler_test.dart
+2
-1
No files found.
packages/flutter/lib/src/scheduler/binding.dart
View file @
78a96b09
...
...
@@ -202,12 +202,8 @@ mixin SchedulerBinding on BindingBase {
_instance
=
this
;
if
(!
kReleaseMode
)
{
int
frameNumber
=
0
;
addTimingsCallback
((
List
<
FrameTiming
>
timings
)
{
for
(
final
FrameTiming
frameTiming
in
timings
)
{
frameNumber
+=
1
;
_profileFramePostEvent
(
frameNumber
,
frameTiming
);
}
timings
.
forEach
(
_profileFramePostEvent
);
});
}
}
...
...
@@ -1103,9 +1099,9 @@ mixin SchedulerBinding on BindingBase {
}
}
void
_profileFramePostEvent
(
int
frameNumber
,
FrameTiming
frameTiming
)
{
void
_profileFramePostEvent
(
FrameTiming
frameTiming
)
{
postEvent
(
'Flutter.Frame'
,
<
String
,
dynamic
>{
'number'
:
frameNumber
,
'number'
:
frame
Timing
.
frame
Number
,
'startTime'
:
frameTiming
.
timestampInMicroseconds
(
FramePhase
.
buildStart
),
'elapsed'
:
frameTiming
.
totalSpan
.
inMicroseconds
,
'build'
:
frameTiming
.
buildDuration
.
inMicroseconds
,
...
...
packages/flutter/test/scheduler/scheduler_test.dart
View file @
78a96b09
...
...
@@ -143,13 +143,14 @@ void main() {
buildFinish:
15000
,
rasterStart:
16000
,
rasterFinish:
20000
,
frameNumber:
1991
)]);
final
List
<
Map
<
String
,
dynamic
>>
events
=
scheduler
.
getEventsDispatched
(
'Flutter.Frame'
);
expect
(
events
,
hasLength
(
1
));
final
Map
<
String
,
dynamic
>
event
=
events
.
first
;
expect
(
event
[
'number'
],
isNonNegative
);
expect
(
event
[
'number'
],
1991
);
expect
(
event
[
'startTime'
],
10000
);
expect
(
event
[
'elapsed'
],
15000
);
expect
(
event
[
'build'
],
5000
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment