This is not on main yet, but I've heavily reworked how offscreening works in niri.
Offscreening is when you render a group of elements to a separate texture, then draw that texture to the final render. In niri it's used for window opening and resize animations, and now also for full-tile opacity changes.
Before, it was very simple: every frame create a new texture and render it from scratch. The new code caches textures and does full damage tracking both "inside" and "outside" the offscreen.