Ladybird/AppKit: Support enabling the GPU painter

This commit is contained in:
Timothy Flynn 2023-12-01 12:32:33 -05:00 committed by Tim Flynn
parent 07e9a8f79b
commit 4c145fdb12
Notes: sideshowbarker 2024-07-17 06:51:10 +09:00

View file

@ -40,11 +40,13 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
Vector<StringView> raw_urls;
StringView webdriver_content_ipc_path;
bool use_gpu_painting = false;
Core::ArgsParser args_parser;
args_parser.set_general_help("The Ladybird web browser");
args_parser.add_positional_argument(raw_urls, "URLs to open", "url", Core::ArgsParser::Required::No);
args_parser.add_option(webdriver_content_ipc_path, "Path to WebDriver IPC for WebContent", "webdriver-content-path", 0, "path", Core::ArgsParser::OptionHideMode::CommandLineAndMarkdown);
args_parser.add_option(use_gpu_painting, "Enable GPU painting", "enable-gpu-painting", 0);
args_parser.parse(arguments);
auto sql_server_paths = TRY(get_paths_for_helper_process("SQLServer"sv));
@ -63,6 +65,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
initial_urls.append(new_tab_page_url);
Ladybird::WebContentOptions web_content_options {
.enable_gpu_painting = use_gpu_painting ? Ladybird::EnableGPUPainting::Yes : Ladybird::EnableGPUPainting::No,
.use_lagom_networking = Ladybird::UseLagomNetworking::Yes,
};