mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-02 00:13:02 +00: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:
parent
15103d172c
commit
42bc83a9d0
Notes:
github-actions[bot]
2025-03-27 17:48:21 +00:00
Author: https://github.com/Lubrsi
Commit: 42bc83a9d0
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4121
2 changed files with 33 additions and 2 deletions
|
@ -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));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue