-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Add support for LargestContentfulPaint PaintMetric #39384
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
Conversation
|
How does this change relate to #38041? |
f3d2f5a to
3e77e77
Compare
I'm picking up the PR from where it was left. P.S: I can't modify existing PR, so created separate one. cc: @xiaochengh |
b9a6e01 to
5bfa356
Compare
97278bc to
2679291
Compare
xiaochengh
left a comment
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.
Thanks for completing this PR!
I'm still wondering if it's the best choice to tightly couple LCP calculation with display list computation in this way. @mrobinson @Loirooriol could you give your insights?
Otherwise this PR is basically good to me.
7c2832a to
9848b9c
Compare
Done with nits. |
Signed-off-by: Shubham Gupta <shubham.gupta@chromium.org>
Signed-off-by: Shubham Gupta <shubham.gupta@chromium.org>
Signed-off-by: Shubham Gupta <shubham.gupta@chromium.org>
Signed-off-by: Shubham Gupta <shubham.gupta@chromium.org>
Signed-off-by: Shubham Gupta <shubham.gupta@chromium.org>
Add basic IDL implementation for LargestContentfulPaint #39714 |
Steps for calculating LCP:
largest_contentful_paint_enabledis enabled,LargestContentfulPaintCandidateCollectoris created once per LayoutThread usingviewport_size.display_list, it send the pre-calculatedclip_rectandboundstoLCPCollectoralong withtransformandLCPCandidateTypeforvisual_rectcalculation forLCPCandidates.visual_rectcalculation, update thelcp_candidatebased onareaofvisual_rectand send it tocompositor.lcp_candidates, we find out thelargest_contentful_paintand send it topaint_metricLCPalso usesPaintMetricStateto save console from spamming with duplicate entries.This PR includes following commits better segregation of code
LargestContentfulPaintCandidatestructLargestContentfulPaintCandidateCollectorLargestContentfulPaintCandidateswhen feature is enabled.LargestContentfulPaintCandidatesto compositorLargestContentfulPaintCalculatorLargestContentfulPaintLCPtoPaintMetricsLCPfeature on user interactionElements considered for LCP in this PR:
Reference: #38041
Testing: Tested using perf-analysis-tools See attached screenshot.
Fixes: None
Perfetto

Console Output of Metric
