0
Files
src/cc/view_transition
Noam Rosenthal 47d08e8e10 Refactor visual overflow computation for view-transitions (part 1)
Up until now, blink attempts to compute the exact bounds of the paint
that generates the view transition capture, by applying the same logic
performed by the paint system. This is needed to achieve precise
geometric projection of the captured snapshot to the pseudo element's
content rect.

This parallel logic creates a brittle effect where every optimization in the paint system requires a parallel fix in the view transition overflow
computation, and it's easy to get them out of sync.

Instead, we do the following in this CL:

- We introduce the "max extents", which is a rect used to compute the CC
  layer "bounds". That rect is determined for all the layers before determining the surface content rect.

- After we've computed the actual capture rect (which is the
  surface content rect of the view-transition effect), the content
  layer maps this capture rect to its own coordinate system using the
  max extents rect, and the result (the actual extents) is used for
  the paint rect, as well as intersects with the content
  layer's drawable rect to avoid over-allocating surface.

- When the old capture is done, we record the actual content rects
  (adjusted by surface scale) and pass them to the style tracker.
  These style tracker would use those captured rects to map
  the contents of the old pseudo-elements, and no adjustment is needed
  as the content is no longer changing.

See stacked CL (https://chromium-review.googlesource.com/c/chromium/src/+/5920431/1?usp=related-change) for how this is used. This CL only introduces the CC parts, and the
minimum blink changes to make them compile without a behavior change.

Bug: 347947051
Change-Id: I18203b23e34e09f7c230da17bafd91eeff6aa383
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5823921
Reviewed-by: Khushal Sagar <khushalsagar@chromium.org>
Commit-Queue: Noam Rosenthal <nrosenthal@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1367386}
2024-10-11 09:40:37 +00:00
..

cc/view_transition

The view_transition directory supports the view transition project in Blink. Please see //third_party/blink/renderer/core/view_transition/README.md for more details.