mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 01:35:08 +02:00
LibWebView+WebWorker: Attach an image decoder to worker instances
The createImageBitmap API can programmatically decode arbitrary images from JS, and it's exposed in Workers, so they need an ImageDecoder instance.
This commit is contained in:
committed by
Andreas Kling
parent
15103d172c
commit
42bc83a9d0
Notes:
github-actions[bot]
2025-03-27 17:48:21 +00:00
Author: https://github.com/Lubrsi Commit: https://github.com/LadybirdBrowser/ladybird/commit/42bc83a9d07 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4121
@@ -171,9 +171,13 @@ ErrorOr<NonnullRefPtr<Web::HTML::WebWorkerClient>> launch_web_worker_process()
|
||||
{
|
||||
Vector<ByteString> arguments;
|
||||
|
||||
auto socket = TRY(connect_new_request_server_client());
|
||||
auto request_server_socket = TRY(connect_new_request_server_client());
|
||||
arguments.append("--request-server-socket"sv);
|
||||
arguments.append(ByteString::number(socket.fd()));
|
||||
arguments.append(ByteString::number(request_server_socket.fd()));
|
||||
|
||||
auto image_decoder_socket = TRY(connect_new_image_decoder_client());
|
||||
arguments.append("--image-decoder-socket"sv);
|
||||
arguments.append(ByteString::number(image_decoder_socket.fd()));
|
||||
|
||||
return launch_server_process<Web::HTML::WebWorkerClient>("WebWorker"sv, move(arguments));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user