32class FillAdapter final :
public AnimatablePropertyContainer {
36 const AnimationBuilder& abuilder) {
40 const auto& node()
const {
return fFilterNode; }
45 const AnimationBuilder& abuilder)
47 , fFilterNode(
sksg::ModeColorFilter::
Make(
std::move(layer),
60 EffectBinder(jprops, abuilder,
this)
61 .bind( kColor_Index, fColor )
62 .bind(kOpacity_Index, fOpacity);
63 abuilder.dispatchColorProperty(fColorNode);
66 void onSync()
override {
68 c.fA =
SkTPin(fOpacity, 0.0f, 1.0f);
70 fColorNode->setColor(c.toSkColor());
constexpr SkColor SK_ColorBLACK
static constexpr const T & SkTPin(const T &x, const T &lo, const T &hi)
void attachDiscardableAdapter(sk_sp< T > adapter) const
SK_API sk_sp< SkDocument > Make(SkWStream *dst, const SkSerialProcs *=nullptr, std::function< void(const SkPicture *)> onEndPage=nullptr)
SK_API sk_sp< SkShader > Color(SkColor)