| Commit-Queue | +1 |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
if (timeline_->IsMonotonicallyIncreasing()) {Worth adding a comment here. Historically, OnValidateSnapshot was for scroll timelines, and now we have separate logic for scroll triggering with a monotonic timeline (though most of the logic is consistent).
Documentation for this method in the header file only mentions scroll timelines. Suggesting that we update the comment in the header file, and add a note here where we have the branching logic.
animations.erase(animation);We are effectively forcing the hashset to be copied just so we can remove elements from the map. AnimationTimeline::GetAnimations returns a const ref.
An SDA animation will be doing extra work here. because of the potential for animation triggers. Instead can we do the following:
```
const HeapHashSet<WeakMember<Animation>>& animations = GetAnimations();
if (Runtime...) {
...
for (auto& [animation, behaviors] : trigger-BehaviorMap()) {
DCHECK(...);
// Avoid superfluous snapshot validation, by skipping the call if it will
// be invoked in the loop below.
if (!animations.Contains(animation)) {
animation->OnValidateSnapshot(true);
}
}
}
```
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |