diff options
author | Florin Malita <fmalita@chromium.org> | 2018-07-30 15:49:20 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-07-30 20:21:21 +0000 |
commit | 9f7d4cd62a0bf201c65aa11498594b8c1dc17107 (patch) | |
tree | 9ae4400c75045d3f899f255860c302f572caae1c /dm/DMSrcSink.h | |
parent | 7fe074f967aa3be9c40bb9b0c4e02cf6db9ceb2b (diff) |
[skottie] Parse animations on the fly in SkottieSrc::draw
This allows DM to use the same source in multiple threads.
Change-Id: Ia0d7c4c673a92ccddab263a67f01afaa2d68b606
Reviewed-on: https://skia-review.googlesource.com/144420
Auto-Submit: Florin Malita <fmalita@chromium.org>
Reviewed-by: Ben Wagner <benjaminwagner@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
Diffstat (limited to 'dm/DMSrcSink.h')
-rw-r--r-- | dm/DMSrcSink.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/dm/DMSrcSink.h b/dm/DMSrcSink.h index d42c1868aa..257ca8befa 100644 --- a/dm/DMSrcSink.h +++ b/dm/DMSrcSink.h @@ -21,8 +21,6 @@ //#define TEST_VIA_SVG -namespace skottie { class Animation; } - namespace DM { // This is just convenience. It lets you use either return "foo" or return SkStringPrintf(...). @@ -265,9 +263,11 @@ private: // Generates a kTileCount x kTileCount filmstrip with evenly distributed frames. static constexpr int kTileCount = 5; - Name fName; - SkISize fTileSize = SkISize::MakeEmpty(); - sk_sp<skottie::Animation> fAnimation; + // Fit kTileCount x kTileCount frames to a 1000x1000 film strip. + static constexpr SkScalar kTargetSize = 1000; + static constexpr SkScalar kTileSize = kTargetSize / kTileCount; + + Path fPath; }; #endif |