mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-07 17:15:26 +00:00
Userland: Remove remaining callers of synchronous ImageDecoder API
Most of these now just await the image decoding, equivalent (ish) to the old behavior. A more async-aware refactor should happen some time in the future.
This commit is contained in:
committed by
Andrew Kaster
parent
651e78fedb
commit
1c3f11a5a6
@@ -60,16 +60,6 @@ NonnullRefPtr<Core::Promise<DecodedImage>> Client::decode_image(ReadonlyBytes en
|
||||
return promise;
|
||||
}
|
||||
|
||||
Optional<DecodedImage> Client::decode_image(ReadonlyBytes encoded_data, Optional<Gfx::IntSize> ideal_size, Optional<ByteString> mime_type)
|
||||
{
|
||||
auto promise = decode_image(
|
||||
encoded_data, [](auto) -> ErrorOr<void> { return {}; }, [](Error&) -> void {}, ideal_size, mime_type);
|
||||
auto result = promise->await();
|
||||
if (result.is_error())
|
||||
return {};
|
||||
return result.release_value();
|
||||
}
|
||||
|
||||
void Client::did_decode_image(i64 image_id, bool is_animated, u32 loop_count, Vector<Gfx::ShareableBitmap> const& bitmaps, Vector<u32> const& durations, Gfx::FloatPoint scale)
|
||||
{
|
||||
VERIFY(!bitmaps.is_empty());
|
||||
|
||||
Reference in New Issue
Block a user