mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-08 17:19:13 +00:00
LibGfx+LibWeb: Reuse DisplayListPlayer and PaintingSurface when possible
Previously, we were reinstantiating the DisplayListPlayer and PaintingSurface on every paint.
This commit is contained in:
parent
a4639b3d8e
commit
342cb7addf
Notes:
github-actions[bot]
2025-01-31 12:29:12 +00:00
Author: https://github.com/gmta
Commit: 342cb7addf
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3400
Reviewed-by: https://github.com/kalenikaliaksandr
12 changed files with 107 additions and 104 deletions
|
@ -41,6 +41,8 @@ void DisplayListPlayer::execute(DisplayList& display_list)
|
|||
auto const& scroll_state = display_list.scroll_state();
|
||||
auto device_pixels_per_css_pixel = display_list.device_pixels_per_css_pixel();
|
||||
|
||||
VERIFY(m_surface);
|
||||
|
||||
size_t next_command_index = 0;
|
||||
while (next_command_index < commands.size()) {
|
||||
auto scroll_frame_id = commands[next_command_index].scroll_frame_id;
|
||||
|
@ -128,6 +130,8 @@ void DisplayListPlayer::execute(DisplayList& display_list)
|
|||
else VERIFY_NOT_REACHED();
|
||||
// clang-format on
|
||||
}
|
||||
|
||||
flush();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue