aboutsummaryrefslogtreecommitdiffhomepage
path: root/experimental
diff options
context:
space:
mode:
authorGravatar Florin Malita <fmalita@chromium.org>2018-01-09 12:19:32 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-01-09 18:02:17 +0000
commitdb38573ca0592bc9f564a1d5798c07b6c9ee507c (patch)
tree625fc4714ae859c1629c315376975104ae8aa2a8 /experimental
parentf959092453eaf0ef8fdc6dff6724b0cdbbe44aaa (diff)
[skotty] Pre-initialize animated props
Force an initial tick on animation initialization. This prevents inconsistent state flashing if the client starts rendering before the first tick. TBR= Change-Id: Iaec3146b4085c980e6501d6a65dd8f2421a2895f Reviewed-on: https://skia-review.googlesource.com/92740 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Florin Malita <fmalita@chromium.org>
Diffstat (limited to 'experimental')
-rw-r--r--experimental/skotty/Skotty.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/experimental/skotty/Skotty.cpp b/experimental/skotty/Skotty.cpp
index 9d11812765..d118516d16 100644
--- a/experimental/skotty/Skotty.cpp
+++ b/experimental/skotty/Skotty.cpp
@@ -897,6 +897,9 @@ Animation::Animation(const ResourceProvider& resources,
AttachContext ctx = { resources, assets, fAnimators };
fDom = AttachComposition(json, &ctx);
+ // In case the client calls render before the first tick.
+ this->animationTick(0);
+
LOG("** Attached %d animators\n", fAnimators.count());
}