You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 25, 2025. It is now read-only.
[Impeller] Refactor KHR swapchains to make it easy to reuse backend agnostic components. (#52002)
Just a refactor to make room for the AHB swapchains implementation while also ensuring that the MSAA and depth-stencil transients memoization as well as the existing surface implementation can be reused by that swapchain backend.
This does a few major things:
* Make an abstract implementation of swapchains, SwapchainVK. This currently has KHRSwapchainVK as its sole subclass but will soon have AHBSwapchainVK.
* There is no more per swapchain backend memoization of the MSAA and depth-stencil textures. This is now moved to SwapchainTransientsVK and can be shared by both backend. This leads into the next change. This also avoids the round trip of the textures first being set on each swapchain image and then accessed to create the onscreen renderpass. Now the transients can access the textures directly.
* KHRSurfaceVK no longer wraps a KHRSwapchainImageVK. Instead, it deals with TextureSourceVKs (which used to be the base class of KHRSwapchainImageVK). This surface can now magically work with AHBTextureSourceVK since they have a common base class. Since the surface is now backend agnostic, it has been renamed to SurfaceVK.
There is one minor functional change over the previous implementation thought. Earlier, the transients would be created and cached when the swapchain was resized. Now, the same will happen when the first surface frame is attempted to be acquired at the new size. This effectively means that swapchain resized should be faster and do less work if no frames are rendered at the new size (continuous window resized maybe).
0 commit comments