mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-22 09:19:03 +00:00
ImageDecoder: Do not copy the vectors of decoded image data
This commit is contained in:
committed by
Sam Atkins
parent
03370dc76a
commit
51ad86f224
@@ -126,7 +126,7 @@ static ErrorOr<ConnectionFromClient::DecodeResult> 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::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, 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 {};
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user