mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-21 12:05:15 +00:00
LibWeb: Remove MetalContext from TraversableNavigable
There's no need for TraversableNavigable to keep track of the MetalContext; our SkiaBackendContext keeps a reference to it.
This commit is contained in:
parent
738cb24691
commit
20fbd38b77
Notes:
github-actions[bot]
2025-01-31 12:29:46 +00:00
Author: https://github.com/gmta Commit: https://github.com/LadybirdBrowser/ladybird/commit/20fbd38b77b Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3400 Reviewed-by: https://github.com/kalenikaliaksandr
2 changed files with 4 additions and 8 deletions
|
@ -30,9 +30,9 @@ TraversableNavigable::TraversableNavigable(GC::Ref<Page> page)
|
|||
{
|
||||
#ifdef AK_OS_MACOS
|
||||
auto display_list_player_type = page->client().display_list_player_type();
|
||||
if (display_list_player_type == DisplayListPlayerType::SkiaGPUIfAvailable) {
|
||||
m_metal_context = Gfx::get_metal_context();
|
||||
m_skia_backend_context = Gfx::SkiaBackendContext::create_metal_context(*m_metal_context);
|
||||
if (display_list_player_type == DisplayListPlayerType::SkiaGPUIfAvailable)
|
||||
auto metal_context = Gfx::get_metal_context();
|
||||
m_skia_backend_context = Gfx::SkiaBackendContext::create_metal_context(*metal_context);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -1402,7 +1402,7 @@ void TraversableNavigable::paint(DevicePixelRect const& content_rect, Painting::
|
|||
switch (page().client().display_list_player_type()) {
|
||||
case DisplayListPlayerType::SkiaGPUIfAvailable: {
|
||||
#ifdef AK_OS_MACOS
|
||||
if (m_metal_context && m_skia_backend_context && is<Painting::IOSurfaceBackingStore>(target)) {
|
||||
if (m_skia_backend_context && is<Painting::IOSurfaceBackingStore>(target)) {
|
||||
auto& iosurface_backing_store = static_cast<Painting::IOSurfaceBackingStore&>(target);
|
||||
auto painting_surface = Gfx::PaintingSurface::wrap_iosurface(iosurface_backing_store.iosurface_handle(), *m_skia_backend_context);
|
||||
Painting::DisplayListPlayerSkia player(*m_skia_backend_context, painting_surface);
|
||||
|
|
|
@ -155,10 +155,6 @@ private:
|
|||
String m_window_handle;
|
||||
|
||||
RefPtr<Gfx::SkiaBackendContext> m_skia_backend_context;
|
||||
|
||||
#ifdef AK_OS_MACOS
|
||||
RefPtr<Gfx::MetalContext> m_metal_context;
|
||||
#endif
|
||||
};
|
||||
|
||||
struct BrowsingContextAndDocument {
|
||||
|
|
Loading…
Add table
Reference in a new issue