Skip to content

Commit

Permalink
Avoid HashSet copy in DocumentTimeline::applyPendingAcceleratedAnimat…
Browse files Browse the repository at this point in the history
…ions()

https://bugs.webkit.org/show_bug.cgi?id=254308

Reviewed by Ryosuke Niwa.

* Source/WebCore/animation/DocumentTimeline.cpp:
(WebCore::DocumentTimeline::applyPendingAcceleratedAnimations):

Canonical link: https://commits.webkit.org/262007@main
  • Loading branch information
cdumez committed Mar 23, 2023
1 parent e049610 commit 821a561
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions Source/WebCore/animation/DocumentTimeline.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -412,8 +412,7 @@ void DocumentTimeline::applyPendingAcceleratedAnimations()
}
#endif

auto acceleratedAnimationsPendingRunningStateChange = m_acceleratedAnimationsPendingRunningStateChange;
m_acceleratedAnimationsPendingRunningStateChange.clear();
auto acceleratedAnimationsPendingRunningStateChange = std::exchange(m_acceleratedAnimationsPendingRunningStateChange, { });

bool hasForcedLayout = false;
for (auto& animation : acceleratedAnimationsPendingRunningStateChange) {
Expand Down

0 comments on commit 821a561

Please sign in to comment.