From 7df4674f948f28f89823b4dbbf25a3dcbbc7817f Mon Sep 17 00:00:00 2001 From: Jonah Williams Date: Tue, 20 Feb 2024 09:29:19 -0800 Subject: [PATCH] [Impeller] add missing std::move in setup depth stencil. (flutter/engine#50750) We copy the std::shared_ptr since both the stencil and depth attachments need to reference this shared ptr. The second usage can still be moved to avoid a shared_ptr release. --- engine/src/flutter/impeller/renderer/render_target.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engine/src/flutter/impeller/renderer/render_target.cc b/engine/src/flutter/impeller/renderer/render_target.cc index 89d1225ebd..59ffc41b02 100644 --- a/engine/src/flutter/impeller/renderer/render_target.cc +++ b/engine/src/flutter/impeller/renderer/render_target.cc @@ -394,7 +394,7 @@ void RenderTarget::SetupDepthStencilAttachments( stencil0.load_action = stencil_attachment_config.load_action; stencil0.store_action = stencil_attachment_config.store_action; stencil0.clear_stencil = 0u; - stencil0.texture = depth_stencil_texture; + stencil0.texture = std::move(depth_stencil_texture); stencil0.texture->SetLabel( SPrintF("%s Depth+Stencil Texture", label.c_str()));