1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-30 19:48:12 +00:00

Ladybird+WebContent: Add option to use GPU painter

Adds `--enable-gpu-painting` param to enable painting command executor
that uses LibAccelGfx.
This commit is contained in:
Aliaksandr Kalenik 2023-10-27 17:28:18 +02:00 committed by Andreas Kling
parent 7d26cbf523
commit b6732b0234
17 changed files with 63 additions and 17 deletions

View file

@ -73,13 +73,20 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
int webcontent_fd_passing_socket { -1 };
bool is_layout_test_mode = false;
bool use_lagom_networking = false;
bool use_gpu_painting = false;
Core::ArgsParser args_parser;
args_parser.add_option(webcontent_fd_passing_socket, "File descriptor of the passing socket for the WebContent connection", "webcontent-fd-passing-socket", 'c', "webcontent_fd_passing_socket");
args_parser.add_option(is_layout_test_mode, "Is layout test mode", "layout-test-mode", 0);
args_parser.add_option(use_lagom_networking, "Enable Lagom servers for networking", "use-lagom-networking", 0);
args_parser.add_option(use_gpu_painting, "Enable GPU painting", "use-gpu-painting", 0);
args_parser.parse(arguments);
if (use_gpu_painting) {
WebContent::PageHost::set_use_gpu_painter();
}
#if defined(HAVE_QT)
if (!use_lagom_networking) {
Web::ResourceLoader::initialize(Ladybird::RequestManagerQt::create());