Re: [csswg-drafts] [css-view-transitions-1] Display live image when element is outside the snapshot containing block in old state (#10587)

>  I'm not quite sure how that'd be implemented, since you'd have to clone layers and keep them in sync.

In Chromium we have a handle to the live texture which can be bound to multiple layers. So we can have the layer associated with the old pseudo use the live texture handle instead of a cached texture handle which currently happens.

> Could you clarify how this would be an optimization?

The desired optimization is to not force rendering and caching of old named elements which are offscreen. Currently as per spec, we have to do this even if the browser's normal rendering flow optimizes out paint/raster/compositing for offscreen content.

And in order to do this in the most web compat way, we have the old pseudo use the new live image. The browser can use the knowledge that the old/new pseudos are displaying live images to optimize away the default cross-fade. But if the author has some customization (like old slides to the left as new slides in from right), at least having some content in the old pseudo will not look completely broken.

You can read the detailed notes for how we concluded to this resolution here: https://github.com/w3c/csswg-drafts/issues/8282#issuecomment-2165842379 and here: https://github.com/w3c/csswg-drafts/issues/8282#issuecomment-2192185792.

Happy to hear any other suggestions!

-- 
GitHub Notification of comment by khushalsagar
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/pull/10587#issuecomment-2239613134 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Friday, 19 July 2024 16:39:18 UTC