cca86f386c
Instead of a flat animator space, introduce animator groups. This allows us to encapsulate layer animators and only dispatch ticks when their owning layer is active. TBR= Change-Id: I1fc8a55abf68a712b71969bb1a11275dbe54c236 Reviewed-on: https://skia-review.googlesource.com/101201 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Florin Malita <fmalita@chromium.org>
30 lines
741 B
C++
30 lines
741 B
C++
/*
|
|
* Copyright 2017 Google Inc.
|
|
*
|
|
* Use of this source code is governed by a BSD-style license that can be
|
|
* found in the LICENSE file.
|
|
*/
|
|
|
|
#ifndef SkottieAnimator_DEFINED
|
|
#define SkottieAnimator_DEFINED
|
|
|
|
#include "SkSGScene.h"
|
|
|
|
#include <functional>
|
|
|
|
namespace Json { class Value; }
|
|
|
|
namespace skottie {
|
|
|
|
// This is the workhorse for property binding: depending on whether the property is animated,
|
|
// it will either apply immediately or instantiate and attach a keyframe animator.
|
|
template <typename T>
|
|
bool BindProperty(const Json::Value&,
|
|
sksg::AnimatorList*,
|
|
std::function<void(const T&)>&&,
|
|
const T* noop = nullptr);
|
|
|
|
} // namespace skottie
|
|
|
|
#endif // SkottieAnimator_DEFINED
|