[Impeller] Documentation for SurfaceContextVK (flutter/engine#49882)

See #44171
This commit is contained in:
Dan Field
2024-01-19 11:08:09 -08:00
committed by GitHub
parent 4e8fee2701
commit c451232db5

View File

@@ -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<SurfaceContextVK, Context> {
public: