MCPcopy Create free account
hub / github.com/Snapchat/Valdi / removeAnimation

Method removeAnimation

snap_drawing/src/snap_drawing/cpp/Layers/Layer.cpp:676–690  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

674
675void Layer::addAnimation(const String& key, const Ref<IAnimation>& animation) {
676 removeAnimation(key);
677 {
678 (*_animations.writeAccess())[key] = animation;
679 }
680 scheduleProcessAnimationsIfNeeded();
681}
682
683void Layer::removeAnimation(const String& key) {
684 Ref<IAnimation> animation;
685 {
686 auto animations = _animations.writeAccess();
687 const auto& it = animations->find(key);
688 if (it != animations->end()) {
689 animation = std::move(it->second);
690 animations->erase(it);
691 }
692 }
693

Callers 2

cancelMethod · 0.80

Calls 5

endMethod · 0.65
cancelMethod · 0.65
writeAccessMethod · 0.45
findMethod · 0.45
eraseMethod · 0.45

Tested by

no test coverage detected