aboutsummaryrefslogtreecommitdiffhomepage
path: root/modules/skottie
Commit message (Collapse)AuthorAge
* Move SkNoncopyable to include/private.Gravatar Ben Wagner2018-07-17
| | | | | | | Change-Id: I62f60ea52faeebddecacf03d9429ac3f7c516b8e Reviewed-on: https://skia-review.googlesource.com/141823 Commit-Queue: Ben Wagner <bungeman@google.com> Reviewed-by: Ben Wagner <bungeman@google.com>
* [skottie] Treat color properties as optional (default black)Gravatar Florin Malita2018-07-16
| | | | | | | | TBR= Change-Id: I51029b5718ec9925c214709ae4e3497dae130d37 Reviewed-on: https://skia-review.googlesource.com/141544 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Florin Malita <fmalita@chromium.org>
* [skottie] Teach skottie_tool to dump frame SKPsGravatar Florin Malita2018-07-15
| | | | | | | | | | Similar to saving PNG frames, now we can save SKPs. TBR= Change-Id: I5791b564a1d3e70424e45e62034e559e677795f1 Reviewed-on: https://skia-review.googlesource.com/141320 Reviewed-by: Joe Gregorio <jcgregorio@google.com> Commit-Queue: Florin Malita <fmalita@chromium.org>
* [skottie] Make stroke width optionalGravatar Florin Malita2018-07-13
| | | | | | | | TBR= Change-Id: I432a79b652ffd5838829f32980e2dcca55d57af4 Reviewed-on: https://skia-review.googlesource.com/141283 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Florin Malita <fmalita@chromium.org>
* [skottie] Fix matrix parenting for default/static valuesGravatar Florin Malita2018-07-13
| | | | | | | | | | | When all matrix properties are static/default, we simply discard the matrix node. But we cannot do that in the presence of a parent matrix. TBR= Change-Id: I56c62216f18786249dea063690261bfae83fabec Reviewed-on: https://skia-review.googlesource.com/141127 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Florin Malita <fmalita@chromium.org>
* [skottie] Fix polystar points distributionGravatar Florin Malita2018-07-10
| | | | | | | | | | | Points start at bearing 0. TBR= Change-Id: I6798b1a5fb4709ab31b13ab76a78f49758e7eec6 Reviewed-on: https://skia-review.googlesource.com/140246 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Florin Malita <fmalita@chromium.org>
* [skottie] Misc cleanupGravatar Florin Malita2018-07-10
| | | | | | | | | | | * pass inline defaults * log expressions TBR= Change-Id: I5e3ab038d612c738abb1bcf35b4cc492b9aaa6c1 Reviewed-on: https://skia-review.googlesource.com/140240 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Florin Malita <fmalita@chromium.org>
* [skottie] Log (unsupported) layer effectsGravatar Florin Malita2018-07-10
| | | | | | | | | TBR= Change-Id: Ia35e4110cb3c02339a38e82cd0f4516c7c58a5d9 Reviewed-on: https://skia-review.googlesource.com/140251 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Florin Malita <fmalita@chromium.org>
* [skottie] Fix spurious gradient error messagesGravatar Florin Malita2018-07-10
| | | | | | | | | | | | The adapter apply() method can get called before stops resolution, so only log when some stops are present. TBR= Change-Id: I8e336e2cff781a0e64de31e6b63f3cf373b2daa0 Reviewed-on: https://skia-review.googlesource.com/140245 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Florin Malita <fmalita@chromium.org>
* [skottie] Ignore identity transformsGravatar Florin Malita2018-07-10
| | | | | | | | | | | | | Some tranform properties are not optional, but many of them are static identity. Detect these cases and don't attach SG nodes for them. Reduces the number of sksg::Matrix nodes by ~18%. TBR= Change-Id: Ia51c865d6928e8c48c73b30f6d45541caf334880 Reviewed-on: https://skia-review.googlesource.com/140186 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Florin Malita <fmalita@chromium.org>
* [skottie] Apply fully opaque masks as clipsGravatar Florin Malita2018-07-10
| | | | | | | | | | | | We already have a clip optimization when there is only one opaque mask. Extend to cover multiple opaque masks, using Merge scene nodes. TBR= Change-Id: I24b61f0c0d080b13438c6777e98a8e2fefd09fdd Reviewed-on: https://skia-review.googlesource.com/140002 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Florin Malita <fmalita@chromium.org>
* [skottie] Do not discard SkPath's FillType when interpolatingGravatar Florin Malita2018-07-03
| | | | | | | | | | | The fill type is not reflected in shape keyframes, but it is tracked in the scene graph. Make sure we don't overwrite when interpolating. TBR= Change-Id: I281a61c3f4181ce34f772b36b83d0c7a64e265f6 Reviewed-on: https://skia-review.googlesource.com/139176 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Florin Malita <fmalita@chromium.org>
* [skottie] Add support for comp time remappingGravatar Florin Malita2018-07-02
| | | | | | | | | | | | - plumb the framerate in AttachContext (needed for remapping) - expand CompTimeMapper to handle time remapping (in addition to time start, time stretch) TBR= Change-Id: If33bae7b4fe224f45d5a094a47899b9025827991 Reviewed-on: https://skia-review.googlesource.com/138990 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Florin Malita <fmalita@chromium.org>
* [skottie] Fix 'subtract' masksGravatar Florin Malita2018-06-29
| | | | | | | | | | | | | Empirically, AE applies subtract masks as inverted intersect masks: it applies the opacity *outside* the mask geometry. Adjust the masking logic accordingly. TBR= Change-Id: If8d9dedbed9ce01b623b6c86ea91e494823d5dc5 Reviewed-on: https://skia-review.googlesource.com/138580 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Florin Malita <fmalita@chromium.org>
* [skottie] Ensure static split-position properties are committedGravatar Florin Malita2018-06-22
| | | | | | | | | | | We currently drop static split-position adapters without commiting the value to the scene graph. TBR= Change-Id: Id5852da35345fa58ecaf6c752456ecb32e5b405a Reviewed-on: https://skia-review.googlesource.com/136782 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Florin Malita <fmalita@chromium.org>
* [skottie] Simplify AttachMaskGravatar Florin Malita2018-06-21
| | | | | | | | | | | | Minor cleanup: BindProperty reports whether a non-default property was applied or bound for animation -- use this mechanism to detect fully-opaque masks. TBR= Change-Id: I3bd9429842621309d0c6bd966ef748917e498c66 Reviewed-on: https://skia-review.googlesource.com/136623 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Florin Malita <fmalita@chromium.org>
* [skottie] Fix start-time/stretch-time handlingGravatar Florin Malita2018-06-20
| | | | | | | | | | | | | | | | | We currently apply start-time/stretch-time adjustments to the referenced composition AND to the referencing layer local properties. That last part is incorrect: the adjustment should only apply to the referenced composition. Introduce a specialized composition time mapper to handle t adjustments, and push the logic down to AttachCompLayer (and out of the generic AttachLayer). TBR= Change-Id: I0ddb86232010a8e7cdac6524aef2eea5823e306d Reviewed-on: https://skia-review.googlesource.com/136166 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Florin Malita <fmalita@chromium.org>
* [skottie] Simplify Parse<SkPoint>Gravatar Florin Malita2018-06-19
| | | | | | | | | | | | | Some BM versions wrap point values as single or even multi-element arrays. Parse<SkScalar> already handles the former case - we can extend that behavior to also cover the latter and simplify Parse<SkPoint>. TBR= Change-Id: I2152928944f43dc03a5d8f0d65865ac43974fd7a Reviewed-on: https://skia-review.googlesource.com/135800 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Florin Malita <fmalita@chromium.org>
* Fold SkJSON into Skia/utilsGravatar Florin Malita2018-06-19
| | | | | | | | | | | It's a tiny, core-ish component -- might as well treat as such to simplify dependencies. Change-Id: I6f31ce2d151f9a629d88bfc7f15d64891d5150c0 Reviewed-on: https://skia-review.googlesource.com/135780 Reviewed-by: Mike Klein <mtklein@google.com> Reviewed-by: Kevin Lubick <kjlubick@google.com> Commit-Queue: Florin Malita <fmalita@chromium.org>
* Stop using SkTSwap.Gravatar Ben Wagner2018-06-19
| | | | | | | | | | | | | Use std::swap instead. It does not appear that any external user specializes SkTSwap, but some may still use it. This removes all use in Skia so that SkTSwap can later be removed in a smaller CL. After that the <utility> include can be removed from SkTypes.h. Change-Id: If03d4ee07dbecda961aa9f0dc34d171ef5168753 Reviewed-on: https://skia-review.googlesource.com/135578 Reviewed-by: Hal Canary <halcanary@google.com> Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Ben Wagner <bungeman@google.com>
* [skottie] Fix OOB access in Parse<SkPoint>Gravatar Florin Malita2018-06-18
| | | | | | | | | | | SkJSON requires valid array indices, so callers must guard against out-of-bounds conditions explicitly. Bug: oss-fuzz:8956 Change-Id: I50b96b088e44a4c1a569e6911d4be5d75799b464 Reviewed-on: https://skia-review.googlesource.com/135445 Commit-Queue: Florin Malita <fmalita@chromium.org> Reviewed-by: Kevin Lubick <kjlubick@google.com>
* [skottie] Switch to SkJSONGravatar Florin Malita2018-06-14
| | | | | | | | | | Convert to SkJSON APIs and remove RapidJSON dependency. TBR= Change-Id: I5b4fd78821a443326e3a5b370748d840b80ef279 Reviewed-on: https://skia-review.googlesource.com/134612 Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Florin Malita <fmalita@chromium.org>
* Revert "Revert "SkTypes: extract SkTo""Gravatar Hal Canary2018-06-14
| | | | | | | | | | | | | | | | This reverts commit fdcfb8b7c23fbf18f872d2c31d27978235033876. > Original change's description: > > SkTypes: extract SkTo > > > > Change-Id: I8de790d5013db2105ad885fa2683303d7c250b09 > > Reviewed-on: https://skia-review.googlesource.com/133620 > > Reviewed-by: Mike Klein <mtklein@google.com> Change-Id: Ida74fbc5c21248a724a5edbf9fae18a33bcb23aa Reviewed-on: https://skia-review.googlesource.com/134506 Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Hal Canary <halcanary@google.com>
* Revert "SkTypes: extract SkTo"Gravatar Hal Canary2018-06-13
| | | | | | | | | | | | | | | | | | | | | | | This reverts commit 2a2f67592602b18527bc3fd449132d420cd5b62e. Reason for revert: this appears to be what is holding up the Chrome roll. Original change's description: > SkTypes: extract SkTo > > Change-Id: I8de790d5013db2105ad885fa2683303d7c250b09 > Reviewed-on: https://skia-review.googlesource.com/133620 > Reviewed-by: Mike Klein <mtklein@google.com> TBR=mtklein@google.com,halcanary@google.com No-Presubmit: true No-Tree-Checks: true No-Try: true Change-Id: Iafd738aedfb679a23c061a51afe4b98a8d4cdfae Reviewed-on: https://skia-review.googlesource.com/134504 Reviewed-by: Hal Canary <halcanary@google.com> Commit-Queue: Hal Canary <halcanary@google.com>
* SkTypes: extract SkToGravatar Hal Canary2018-06-12
| | | | | | Change-Id: I8de790d5013db2105ad885fa2683303d7c250b09 Reviewed-on: https://skia-review.googlesource.com/133620 Reviewed-by: Mike Klein <mtklein@google.com>
* [skottie] Fix color parsingGravatar Florin Malita2018-06-10
| | | | | | | | | | Currently truncating unnecessarily. TBR= Change-Id: I1929a4de62364e4685eb67f9a79b01a8dbac1c61 Reviewed-on: https://skia-review.googlesource.com/133823 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Florin Malita <fmalita@chromium.org>
* [skottie] Add a tool for dumping encoded animation framesGravatar Florin Malita2018-06-06
| | | | | | | | | | | | | | | | | | | | | | | | | Exports animation frames as a sequence of .png files: 0000000.png 0000001.png ... Usage: skottie_tool -i <input_json> -w <out_dir> Other options: --width Frame width (default: 800) --height Frame height (default: 600) --fps Frames per second (default: 30) --t0 Normalized timeline start (default: 0) --t1 Normalized timeline end (default: 1) Change-Id: I4a79be0f823da15e6863909b6d67d38aa74bb740 Reviewed-on: https://skia-review.googlesource.com/132265 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Florin Malita <fmalita@chromium.org>
* Avoid compilation error on older compilersGravatar Kevin Lubick2018-06-01
| | | | | | | | | | | | | | | | | The constness on null_provider causes: "default initialization of an object of const type 'const NullResourceProvider' without a user-provided default constructor" See https://stackoverflow.com/a/47368753 for more. TL;DR; clang 3.8 and older is not happy Bug: skia: Change-Id: Icfc38680163c3bd4952c0e35551706cad8dbfee6 Reviewed-on: https://skia-review.googlesource.com/131521 Commit-Queue: Kevin Lubick <kjlubick@google.com> Commit-Queue: Florin Malita <fmalita@chromium.org> Reviewed-by: Florin Malita <fmalita@chromium.org>
* [skottie] Remove inPoint/outPoint/frameRate from public APIGravatar Florin Malita2018-06-01
| | | | | | | | TBR= Change-Id: Ice4de3abe350c4570c22e859a36dbd445527fa41 Reviewed-on: https://skia-review.googlesource.com/131300 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Florin Malita <fmalita@chromium.org>
* [skottie] Make the resource provider factory argument optionalGravatar Florin Malita2018-05-31
| | | | | | | | | Most of the existing clients don't care about nested resources. Change-Id: Ie7991dd25ebbd679b5b49e5624772c7e19e7ec79 Reviewed-on: https://skia-review.googlesource.com/131141 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Florin Malita <fmalita@chromium.org>
* Add 'public' headers support to find_headers.pyGravatar Florin Malita2018-05-30
| | | | | | | | | | Update the script to search for headers in both 'sources' and 'public'. Change-Id: I195c6e3720f3d3d99dea04628388821a58fa791b Reviewed-on: https://skia-review.googlesource.com/130823 Reviewed-by: Mike Klein <mtklein@google.com> Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Florin Malita <fmalita@chromium.org>
* Add Skottie support to FiddleGravatar Florin Malita2018-05-30
| | | | | | | Change-Id: I2d89c1340215b43476337c354057328c1bb2b8ff Reviewed-on: https://skia-review.googlesource.com/130720 Commit-Queue: Florin Malita <fmalita@chromium.org> Reviewed-by: Mike Klein <mtklein@google.com>
* [skottie] Animation::animationTick() -> Animation::seek()Gravatar Florin Malita2018-05-29
| | | | | | | | | | Replace poorly defined animationTick() with a normalized seek() method. TBR= Change-Id: Id2ea17bb426fe86fede0d6c8a3d93236902f10af Reviewed-on: https://skia-review.googlesource.com/130508 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Florin Malita <fmalita@chromium.org>
* Clean up modules/skottie/BUILD.gnGravatar Florin Malita2018-05-29
| | | | | | | | | | Per comments in https://skia-review.googlesource.com/c/skia/+/130480 Change-Id: I978b04e4b06bf01c008b44540c640b77f5900f12 Reviewed-on: https://skia-review.googlesource.com/130501 Reviewed-by: Kevin Lubick <kjlubick@google.com> Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Florin Malita <fmalita@chromium.org>
* Fix fuzz+Skottie integrationGravatar Kevin Lubick2018-05-29
| | | | | | | | Bug: skia: Change-Id: Ic926f6a838ac1e6d358d51913dc5c58d3083274a Reviewed-on: https://skia-review.googlesource.com/130480 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Kevin Lubick <kjlubick@google.com>
* [skottie] Relocate to modules/skottieGravatar Florin Malita2018-05-27
TBR= Change-Id: I218d251ca56578a3a7fd4fb86cba9abdc10fb3bd Reviewed-on: https://skia-review.googlesource.com/130322 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Florin Malita <fmalita@chromium.org>