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
c2f452c0
Unverified
Commit
c2f452c0
authored
Sep 17, 2021
by
Jason Simmons
Committed by
GitHub
Sep 17, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Reuse a TimelineTask for the scheduler frame and animate events (#90168)
parent
4889064f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
8 deletions
+5
-8
image_cache_tracing_test.dart
dev/tracing_tests/test/image_cache_tracing_test.dart
+1
-1
binding.dart
packages/flutter/lib/src/scheduler/binding.dart
+4
-7
No files found.
dev/tracing_tests/test/image_cache_tracing_test.dart
View file @
c2f452c0
...
...
@@ -55,7 +55,7 @@ void main() {
},
<
String
,
dynamic
>{
'name'
:
'listener'
,
'args'
:
<
String
,
dynamic
>{
'
parentId'
:
'0'
,
'
isolateId'
:
isolateId
}
'args'
:
<
String
,
dynamic
>{
'isolateId'
:
isolateId
}
},
<
String
,
dynamic
>{
'name'
:
'ImageCache.clear'
,
...
...
packages/flutter/lib/src/scheduler/binding.dart
View file @
c2f452c0
...
...
@@ -996,8 +996,7 @@ mixin SchedulerBinding on BindingBase {
handleDrawFrame
();
}
TimelineTask
?
_frameTimelineTask
;
TimelineTask
?
_animateTimelineTask
;
final
TimelineTask
?
_frameTimelineTask
=
kReleaseMode
?
null
:
TimelineTask
();
/// Called by the engine to prepare the framework to produce a new frame.
///
...
...
@@ -1023,7 +1022,7 @@ mixin SchedulerBinding on BindingBase {
/// statements printed during a frame from those printed between frames (e.g.
/// in response to events or timers).
void
handleBeginFrame
(
Duration
?
rawTimeStamp
)
{
_frameTimelineTask
=
TimelineTask
().
.
start
(
'Frame'
,
arguments:
timelineArgumentsIndicatingLandmarkEvent
);
_frameTimelineTask
?
.
start
(
'Frame'
,
arguments:
timelineArgumentsIndicatingLandmarkEvent
);
_firstRawTimeStampInEpoch
??=
rawTimeStamp
;
_currentFrameTimeStamp
=
_adjustForEpoch
(
rawTimeStamp
??
_lastRawTimeStamp
);
if
(
rawTimeStamp
!=
null
)
...
...
@@ -1050,7 +1049,7 @@ mixin SchedulerBinding on BindingBase {
_hasScheduledFrame
=
false
;
try
{
// TRANSIENT FRAME CALLBACKS
_
animateTimelineTask
=
TimelineTask
().
.
start
(
'Animate'
,
arguments:
timelineArgumentsIndicatingLandmarkEvent
);
_
frameTimelineTask
?
.
start
(
'Animate'
,
arguments:
timelineArgumentsIndicatingLandmarkEvent
);
_schedulerPhase
=
SchedulerPhase
.
transientCallbacks
;
final
Map
<
int
,
_FrameCallbackEntry
>
callbacks
=
_transientCallbacks
;
_transientCallbacks
=
<
int
,
_FrameCallbackEntry
>{};
...
...
@@ -1075,8 +1074,7 @@ mixin SchedulerBinding on BindingBase {
/// useful when working with frame callbacks.
void
handleDrawFrame
()
{
assert
(
_schedulerPhase
==
SchedulerPhase
.
midFrameMicrotasks
);
_animateTimelineTask
?.
finish
();
// end the "Animate" phase
_animateTimelineTask
=
null
;
_frameTimelineTask
?.
finish
();
// end the "Animate" phase
try
{
// PERSISTENT FRAME CALLBACKS
_schedulerPhase
=
SchedulerPhase
.
persistentCallbacks
;
...
...
@@ -1093,7 +1091,6 @@ mixin SchedulerBinding on BindingBase {
}
finally
{
_schedulerPhase
=
SchedulerPhase
.
idle
;
_frameTimelineTask
?.
finish
();
// end the Frame
_frameTimelineTask
=
null
;
assert
(()
{
if
(
debugPrintEndFrameBanner
)
debugPrint
(
'▀'
*
_debugBanner
!.
length
);
...
...
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