52 :
public std::enable_shared_from_this<AHBSwapchainImplVK> {
72 static std::shared_ptr<AHBSwapchainImplVK>
Create(
73 const std::weak_ptr<Context>& context,
74 std::weak_ptr<android::SurfaceControl> surface_control,
117 using AutoSemaSignaler = std::shared_ptr<fml::ScopedCleanupClosure>;
119 std::weak_ptr<android::SurfaceControl> surface_control_;
121 std::shared_ptr<AHBTexturePoolVK> pool_;
122 std::shared_ptr<SwapchainTransientsVK> transients_;
126 Mutex currently_displayed_texture_mutex_;
127 std::shared_ptr<AHBTextureSourceVK> currently_displayed_texture_
130 std::vector<std::unique_ptr<AHBFrameSynchronizerVK>> frame_data_;
131 size_t frame_index_ = 0;
133 bool is_valid_ =
false;
136 const std::weak_ptr<Context>& context,
137 std::weak_ptr<android::SurfaceControl> surface_control,
142 bool Present(
const std::shared_ptr<AHBTextureSourceVK>&
texture);
144 vk::UniqueSemaphore CreateRenderReadySemaphore(
145 const std::shared_ptr<fml::UniqueFD>& fd)
const;
147 bool ImportRenderReady(
148 const std::shared_ptr<fml::UniqueFD>& render_ready_fence,
149 const std::shared_ptr<AHBTextureSourceVK>&
texture);
151 std::shared_ptr<ExternalSemaphoreVK> SubmitSignalForPresentReady(
152 const std::shared_ptr<AHBTextureSourceVK>&
texture)
const;
154 void OnTextureUpdatedOnSurfaceControl(
155 std::shared_ptr<AHBTextureSourceVK>
texture,
156 ASurfaceTransactionStats* stats);
static std::shared_ptr< AHBSwapchainImplVK > Create(const std::weak_ptr< Context > &context, std::weak_ptr< android::SurfaceControl > surface_control, const CreateTransactionCB &cb, const ISize &size, bool enable_msaa)
Create a swapchain of a specific size whose images will be presented to the provided surface control.