diff options
author | Florin Malita <fmalita@chromium.org> | 2018-04-30 10:32:18 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-04-30 15:19:03 +0000 |
commit | 6eb85a1cf1b0829a16859f0e4b5b3f2064f38120 (patch) | |
tree | 17dd1c8b3e5467fe900697075d107e6d3e204459 /experimental/skottie/Skottie.h | |
parent | ba36572d1c681c50066be6a19542b12cb434c59b (diff) |
[skottie] Show load stats in SkottieSlide
TBR=
Change-Id: Ie3a1036d9a90cb16d2795134c453759aeff06e3c
Reviewed-on: https://skia-review.googlesource.com/124461
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
Diffstat (limited to 'experimental/skottie/Skottie.h')
-rw-r--r-- | experimental/skottie/Skottie.h | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/experimental/skottie/Skottie.h b/experimental/skottie/Skottie.h index f14c4dc42b..44541fd81b 100644 --- a/experimental/skottie/Skottie.h +++ b/experimental/skottie/Skottie.h @@ -36,8 +36,17 @@ public: class Animation : public SkRefCnt { public: - static sk_sp<Animation> Make(SkStream*, const ResourceProvider&); - static sk_sp<Animation> MakeFromFile(const char path[], const ResourceProvider* = nullptr); + struct Stats { + float fTotalLoadTimeMS, + fJsonParseTimeMS, + fSceneParseTimeMS; + size_t fJsonSize, + fAnimatorCount; + }; + + static sk_sp<Animation> Make(SkStream*, const ResourceProvider&, Stats* = nullptr); + static sk_sp<Animation> MakeFromFile(const char path[], const ResourceProvider* = nullptr, + Stats* = nullptr); ~Animation() override; @@ -56,7 +65,7 @@ public: private: Animation(const ResourceProvider&, SkString ver, const SkSize& size, SkScalar fps, - const Json::Value&); + const Json::Value&, Stats*); SkString fVersion; SkSize fSize; |