mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-04 07:09:47 +00:00
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:
parent
5a796629c6
commit
e8b7c88881
Notes:
github-actions[bot]
2024-07-25 12:34:47 +00:00
Author: https://github.com/kalenikaliaksandr
Commit: e8b7c88881
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/826
6 changed files with 41 additions and 33 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue