MCPcopy Create free account
hub / github.com/Tencent/libpag / onFrameAvailable

Method onFrameAvailable

src/rendering/PAGAnimator.cpp:78–89  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

76 std::vector<std::shared_ptr<PAGAnimator>> animators = {};
77
78 void onFrameAvailable() {
79 locker.lock();
80 auto listCopy = animators;
81 locker.unlock();
82 for (auto& animator : listCopy) {
83 if (animator.use_count() == 1) {
84 animator->cancelAnimation();
85 continue;
86 }
87 animator->advance();
88 }
89 }
90};
91
92std::shared_ptr<PAGAnimator> PAGAnimator::MakeFrom(std::weak_ptr<Listener> listener) {

Callers

nothing calls this directly

Calls 2

cancelAnimationMethod · 0.80
advanceMethod · 0.45

Tested by

no test coverage detected