16 {
17 static constexpr char json[] =
18 R"({
19 "v": "5.2.1",
20 "w": 100,
21 "h": 100,
22 "fr": 10,
23 "ip": 0,
24 "op": 100,
25 "assets": [{
26 "id": "img_0",
27 "p" : "img_0.png",
28 "u" : "images/",
29 "w" : 100,
30 "h" : 50
31 }],
32 "layers": [
33 {
34 "ip": 0,
35 "op": 100,
36 "ty": 2,
37 "refId": "img_0",
38 "ks": {
39 "p": { "a": 0, "k": [0,25] }
40 }
41 }
42 ]
43 })";
44
46
48 float t;
53 {0xffff0000, 0xffff0000, 0xff00ff00, 0xffff0000, 0xff00ff00}},
55 {0xffff0000, 0xff00ff00, 0xff00ff00, 0xff00ff00, 0xff00ff00}},
57 {0xff00ff00, 0xffff0000, 0xff00ff00, 0xff00ff00, 0xff00ff00}},
59 {0xff00ff00, 0xff00ff00, 0xffff0000, 0xff00ff00, 0xff00ff00}},
61 {0xffff0000, 0xff00ff00, 0xff00ff00, 0xffff0000, 0xff00ff00}},
63 {0xffff0000, 0xffff0000, 0xff00ff00, 0xffff0000, 0xffff0000}},
64 };
65
66 class TestImageAsset final :
public ImageAsset {
67 public:
69 : fTest(tst)
70 , fReporter(r) {
72 surf->getCanvas()->drawColor(0xffff0000);
73 fImage = surf->makeImageSnapshot();
74 }
75
76 private:
78
81
83 }
84
88 };
89
91 public:
93 : fTest(tst)
94 , fReporter(r) {}
95
96 private:
98 return sk_make_sp<TestImageAsset>(fTest, fReporter);
99 }
100
103 };
104
106 .setResourceProvider(sk_make_sp<TestResourceProvider>(
tests, r))
108
110
#define REPORTER_ASSERT(r, cond,...)
static SkMatrix Scale(SkScalar sx, SkScalar sy)
static SkMatrix Translate(SkScalar dx, SkScalar dy)
static const SkMatrix & I()
virtual FrameData getFrameData(float t)
virtual bool isMultiFrame()=0
virtual sk_sp< ImageAsset > loadImageAsset(const char[], const char[], const char[]) const
SK_API sk_sp< SkSurface > Raster(const SkImageInfo &imageInfo, size_t rowBytes, const SkSurfaceProps *surfaceProps)
DlVertices::Builder Builder
SkSamplingOptions(SkFilterMode::kLinear))
static SkImageInfo MakeN32Premul(int width, int height)