mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-25 09:00:22 +00:00
LibWeb: Do not create Metal context when Skia painter is not enabled
This commit is contained in:
parent
ae983a2ef7
commit
70db2bff92
Notes:
sideshowbarker
2024-07-17 16:23:55 +09:00
Author: https://github.com/kalenikaliaksandr Commit: https://github.com/LadybirdBrowser/ladybird/commit/70db2bff92 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/428
1 changed files with 5 additions and 2 deletions
|
@ -29,8 +29,11 @@ TraversableNavigable::TraversableNavigable(JS::NonnullGCPtr<Page> page)
|
|||
, m_session_history_traversal_queue(vm().heap().allocate_without_realm<SessionHistoryTraversalQueue>())
|
||||
{
|
||||
#ifdef AK_OS_MACOS
|
||||
m_metal_context = Core::get_metal_context();
|
||||
m_skia_backend_context = Painting::DisplayListPlayerSkia::create_metal_context(*m_metal_context);
|
||||
auto display_list_player_type = page->client().display_list_player_type();
|
||||
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
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue