LibGfx+LibWeb: Introduce PaintingSurface that wraps SkSurface from Skia

Adds a new class in LibGfx that represents GPU-accelerated surface and
will be used for both <canvas> and page rendering (display list player).
This commit is contained in:
Aliaksandr Kalenik
2024-09-25 15:42:15 +02:00
committed by Alexander Kalenik
parent 5c1f6bf8ee
commit 25f264b7e7
8 changed files with 227 additions and 85 deletions

View File

@@ -1402,7 +1402,8 @@ void TraversableNavigable::paint(DevicePixelRect const& content_rect, Painting::
if (m_metal_context && m_skia_backend_context && is<Painting::IOSurfaceBackingStore>(target)) {
auto& iosurface_backing_store = static_cast<Painting::IOSurfaceBackingStore&>(target);
auto texture = m_metal_context->create_texture_from_iosurface(iosurface_backing_store.iosurface_handle());
Painting::DisplayListPlayerSkia player(*m_skia_backend_context, *texture);
auto painting_surface = Gfx::PaintingSurface::wrap_metal_surface(*texture, m_skia_backend_context);
Painting::DisplayListPlayerSkia player(*m_skia_backend_context, painting_surface);
player.execute(*display_list);
return;
}