This repository was archived by the owner on Feb 25, 2025. It is now read-only.
Always update the latest frame target time when the 'Animator::Render' method is called#31973
Merged
fluttergithubbot merged 2 commits intoflutter:mainfrom Mar 21, 2022
Merged
Conversation
…' method is called
Member
Author
|
friendly ping |
dnfield
reviewed
Mar 21, 2022
shell/common/animator_unittests.cc
Outdated
|
|
||
| // It will only be called once even though we call the method Animator::Render | ||
| // twice. because it will only be called when the pipeline is empty. | ||
| // It should always be called when the method 'Animator::Render' is called, |
dnfield
reviewed
Mar 21, 2022
| "Animator::Render"); | ||
| frame_timings_recorder_->RecordBuildEnd(fml::TimePoint::Now()); | ||
|
|
||
| delegate_.OnAnimatorUpdateLatestFrameTargetTime( |
Contributor
There was a problem hiding this comment.
Is this safe to access without a lock?
Member
Author
There was a problem hiding this comment.
I think it's safe, the lock is in Shell::OnAnimatorUpdateLatestFrameTargetTime
Contributor
There was a problem hiding this comment.
Sorry, I meant for this comment to be in the line below this (frame_timings_recorder_->GetVsyncTargetTime()
Contributor
There was a problem hiding this comment.
I see now though that takes a lock by itself.
dnfield
reviewed
Mar 21, 2022
| // record the target time for use by rasterizer. | ||
| { | ||
| std::scoped_lock time_recorder_lock(time_recorder_mutex_); | ||
| const fml::TimePoint frame_target_time = |
Contributor
There was a problem hiding this comment.
Do we still need the lock here?
Member
Author
There was a problem hiding this comment.
I think we still need it, because the Rasterizer will still call Shell::GetLatestFrameTargetTime to access latest_frame_target_time_ on the raster thread.
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Mar 21, 2022
…::Render' method is called (flutter/engine#31973)
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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
tiny patch for #31727
We should always update the latest frame target time when the method 'Animator::Render' is called, regardless of whether the pipeline is empty or not.
Pre-launch Checklist
writing and running engine tests.
///).