LibWeb: Move display list command dispatch into player

With this change display list player will be able to recurse into
executing another display list, without having to construct new display
list player. It is going to be useful in the upcoming changes to paint
a mask from a display list owned by a command.
This commit is contained in:
Aliaksandr Kalenik 2024-07-24 16:48:32 +03:00 committed by Andreas Kling
commit e8b7c88881
Notes: github-actions[bot] 2024-07-25 12:34:47 +00:00
6 changed files with 41 additions and 33 deletions

View file

@ -1209,7 +1209,7 @@ void TraversableNavigable::paint(DevicePixelRect const& content_rect, Painting::
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);
display_list.execute(player);
player.execute(display_list);
return;
}
#endif
@ -1217,19 +1217,19 @@ void TraversableNavigable::paint(DevicePixelRect const& content_rect, Painting::
#ifdef USE_VULKAN
if (m_skia_backend_context) {
Painting::DisplayListPlayerSkia player(*m_skia_backend_context, target.bitmap());
display_list.execute(player);
player.execute(display_list);
return;
}
#endif
// Fallback to CPU backend if GPU is not available
Painting::DisplayListPlayerSkia player(target.bitmap());
display_list.execute(player);
player.execute(display_list);
break;
}
case DisplayListPlayerType::SkiaCPU: {
Painting::DisplayListPlayerSkia player(target.bitmap());
display_list.execute(player);
player.execute(display_list);
break;
}
default: