31class CornerPinAdapter final :
public AnimatablePropertyContainer {
34 const AnimationBuilder& abuilder,
35 const SkSize& layer_size) {
39 auto& node()
const {
return fMatrixNode; }
43 const AnimationBuilder& abuilder,
46 , fLayerSize(layer_size) {
49 kUpperRight_Index = 1,
51 kLowerRight_Index = 3,
54 EffectBinder(jprops, abuilder,
this)
55 .bind( kUpperLeft_Index, fUL)
56 .bind(kUpperRight_Index, fUR)
57 .bind( kLowerLeft_Index, fLL)
58 .bind(kLowerRight_Index, fLR);
61 void onSync()
override {
63 {fLayerSize.
width(), 0},
65 { 0, fLayerSize.
height()}},
67 dst[] = {{ fUL.x, fUL.y},
71 static_assert(std::size(src) == std::size(dst));
74 if (
m.setPolyToPoly(src, dst, std::size(src))) {
75 fMatrixNode->setMatrix(m);
static std::unique_ptr< SkEncoder > Make(SkWStream *dst, const SkPixmap *src, const SkYUVAPixmaps *srcYUVA, const SkColorSpace *srcYUVAColorSpace, const SkJpegEncoder::Options &options)
void attachDiscardableAdapter(sk_sp< T > adapter) const