From c451232db5df75bd78954ce60d83156db07b1542 Mon Sep 17 00:00:00 2001 From: Dan Field Date: Fri, 19 Jan 2024 11:08:09 -0800 Subject: [PATCH] [Impeller] Documentation for SurfaceContextVK (flutter/engine#49882) See #44171 --- .../renderer/backend/vulkan/surface_context_vk.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/engine/src/flutter/impeller/renderer/backend/vulkan/surface_context_vk.h b/engine/src/flutter/impeller/renderer/backend/vulkan/surface_context_vk.h index 5c8a327685..5c144759e4 100644 --- a/engine/src/flutter/impeller/renderer/backend/vulkan/surface_context_vk.h +++ b/engine/src/flutter/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: