mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-22 09:19:03 +00:00
LibWeb: Do not create Metal context when Skia painter is not enabled
This commit is contained in:
committed by
Andreas Kling
parent
ae983a2ef7
commit
70db2bff92
@@ -29,8 +29,11 @@ TraversableNavigable::TraversableNavigable(JS::NonnullGCPtr<Page> page)
|
|||||||
, m_session_history_traversal_queue(vm().heap().allocate_without_realm<SessionHistoryTraversalQueue>())
|
, m_session_history_traversal_queue(vm().heap().allocate_without_realm<SessionHistoryTraversalQueue>())
|
||||||
{
|
{
|
||||||
#ifdef AK_OS_MACOS
|
#ifdef AK_OS_MACOS
|
||||||
m_metal_context = Core::get_metal_context();
|
auto display_list_player_type = page->client().display_list_player_type();
|
||||||
m_skia_backend_context = Painting::DisplayListPlayerSkia::create_metal_context(*m_metal_context);
|
if (display_list_player_type == DisplayListPlayerType::Skia) {
|
||||||
|
m_metal_context = Core::get_metal_context();
|
||||||
|
m_skia_backend_context = Painting::DisplayListPlayerSkia::create_metal_context(*m_metal_context);
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user