Services/ImageDecoder: Move bitmaps instead of copying them

Manual cherry-pick of the second change in
LadybirdBrowser/ladybird@51ad86f, the first part was already done
independently in this repo in b499dc18.
This commit is contained in:
Lucas CHOLLET authored and Nico Weber committed 2025-03-06 18:33:50 -05:00
1 parent b9cde9c206
commit 6452f843b6
1 file changed
+1 -1
@@ -97,7 +97,7 @@ NonnullRefPtr<ConnectionFromClient::Job> 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<void> {
strong_this->async_did_decode_image(image_id, result.is_animated, result.loop_count, result.bitmaps, result.durations, result.scale);
strong_this->async_did_decode_image(image_id, result.is_animated, result.loop_count, move(result.bitmaps), move(result.durations), result.scale);
strong_this->m_pending_jobs.remove(image_id);
return {};
},