8#ifndef SkottieUtils_DEFINED
9#define SkottieUtils_DEFINED
19#include <unordered_map>
55 const char* prefix =
nullptr);
85 const std::vector<MarkerInfo>&
markers()
const {
return fMarkers; }
94 class PropertyInterceptor;
95 class MarkerInterceptor;
97 std::string acceptKey(
const char*,
const char*)
const;
100 using PropGroup = std::vector<std::unique_ptr<T>>;
102 template <
typename T>
103 using PropMap = std::unordered_map<PropKey, PropGroup<T>>;
105 template <
typename T>
106 std::vector<PropKey> getProps(
const PropMap<T>& container)
const;
108 template <
typename V,
typename T>
109 V get(
const PropKey&,
const PropMap<T>& container)
const;
111 template <
typename T>
112 std::unique_ptr<T> getHandle(
const PropKey&,
size_t,
const PropMap<T>& container)
const;
114 template <
typename V,
typename T>
115 bool set(
const PropKey&,
const V&,
const PropMap<T>& container);
123 PropMap<skottie::ColorPropertyHandle> fColorMap;
124 PropMap<skottie::OpacityPropertyHandle> fOpacityMap;
125 PropMap<skottie::TransformPropertyHandle> fTransformMap;
126 PropMap<skottie::TextPropertyHandle> fTextMap;
127 std::vector<MarkerInfo> fMarkers;
128 std::string fCurrentNode;
sk_sp< skottie::MarkerObserver > getMarkerObserver() const
bool setOpacity(const PropKey &, const skottie::OpacityPropertyValue &)
skottie::ColorPropertyValue getColor(const PropKey &) const
bool setTransform(const PropKey &, const skottie::TransformPropertyValue &)
std::unique_ptr< skottie::OpacityPropertyHandle > getOpacityHandle(const PropKey &, size_t) const
bool setColor(const PropKey &, const skottie::ColorPropertyValue &)
bool setText(const PropKey &, const skottie::TextPropertyValue &)
std::vector< PropKey > getColorProps() const
std::unique_ptr< skottie::TextPropertyHandle > getTextHandle(const PropKey &, size_t index) const
skottie::TransformPropertyValue getTransform(const PropKey &) const
std::unique_ptr< skottie::TransformPropertyHandle > getTransformHandle(const PropKey &, size_t) const
std::unique_ptr< skottie::ColorPropertyHandle > getColorHandle(const PropKey &, size_t) const
std::vector< PropKey > getTextProps() const
const std::vector< MarkerInfo > & markers() const
skottie::TextPropertyValue getText(const PropKey &) const
std::vector< PropKey > getOpacityProps() const
sk_sp< skottie::PropertyObserver > getPropertyObserver() const
std::vector< PropKey > getTransformProps() const
skottie::OpacityPropertyValue getOpacity(const PropKey &) const
sk_sp< skottie::ExternalLayer > onLoadPrecomp(const char[], const char[], const SkSize &) override
~ExternalAnimationPrecompInterceptor() override
T __attribute__((ext_vector_type(N))) V
float OpacityPropertyValue
SkColor ColorPropertyValue