diff --git a/impeller/renderer/backend/vulkan/surface_context_vk.h b/impeller/renderer/backend/vulkan/surface_context_vk.h index 5c8a327685dba..5c144759e480c 100644 --- a/impeller/renderer/backend/vulkan/surface_context_vk.h +++ b/impeller/renderer/backend/vulkan/surface_context_vk.h @@ -17,6 +17,16 @@ class ContextVK; class Surface; class SwapchainVK; +/// For Vulkan, there is both a ContextVK that implements Context and a +/// SurfaceContextVK that also implements Context and takes a ContextVK as its +/// parent. There is a one to many relationship between ContextVK and +/// SurfaceContextVK. +/// +/// Most operations in this class are delegated to the parent ContextVK. +/// This class specifically manages swapchains and creation of VkSurfaces on +/// Android. By maintaining the swapchain this way, it is possible to have +/// multiple surfaces sharing the same ContextVK without stepping on each +/// other's swapchains. class SurfaceContextVK : public Context, public BackendCast { public: