aboutsummaryrefslogtreecommitdiffhomepage
path: root/experimental/sksg/SkSGScene.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'experimental/sksg/SkSGScene.cpp')
-rw-r--r--experimental/sksg/SkSGScene.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/experimental/sksg/SkSGScene.cpp b/experimental/sksg/SkSGScene.cpp
index 85a1b43b1c..8d7e0b369b 100644
--- a/experimental/sksg/SkSGScene.cpp
+++ b/experimental/sksg/SkSGScene.cpp
@@ -22,6 +22,15 @@ void Animator::tick(float t) {
this->onTick(t);
}
+GroupAnimator::GroupAnimator(AnimatorList&& animators)
+ : fAnimators(std::move(animators)) {}
+
+void GroupAnimator::onTick(float t) {
+ for (const auto& a : fAnimators) {
+ a->tick(t);
+ }
+}
+
std::unique_ptr<Scene> Scene::Make(sk_sp<RenderNode> root, AnimatorList&& anims) {
return root ? std::unique_ptr<Scene>(new Scene(std::move(root), std::move(anims))) : nullptr;
}