LibWeb: Skip painter allocation for a navigable created for SVG
Some checks are pending
Lint Code / lint (push) Waiting to run
CI / Lagom (arm64, Sanitizer_CI, false, macOS, macos-15, Clang) (push) Waiting to run
CI / Lagom (x86_64, Fuzzers_CI, false, Linux, blacksmith-16vcpu-ubuntu-2404, Clang) (push) Waiting to run
CI / Lagom (x86_64, Sanitizer_CI, false, Linux, blacksmith-16vcpu-ubuntu-2404, GNU) (push) Waiting to run
CI / Lagom (x86_64, Sanitizer_CI, true, Linux, blacksmith-16vcpu-ubuntu-2404, Clang) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (arm64, macOS, macOS-arm64, macos-15) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (x86_64, Linux, Linux-x86_64, blacksmith-8vcpu-ubuntu-2404) (push) Waiting to run
Run test262 and test-wasm / run_and_update_results (push) Waiting to run
Label PRs with merge conflicts / auto-labeler (push) Waiting to run
Push notes / build (push) Waiting to run

Traversable navigable created for rendering svg element doesn't perform
any actual rendering, so there is no need to allocate a painter for it.
This commit is contained in:
Aliaksandr Kalenik 2025-06-05 23:06:16 +02:00 committed by Alexander Kalenik
parent ed1337add1
commit 859991ca7b
Notes: github-actions[bot] 2025-06-06 01:57:56 +00:00

View file

@ -52,16 +52,16 @@ TraversableNavigable::TraversableNavigable(GC::Ref<Page> page)
: Navigable(page)
, m_session_history_traversal_queue(vm().heap().allocate<SessionHistoryTraversalQueue>())
{
auto display_list_player_type = page->client().display_list_player_type();
OwnPtr<Painting::DisplayListPlayerSkia> skia_player;
if (display_list_player_type == DisplayListPlayerType::SkiaGPUIfAvailable) {
m_skia_backend_context = get_skia_backend_context();
skia_player = make<Painting::DisplayListPlayerSkia>(m_skia_backend_context);
} else {
skia_player = make<Painting::DisplayListPlayerSkia>();
}
if (!page->client().is_svg_page_client()) {
auto display_list_player_type = page->client().display_list_player_type();
OwnPtr<Painting::DisplayListPlayerSkia> skia_player;
if (display_list_player_type == DisplayListPlayerType::SkiaGPUIfAvailable) {
m_skia_backend_context = get_skia_backend_context();
skia_player = make<Painting::DisplayListPlayerSkia>(m_skia_backend_context);
} else {
skia_player = make<Painting::DisplayListPlayerSkia>();
}
m_rendering_thread.set_skia_player(move(skia_player));
m_rendering_thread.set_skia_backend_context(m_skia_backend_context);
m_rendering_thread.start(display_list_player_type);