1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-24 01:05:08 +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

@ -10,7 +10,8 @@ ErrorOr<NonnullRefPtr<WebView::WebContentClient>> launch_web_content_process(Web
ReadonlySpan<String> candidate_web_content_paths,
WebView::EnableCallgrindProfiling enable_callgrind_profiling,
WebView::IsLayoutTestMode is_layout_test_mode,
Ladybird::UseLagomNetworking use_lagom_networking)
Ladybird::UseLagomNetworking use_lagom_networking,
WebView::EnableGPUPainting enable_gpu_painting)
{
int socket_fds[2] {};
TRY(Core::System::socketpair(AF_LOCAL, SOCK_STREAM, 0, socket_fds));
@ -54,6 +55,8 @@ ErrorOr<NonnullRefPtr<WebView::WebContentClient>> launch_web_content_process(Web
arguments.append("--layout-test-mode"sv);
if (use_lagom_networking == Ladybird::UseLagomNetworking::Yes)
arguments.append("--use-lagom-networking"sv);
if (enable_gpu_painting == WebView::EnableGPUPainting::Yes)
arguments.append("--use-gpu-painting"sv);
result = Core::System::exec(arguments[0], arguments.span(), Core::System::SearchInPath::Yes);
if (!result.is_error())