LibWeb: Skip queuing a rendering task if task queue already contains it

If, by the time we need to schedule rendering of the next frame, the
previous one is still not processed, we could skip it instead of growing
task queue.

Should help with https://github.com/LadybirdBrowser/ladybird/issues/1647
This commit is contained in:
Aliaksandr Kalenik 2024-10-06 15:16:35 +02:00 committed by Alexander Kalenik
commit 908455ab06
Notes: github-actions[bot] 2024-10-06 14:26:28 +00:00
3 changed files with 15 additions and 0 deletions

View file

@ -23,6 +23,7 @@ public:
bool is_empty() const { return m_tasks.is_empty(); }
bool has_runnable_tasks() const;
bool has_rendering_tasks() const;
void add(JS::NonnullGCPtr<HTML::Task>);
JS::GCPtr<HTML::Task> take_first_runnable();