From 51ad86f22412a3d2ef9fce01ffc5a26cb6f6f0ac Mon Sep 17 00:00:00 2001 From: Timothy Flynn Date: Sun, 9 Feb 2025 11:08:05 -0500 Subject: [PATCH] ImageDecoder: Do not copy the vectors of decoded image data --- Services/ImageDecoder/ConnectionFromClient.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Services/ImageDecoder/ConnectionFromClient.cpp b/Services/ImageDecoder/ConnectionFromClient.cpp index 67e4b600f9d..9da8bbf6190 100644 --- a/Services/ImageDecoder/ConnectionFromClient.cpp +++ b/Services/ImageDecoder/ConnectionFromClient.cpp @@ -126,7 +126,7 @@ static ErrorOr decode_image_to_details(Core: if (bitmaps.is_empty()) return Error::from_string_literal("Could not decode image"); - result.bitmaps = Gfx::BitmapSequence { bitmaps }; + result.bitmaps = Gfx::BitmapSequence { move(bitmaps) }; return result; } @@ -138,7 +138,7 @@ NonnullRefPtr ConnectionFromClient::make_decode_image return TRY(decode_image_to_details(encoded_buffer, ideal_size, mime_type)); }, [strong_this = NonnullRefPtr(*this), image_id](DecodeResult result) -> ErrorOr { - strong_this->async_did_decode_image(image_id, result.is_animated, result.loop_count, result.bitmaps, result.durations, result.scale, result.color_profile); + strong_this->async_did_decode_image(image_id, result.is_animated, result.loop_count, move(result.bitmaps), move(result.durations), result.scale, move(result.color_profile)); strong_this->m_pending_jobs.remove(image_id); return {}; },