Commit Graph

9 Commits

Author SHA1 Message Date
Florin Malita
e6345d90f8 [skotty,sksg] Add support for geometry merge
TBR=
Change-Id: Ia5edbfeae61779ead6031f6dd4e33794b3eefdc0
Reviewed-on: https://skia-review.googlesource.com/90382
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2018-01-04 15:22:59 +00:00
Florin Malita
e8bb6da08d [skotty] Fix native path lerp
SkPath::interpolate() seems to use 'weight' opposite from documentation.

TBR=
Change-Id: I678f7939776bfb21614095df8a2c2dcaa4ecd5f5
Reviewed-on: https://skia-review.googlesource.com/90341
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2018-01-02 22:59:01 +00:00
Florin Malita
9e73f885c7 [skotty] Native SkPath interpolation
SkPath supports interpolation, no reason to handle that explicitly in
Skotty.

Change skotty::ShapeValue to convert to SkPaths upfront, when parsing,
and then rely in native interpolation.

TBR=
Change-Id: I32d424ea359e0736909d4e51602ffeb14403feed
Reviewed-on: https://skia-review.googlesource.com/90362
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2018-01-02 22:24:31 +00:00
Florin Malita
2a8275b782 [skotty] Improved shape & layer paint order
Closer to what I think the docs are trying to articulate.

Change-Id: I784c4daaf3f6f2c70b2e9636c30a763ab0c711e7
Reviewed-on: https://skia-review.googlesource.com/90242
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2018-01-02 18:14:31 +00:00
Florin Malita
2e1d7e2342 [skotty,sksg] Initial RRect support
Bug: skia:
Change-Id: I51bf6619e8d857d5d14fcd6651c144bd3c59453f
Reviewed-on: https://skia-review.googlesource.com/90027
Commit-Queue: Florin Malita <fmalita@chromium.org>
Reviewed-by: Mike Reed <reed@google.com>
2018-01-02 15:56:30 +00:00
Florin Malita
fc043dcd55 [skotty] Add Json DM source
Generates a filmstrip with evenly distributed frames for a Skotty animation.

TBR=
Change-Id: Ia89e0d65d59fd5ab4ef221a231e9b3e0c033828a
Reviewed-on: https://skia-review.googlesource.com/90025
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2017-12-31 18:44:29 +00:00
Florin Malita
dacc02b8dd [skotty] Initial shape transform support
TBR=

Change-Id: I29ce2e6a29492fb0ec51f28f095392594ea6781c
Reviewed-on: https://skia-review.googlesource.com/90024
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2017-12-31 14:33:09 +00:00
Florin Malita
e8750e1078 [skotty] Fix path close handling
... and add a transform animation sample

TBR=
Change-Id: I27a67d7861dffb9ca22a5e7155ee0eba3b4575f6
Reviewed-on: https://skia-review.googlesource.com/90023
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2017-12-31 00:07:39 +00:00
Florin Malita
094ccde238 Initial Lottie loader impl (Skotty)
Coarse workflow:

* Construction

  1) build a Json tree
  2) collect asset IDs (for preComp/image layer resolution)
  3) "attach" pass
     - traverse the Json tree
     - build an SkSG dom, one fragment at a time
     - attach "animator" objects to the dom, for each animated prop
  4) done, we can throw away the Json tree

* For each animation tick

  1) iterate over active animators and poke their respective dom nodes/attributes
  2) revalidate the SkSG dom
  3) draw the SkSG dom

Note: post construction, things are super-simple - we just poke SkSG DOM attributes
with interpolated values, and everything else is handled by SkSG (invalidation,
revalidation, render).

Change-Id: I96a02be7eb4fb4cb3831f59bf2b3908ea190c0dd
Reviewed-on: https://skia-review.googlesource.com/89420
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2017-12-30 22:55:39 +00:00