Dash, trim, round, transform and upcoming offset have a lot in common.
Introduce a GeometryEffect base class to consolidate.
TBR=
Change-Id: Ib5556e6ebe416685c624d53ba8591e118aa4f0d6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/300496
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
AE supports dashing all strokes. Dashes are specified as an arbitrary
number of intervals (alternating dash/gap) plus a start offset.
All values can be animated independently (but of course!).
- implement a SkSG dash effect (based on SkDashPathEffect)
- expand the shape builder logic to allow local geometry adjustments
(kind of a bummer that dashing is a stroke/paint property as opposed
to a geometry effect in AE)
Change-Id: Ic9ff35f2f9a552a3c26f9e1596ce58ad81f7ced5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/274550
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
Update MotionTileEffect to avoid rebuilding shaders redundantly,
at render time:
1) build all shaders at revalidation time
2) cache the layer content picture separately, and only rebuild when
the layer content changes
To support #2, add some SG helpers for querying subtree inval state.
With this change, we avoid all render time allocations.
Notry: true
Change-Id: I55a1f95752704af6a667b266e725492de6640387
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/226512
Commit-Queue: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
Auto-Submit: Florin Malita <fmalita@chromium.org>
Reviewed-by: Mike Reed <reed@google.com>
Currently, gradients are PaintNode subclasses - which limits their
applicability to leaf DAG nodes.
In order to support generalized gradient/shader effects:
* introduce a new Shader base class
* refactor gradients as Shader subclasses
* introduce ShaderPaint (to support current Gradient-as-paint use)
* introduce ShaderEffect (to support future Gradient-as-effect use)
Tangentially:
* rename SkSGPaintNode.h -> SkSGPaint.h
* consolidate sksg::Color into SkSGPaint.h
Change-Id: I94ba949f4504c09cfde4a4f030d927411fdd66a2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/205263
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
This reverts commit 1f43a4359d.
Reason for revert: Android build failures.
Original change's description:
> [skottie] Add drop shadow support
>
> Introduce the machinery required for general image filters in SkSG +
> a concrete drop shadow image filter effect.
>
> Wire it all up with Skottie to support drop-shadow layer effects.
>
> Change-Id: I98e9669852f58ba6481439a7fda4a56ec6c59b8a
> Reviewed-on: https://skia-review.googlesource.com/c/190426
> Reviewed-by: Mike Reed <reed@google.com>
> Commit-Queue: Florin Malita <fmalita@chromium.org>
TBR=fmalita@chromium.org,reed@google.com
Change-Id: I31d38ed4d4a15b77d1d1218b2677a891978332cb
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/190981
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
Introduce the machinery required for general image filters in SkSG +
a concrete drop shadow image filter effect.
Wire it all up with Skottie to support drop-shadow layer effects.
Change-Id: I98e9669852f58ba6481439a7fda4a56ec6c59b8a
Reviewed-on: https://skia-review.googlesource.com/c/190426
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
Overwrite the layer content color with a color filter.
TBR=
Change-Id: I39f920225affb2641cc11ab1f0c1456d89b47cb7
Reviewed-on: https://skia-review.googlesource.com/145730
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>