New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[metrics] Record the frame target time on the layer tree #17281
Conversation
This lets us measure stats on when the frame was scheduled to be rendered vs when it finished rasterizing. Note: This isn't propagated to the FrameTimings struct yet, that is to be followed.
@@ -25,7 +25,8 @@ Animator::Animator(Delegate& delegate, | |||
: delegate_(delegate), | |||
task_runners_(std::move(task_runners)), | |||
waiter_(std::move(waiter)), | |||
last_begin_frame_time_(), | |||
last_frame_begin_time_(), |
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've also renamed this from last_begin_frame_time_
to last_frame_begin_time_
, I think this reads better.
I'm not sure how compatible we can be with this, but it would be better if the agent that created the layer_tree passed this information in the constructor. Right now we only pass the target time up and then it is used to compute a tree, but it is not passed down. |
I've looked at passing it down when constructing the later tree. One of the ways I think we can do it would be to pass it through |
I'm not sure what the complications are for downstream dependents. Is this a case of them using our API and needing to use the new method signature? Or do some of them implement our dart:ui interfaces and they'd have to update their alternate implementations to match? I'm still looking at the chain of method calls, but can default constructor values be used to maintain backwards compatibility? It could also be an optional "after construction" call which leaves the properties with default values if they don't call 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.
LGTM
This lets us measure stats on when the frame was
scheduled to be rendered vs when it finished rasterizing.
Note: This isn't propagated to the FrameTimings struct yet,
that is to be followed.