
During a transition, each shared element induces a render surface to generate its content as an image. This image is then drawn using a pseudo element which can be animated for the duration of the transition. This pseudo element is drawn using a cc::DocumentTransitionContentLayer tagged with the same SharedElementResourceId that the shared element's render surface is tagged with. Since the shared element's render surface output is drawn where the DocumentTransitionContentLayer quad draws (instead of its actual render target), this results in incorrect render surface dependency tracking. This change fixes this by updating the shared element's target render surface to the render target of its corresponding DocumentTransitionContentLayer (or to the layer itself if it has a render surface). This ensures that render passes are created in correct dependency order. R=vasilyt@chromium.org, kylechar@chromium.org Bug: 1277772 Change-Id: I9972eff032cbf9d76a1f8c2770a0937322de8907 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3396605 Reviewed-by: Vasiliy Telezhnikov <vasilyt@chromium.org> Reviewed-by: Mike West <mkwst@chromium.org> Reviewed-by: Kyle Charbonneau <kylechar@chromium.org> Reviewed-by: Andrew Grieve <agrieve@chromium.org> Reviewed-by: Mason Freed <masonf@chromium.org> Reviewed-by: Chris Harrelson <chrishtr@chromium.org> Commit-Queue: Vladimir Levin <vmpstr@chromium.org> Cr-Commit-Position: refs/heads/main@{#961631}