Conversation
|
I'm broadly onboard with this. It looks like there is work in vello_hybrid that might enable this there too? (linebender/vello#1869 ?) Some questions:
If we do a general abstraction I'd been keen to avoid an associated type (because dyn compatibility). |
It sure looks like it. IIRC there was also talk about this in vello. And maybe I will help it make it happen in the future.
I think it's better to emulate to keep stuff consistent and that is what current PR does. My hope is that in the future we will get this everywhere, so no emulation will be needed anymore.
Currently we have "localized" Preserve which means that we preserve content of output texture (even if blitted from intermediate texture), which I now realize might not be that useful if window uses swapchain (we get new/cleared texture for each frame), but one could use that to preserve content within frame (although one should probably not do this) or by manually blitting. We could make it into "Global" preserve by using intermediate texture, but then we get the question of how to clear it (let it to the user?). I think |
Based on the idea from #29 (comment)
Most backends already had some form of this logic so I think it just makes sense. Only vello and vello_hybrid needed additional work for preserve, skia and vello_cpu implements it naturally.
Draft because it needs tests? As far as I can tell there is no way to do asser expect image tests.