mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-10 01:59:31 +00:00
Everywhere: Transition ImageDecoder to be single-instance, owned by UI
This is the same behavior as RequestServer, with the added benefit that we know how to gracefully reconnect ImageDecoder to all WebContent processes on restart.
This commit is contained in:
parent
343a3a0d7e
commit
4b5541e1b7
Notes:
sideshowbarker
2024-07-17 00:59:43 +09:00
Author: https://github.com/ADKaster
Commit: 4b5541e1b7
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/284
Reviewed-by: https://github.com/kalenikaliaksandr
Reviewed-by: https://github.com/trflynn89
21 changed files with 250 additions and 31 deletions
|
@ -549,8 +549,11 @@ void WebContentView::initialize_client(WebView::ViewImplementation::CreateNewCli
|
|||
request_server_socket = AK::move(socket);
|
||||
}
|
||||
|
||||
auto image_decoder = static_cast<Ladybird::Application*>(QApplication::instance())->image_decoder_client();
|
||||
auto image_decoder_socket = connect_new_image_decoder_client(*image_decoder).release_value_but_fixme_should_propagate_errors();
|
||||
|
||||
auto candidate_web_content_paths = get_paths_for_helper_process("WebContent"sv).release_value_but_fixme_should_propagate_errors();
|
||||
auto new_client = launch_web_content_process(*this, candidate_web_content_paths, m_web_content_options, AK::move(request_server_socket)).release_value_but_fixme_should_propagate_errors();
|
||||
auto new_client = launch_web_content_process(*this, candidate_web_content_paths, m_web_content_options, AK::move(image_decoder_socket), AK::move(request_server_socket)).release_value_but_fixme_should_propagate_errors();
|
||||
|
||||
m_client_state.client = new_client;
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue