mirror of
https://github.com/servo/servo.git
synced 2025-09-30 00:29:14 +01:00
script: Integrate animated image updates into ScriptThread
event loop (#38941)
Instead of manually triggering `ScriptThread::update_the_rendering`, have animated images trigger rendering updates via the `ScriptThread` event loop. This should result in fewer calls to `ScriptThread::update_the_rendering`. Testing: This should not change behavior and is thus covered by existing tests. Signed-off-by: Martin Robinson <mrobinson@igalia.com> Co-authored-by: Mukilan Thiyagarajan <mukilan@igalia.com>
This commit is contained in:
parent
e7a963cca0
commit
87fe202ded
6 changed files with 90 additions and 74 deletions
|
@ -76,10 +76,6 @@ impl Animations {
|
|||
self.pending_events.borrow_mut().clear();
|
||||
}
|
||||
|
||||
pub(crate) fn animations_present(&self) -> bool {
|
||||
self.has_running_animations.get() || !self.pending_events.borrow().is_empty()
|
||||
}
|
||||
|
||||
// Mark all animations dirty, if they haven't been marked dirty since the
|
||||
// specified `current_timeline_value`. Returns true if animations were marked
|
||||
// dirty or false otherwise.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue