Parent camera layer transforms apply to the camera itself, thus
T_camera' = T_camera x Inv(T_parent)
To support this composition:
- introduce sksg::Transform::MakeInverse()
- allow selectable pre/post parent composition in
AnimationBuilder::attachMatrix3D()
Change-Id: Ie70b36e4e9bb1b32e60893df5695bdc6c0dc0d00
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/210422
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
Introduce sksg::LevelsColorFilter and hook into Skottie's effects builder.
Limitations:
- BM/Lottie does not export animated paramaters (static values only)
- BM/Lottie only exports the first modified channel
Change-Id: I9ef389478c2eaa0d13794abe6a8089a8b3c0c62e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/206269
Commit-Queue: Florin Malita <fmalita@chromium.org>
Reviewed-by: Mike Reed <reed@google.com>
Two issues:
1) Empirically (per AE's model), only solid layers transform the effect space.
All other layer types implement their effects ignoring the layer xform.
2) Due to the effect deferral mechanism in sksg, shader effects are
sometimes applied with a different transform than intended.
To address #1, tweak the layer builder logic to attach the effects
before/after the transform node, depending on the layer type.
For #2, track the CTM active when the shader effect is attached and undo
any intervening transformations via a local matrix when the shader is
actually applied to SkPaint.
Change-Id: I29b5a4df3b223e7da9dfc36b0d7d40055d192ac0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/205922
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
Introduce a Skottie JSON extension for controlling vertical text
alignment ("sk_vj"), with a single public value for now: 1 (centered).
Refactor SkottieShaper to handle vertical adjustments based on a VAlign
enum:
kTop - the topmost line is ascent-aligned with the box top
(AE text-box behavior)
kTopBaseline - the topmost line is baseline-aligned with the top box
(AE text-point behavior)
kCenter - the text center is aligned with the box center
("sk_vj": 1, Skottie extension)
Also externalize the vertical adjustment as a text blob offset (instead
of baking into blob glyph offsets).
Change-Id: I29a414d4c6ccfafc534ca7b61f48ef96d8cff86e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/205590
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
AE/Lottie allow Bezier control Ys to be outside the [0..1] range.
Update SkCubicMap to do the same.
Bug: skia:8931
Change-Id: I54ee8dbb4e6e0a33a917500523c82fe56c854d4a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/205002
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>