8 #ifndef SlotManager_DEFINED
9 #define SlotManager_DEFINED
13 #include "include/private/base/SkTArray.h"
14 #include "modules/skottie/src/SkottieValue.h"
15 #include "src/core/SkTHash.h"
32 struct TextPropertyValue;
35 class AnimationBuilder;
36 class SceneGraphRevalidator;
37 class AnimatablePropertyContainer;
41 using namespace skia_private;
77 void trackColorValue(
const SlotID&, ColorValue*,
80 void trackScalarValue(
const SlotID&, ScalarValue*,
82 void trackVec2Value(
const SlotID&, Vec2Value*,
98 class ImageAssetProxy;
100 using SlotMap = THashMap<SlotID, TArray<T>>;
102 SlotMap<ValuePair<ColorValue*>> fColorMap;
103 SlotMap<ValuePair<ScalarValue*>> fScalarMap;
104 SlotMap<ValuePair<Vec2Value*>> fVec2Map;
105 SlotMap<sk_sp<ImageAssetProxy>> fImageMap;
106 SlotMap<sk_sp<skottie::internal::TextAdapter>> fTextMap;
110 friend class skottie::internal::AnimationBuilder;
111 friend class skottie::internal::AnimatablePropertyContainer;
Types, consts, functions, and macros for colors.
uint32_t SkColor
32-bit ARGB color value, unpremultiplied.
Definition: SkColor.h:37
Definition: SkRefCnt.h:119
Light weight class for managing strings.
Definition: SkString.h:118
Definition: SlotManager.h:43
sk_sp< const skresources::ImageAsset > getImageSlot(const SlotID &) const
bool setColorSlot(const SlotID &, SkColor)
std::optional< float > getScalarSlot(const SlotID &) const
SlotManager(sk_sp< skottie::internal::SceneGraphRevalidator >)
bool setScalarSlot(const SlotID &, float)
SlotInfo getSlotInfo() const
bool setImageSlot(const SlotID &, const sk_sp< skresources::ImageAsset > &)
bool setVec2Slot(const SlotID &, SkV2)
std::optional< SkColor > getColorSlot(const SlotID &) const
bool setTextSlot(const SlotID &, const TextPropertyValue &)
std::optional< SkV2 > getVec2Slot(const SlotID &) const
std::optional< TextPropertyValue > getTextSlot(const SlotID &) const
Definition: ExternalLayer.h:16
skresources::ImageAsset ImageAsset
Definition: Skottie.h:41
Definition: SlotManager.h:23
Definition: SlotManager.h:63
TArray< SlotID > fTextSlotIDs
Definition: SlotManager.h:68
TArray< SlotID > fColorSlotIDs
Definition: SlotManager.h:64
TArray< SlotID > fVec2SlotIDs
Definition: SlotManager.h:66
TArray< SlotID > fImageSlotIDs
Definition: SlotManager.h:67
TArray< SlotID > fScalarSlotIDs
Definition: SlotManager.h:65
Definition: SkottieProperty.h:63