skia2/modules/skottie
Florin Malita cfbb56c6e1 [skottie] Auto-orient fixes
Two issues:

1) For static keyframes (start_value == end_value) AE yields horizontal
   orientation (0 tangent).  We technically have the same logic in
   Skottie, but our value deduplication logic interferes: the two
   consecutive equal values are consolidated, and the result ends up
   holding the spatial lerp info for the next frame => our hold frames
   auto-orient for the beginning of the next keyframe.

   Fix: skip value deduplication when spatial lerp is present.

2) The very last keyframe is always static and holds no spatial info.
   AE retains the orientation of the previous frame, but Skottie yields
   0 tangent.

   Fix: the easiest way to accomplish AE semantics is to detect when
   we're dealing with the last keyframe, and swap with the previous
   keyframe with an adjust weight of 1 (to select the end value).  This
   produces the same lerp result (because keyframed values are always
   contiguous) and also respects the orientation of the prev frame.

TBR=
Change-Id: Id661f7804533e95b747722457489a7ef759572a4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/301176
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Florin Malita <fmalita@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2020-07-08 13:52:27 +00:00
..
fuzz rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00
gm [skottie] SkResources::loadTypeface() callback 2020-06-16 18:53:04 +00:00
include [skottie] Pull SkottieProperty.h from Skotti.h 2020-06-01 20:05:36 +00:00
src [skottie] Auto-orient fixes 2020-07-08 13:52:27 +00:00
tests [skottie] Introduce an external layer API 2020-05-06 20:31:14 +00:00
utils [skottie] Introduce an external layer API 2020-05-06 20:31:14 +00:00
BUILD.gn [skottie/tools] Video playback support 2020-04-24 15:56:50 +00:00
skottie.gni [skottie] Add shape layer Offset Paths support 2020-07-06 16:31:52 +00:00