Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

[Impeller] Fix use-after-move in SwapchainVK. #52933

Merged
merged 2 commits into from
May 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ bool AHBSwapchainVK::IsAvailableOnPlatform() {

AHBSwapchainVK::AHBSwapchainVK(const std::shared_ptr<Context>& context,
ANativeWindow* window,
vk::UniqueSurfaceKHR surface,
const vk::UniqueSurfaceKHR& surface,
const ISize& size,
bool enable_msaa)
: context_(context),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class AHBSwapchainVK final : public SwapchainVK {

explicit AHBSwapchainVK(const std::shared_ptr<Context>& context,
ANativeWindow* window,
vk::UniqueSurfaceKHR surface,
const vk::UniqueSurfaceKHR& surface,
const ISize& size,
bool enable_msaa);
};
Expand Down
2 changes: 1 addition & 1 deletion impeller/renderer/backend/vulkan/swapchain/swapchain_vk.cc
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ std::shared_ptr<SwapchainVK> SwapchainVK::Create(
auto ahb_swapchain = std::shared_ptr<AHBSwapchainVK>(new AHBSwapchainVK(
context, //
window.GetHandle(), //
std::move(surface), //
surface, //
window.GetSize(), //
enable_msaa //
));
Expand Down