ContainerTiming: cache parent record pointers [chromium/src : main]

0 views
Skip to first unread message

José Dapena Paz (Gerrit)

unread,
8:50 AM (15 hours ago) 8:50 AM
to chromium...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, blink-rev...@chromium.org

José Dapena Paz has uploaded the change for review

Commit message

ContainerTiming: cache parent record pointers

When an element is painted inside a container timing hierarchy,
the current implementation has to traverse all the ancestors that
are meaningful for Container Timing using recursive calls to
GetParentContainerRoot().

With this change, for each container timing root record, we cache
a pointer to its ancestor. This way, once we find a container
timing root, all the ancestors notification is faster.

When there are changes that could affect these pointers, we just
invalidate all the records, and lazily regenerate them on next
paint.

This only resolves the traversal from one root to the next. We
would still want to support later a way to make the traversal from
a painted element to its closes container timing root.

I also added a few unit tests focused on the traversal.
Bug: 489959278
Change-Id: I9606bd56cc7de3a939d43784f7bb1ad9e10a028e

Change diff


Change information

Files:
  • M third_party/blink/renderer/core/html/html_element.cc
  • M third_party/blink/renderer/core/paint/build.gni
  • M third_party/blink/renderer/core/paint/timing/container_timing.cc
  • M third_party/blink/renderer/core/paint/timing/container_timing.h
  • A third_party/blink/renderer/core/paint/timing/container_timing_test.cc
Change size: L
Delta: 5 files changed, 337 insertions(+), 26 deletions(-)
Open in Gerrit

Related details

Attention set is empty
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: newchange
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I9606bd56cc7de3a939d43784f7bb1ad9e10a028e
Gerrit-Change-Number: 7643011
Gerrit-PatchSet: 1
Gerrit-Owner: José Dapena Paz <jda...@igalia.com>
satisfied_requirement
unsatisfied_requirement
open
diffy
Reply all
Reply to author
Forward
0 new messages