This repository was archived by the owner on Feb 25, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6k
Do not call Animator::Delegate::OnAnimatorNotifyIdle until at least one frame has been rendered. #29015
Merged
Merged
Do not call Animator::Delegate::OnAnimatorNotifyIdle until at least one frame has been rendered. #29015
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
844e833
Start animator paused
dnfield 8c2e7a7
use fml::TimePoint
dnfield f2a7fae
Merge remote-tracking branch 'upstream/master' into engine_idle
dnfield 489c152
Do not notify idle before rendering a frame
dnfield afebb1f
Clean up animator correctly and more closely control vsync
dnfield File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you know what the magic number
100000
down on line 172 is for? Sorry it isn't part of your PR, but if you're in the neighborhood and you know what it is and why it has that value, could you make a constant for it and document it?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AFAIK this was done by some Fuchsia folks to try to avoid kicking off a GC when we're about to animate. I'm not sure where it came from though, and it's not well tested.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe @nathanrogersgoogle
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This originated with ffbefaf#diff-df92116199201a3a7af59c803b52231ed262d1d7c614e498b0e9198fcfd38c6bR84
@rmacnak-google
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suppose it's to make up for the fact that we just delayed 51ms but I'm really not sure. I'm going to land this as-is, and if Nathan knows what's up maybe we can add more docs there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ahh ok thanks Jason
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The magic number "100ms" was meant to be enough time to run the compactor but not so much time that things wouldn't be awful if we've incorrectly detected idle time. 100ms probably isn't enough time for slower devices or larger heaps. This logic should probably be moved to the engine's task runners / scheduler to properly detect idle time, and invoke Dart_NotifyIdle with a much further deadline.