[LCP] Combine text and image callbacks
Currently, ImagePaintTimingDetector and TextPaintTimingDetector each has their own paint-time callback. Two callbacks are unnecessary since if they are registered from the same (animated) frame, they would get the same paint-time. Therefore, they should be combined into one callback. Combining the callbacks also creates a chance for LCPCalculator to hook to "either text records or image records have been changed", i.e., the end of the combined callback. This hook would enable us to remove the intermediate state between two callbacks, and thus fixed the out-of-sync issue in crbug.com/982307. Bug: 982307 Change-Id: Ic9bc3076d163b471d91e6414da70bd6d7af0fd6d Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1730517 Commit-Queue: Liquan (Max) Gu <maxlg@chromium.org> Reviewed-by:Steve Kobes <skobes@chromium.org> Cr-Commit-Position: refs/heads/master@{#683470}
Showing
Please register or sign in to comment