51 :
public std::enable_shared_from_this<AHBSwapchainImplVK> {
71 static std::shared_ptr<AHBSwapchainImplVK>
Create(
72 const std::weak_ptr<Context>& context,
73 std::weak_ptr<android::SurfaceControl> surface_control,
116 using AutoSemaSignaler = std::shared_ptr<fml::ScopedCleanupClosure>;
118 std::weak_ptr<android::SurfaceControl> surface_control_;
120 std::shared_ptr<AHBTexturePoolVK> pool_;
121 std::shared_ptr<SwapchainTransientsVK> transients_;
125 Mutex currently_displayed_texture_mutex_;
126 std::shared_ptr<AHBTextureSourceVK> currently_displayed_texture_
129 std::vector<std::unique_ptr<AHBFrameSynchronizerVK>> frame_data_;
130 size_t frame_index_ = 0;
132 bool is_valid_ =
false;
135 const std::weak_ptr<Context>& context,
136 std::weak_ptr<android::SurfaceControl> surface_control,
141 bool Present(
const std::shared_ptr<AHBTextureSourceVK>&
texture);
143 vk::UniqueSemaphore CreateRenderReadySemaphore(
144 const std::shared_ptr<fml::UniqueFD>& fd)
const;
146 bool ImportRenderReady(
147 const std::shared_ptr<fml::UniqueFD>& render_ready_fence,
148 const std::shared_ptr<AHBTextureSourceVK>&
texture);
150 std::shared_ptr<ExternalSemaphoreVK> SubmitSignalForPresentReady(
151 const std::shared_ptr<AHBTextureSourceVK>&
texture)
const;
153 void OnTextureUpdatedOnSurfaceControl(
154 std::shared_ptr<AHBTextureSourceVK>
texture,
155 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.