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

Commit ce0794b

Browse files
authored
[Impeller] Fix use-after-move in SwapchainVK. (#52933)
Fix lint encountered in #52932.
1 parent c2ef01f commit ce0794b

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

impeller/renderer/backend/vulkan/swapchain/ahb/ahb_swapchain_vk.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ bool AHBSwapchainVK::IsAvailableOnPlatform() {
1919

2020
AHBSwapchainVK::AHBSwapchainVK(const std::shared_ptr<Context>& context,
2121
ANativeWindow* window,
22-
vk::UniqueSurfaceKHR surface,
22+
const vk::UniqueSurfaceKHR& surface,
2323
const ISize& size,
2424
bool enable_msaa)
2525
: context_(context),

impeller/renderer/backend/vulkan/swapchain/ahb/ahb_swapchain_vk.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ class AHBSwapchainVK final : public SwapchainVK {
5757

5858
explicit AHBSwapchainVK(const std::shared_ptr<Context>& context,
5959
ANativeWindow* window,
60-
vk::UniqueSurfaceKHR surface,
60+
const vk::UniqueSurfaceKHR& surface,
6161
const ISize& size,
6262
bool enable_msaa);
6363
};

impeller/renderer/backend/vulkan/swapchain/swapchain_vk.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ std::shared_ptr<SwapchainVK> SwapchainVK::Create(
6767
auto ahb_swapchain = std::shared_ptr<AHBSwapchainVK>(new AHBSwapchainVK(
6868
context, //
6969
window.GetHandle(), //
70-
std::move(surface), //
70+
surface, //
7171
window.GetSize(), //
7272
enable_msaa //
7373
));

0 commit comments

Comments
 (0)