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
18d1be4a
Commit
18d1be4a
authored
Jun 06, 2017
by
Ian Hickson
Committed by
GitHub
Jun 06, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make implicit animations work with hot reload (#10514)
parent
cee36e30
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
1 deletion
+10
-1
binding.dart
packages/flutter/lib/src/rendering/binding.dart
+10
-1
No files found.
packages/flutter/lib/src/rendering/binding.dart
View file @
18d1be4a
...
...
@@ -262,8 +262,17 @@ abstract class RendererBinding extends BindingBase with SchedulerBinding, Servic
/// likely to be quite expensive) gets a few extra milliseconds to run.
void
scheduleWarmUpFrame
()
{
// We use timers here to ensure that microtasks flush in between.
//
// We call resetEpoch after this frame so that, in the hot reload case, the
// very next frame pretends to have occurred immediately after this warm-up
// frame. The warm-up frame's timestamp will typically be far in the past
// (the time of the last real frame), so if we didn't reset the epoch we
// would see a sudden jump from the old time in the warm-up frame to the new
// time in the "real" frame. The biggest problem with this is that implicit
// animations end up being triggered at the old time and then skipping every
// frame and finishing in the new time.
Timer
.
run
(()
{
handleBeginFrame
(
null
);
});
Timer
.
run
(()
{
handleDrawFrame
();
});
Timer
.
run
(()
{
handleDrawFrame
();
resetEpoch
();
});
}
@override
...
...
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