mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-22 10:19:20 +00:00
ImageDecoder: Do not copy the vectors of decoded image data
This commit is contained in:
parent
03370dc76a
commit
51ad86f224
Notes:
github-actions[bot]
2025-02-10 16:07:01 +00:00
Author: https://github.com/trflynn89
Commit: 51ad86f224
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3519
Reviewed-by: https://github.com/AtkinsSJ ✅
Reviewed-by: https://github.com/shannonbooth
1 changed files with 2 additions and 2 deletions
|
@ -126,7 +126,7 @@ static ErrorOr<ConnectionFromClient::DecodeResult> decode_image_to_details(Core:
|
||||||
if (bitmaps.is_empty())
|
if (bitmaps.is_empty())
|
||||||
return Error::from_string_literal("Could not decode image");
|
return Error::from_string_literal("Could not decode image");
|
||||||
|
|
||||||
result.bitmaps = Gfx::BitmapSequence { bitmaps };
|
result.bitmaps = Gfx::BitmapSequence { move(bitmaps) };
|
||||||
|
|
||||||
return result;
|
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));
|
return TRY(decode_image_to_details(encoded_buffer, ideal_size, mime_type));
|
||||||
},
|
},
|
||||||
[strong_this = NonnullRefPtr(*this), image_id](DecodeResult result) -> ErrorOr<void> {
|
[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);
|
strong_this->m_pending_jobs.remove(image_id);
|
||||||
return {};
|
return {};
|
||||||
},
|
},
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue