Everywhere: Use Skia painter by default

Skia painter is visibly faster than LibGfx painter and has more complete
CSS transforms support. With this change:
- On Linux, it will try to use Vulkan-backend with fallback to
  CPU-backend
- On macOS it will try to use Metal-backend with fallback to
  CPU-backend
- headless-browser always runs with CPU-backend in layout mode
This commit is contained in:
Aliaksandr Kalenik
2024-07-19 16:42:14 +02:00
committed by Andreas Kling
parent 9851176c25
commit 3627329bed
44 changed files with 7 additions and 28 deletions

View File

@@ -136,10 +136,8 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
Web::set_chrome_process_command_line(command_line);
Web::set_chrome_process_executable_path(executable_path);
if (use_skia_painter) {
// Always use the CPU backend for layout tests, as the GPU backend is not deterministic
WebContent::PageClient::set_use_skia_painter(is_layout_test_mode ? WebContent::PageClient::UseSkiaPainter::CPUBackend : WebContent::PageClient::UseSkiaPainter::GPUBackendIfAvailable);
}
// Always use the CPU backend for layout tests, as the GPU backend is not deterministic
WebContent::PageClient::set_use_skia_painter(is_layout_test_mode ? WebContent::PageClient::UseSkiaPainter::CPUBackend : WebContent::PageClient::UseSkiaPainter::GPUBackendIfAvailable);
if (enable_http_cache) {
Web::Fetch::Fetching::g_http_cache_enabled = true;