Commit Graph

210 Commits

Author SHA1 Message Date
Ben Wagner
b9cc1c6bc2 Fix calculating clusters from start of input.
Still some code hanging on from optimizing for SkTextBlob.

Bug: skia:8420

Change-Id: I947a9ff691fb1fbcb82934c5597e5db11c12f013
Reviewed-on: https://skia-review.googlesource.com/c/192683
Reviewed-by: Hal Canary <halcanary@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2019-02-14 21:23:38 +00:00
Brian Osman
5c1f8eb094 Various particle system improvements
Effects now have a duration, and can be played looped
or one-shot. Added a second list of affectors that are
applied at spawn vs. update.

Effects grab and store the SkRandom at construction,
so it no longer needs to be passed to update().

Bug: skia:
Change-Id: Ib54d60466e162e4d4b70fa64c1215fc01680d47a
Reviewed-on: https://skia-review.googlesource.com/c/191722
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2019-02-14 20:19:08 +00:00
Brian Osman
5de7ea45bc Particles/SkReflected: Generalize array reflection
This supports arrays of any type, and removes all of the special case
code for arrays of SkReflected objects. (This is extracted from my
rewrite of SkCurve, which needed something like this to work).

Bug: skia:
Change-Id: I55ab942f7922335dca0685d28b3b122bc4d53daa
Reviewed-on: https://skia-review.googlesource.com/c/192620
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2019-02-14 20:04:48 +00:00
Hal Canary
b6f5378333 SkShaper: enable for unit and render tests
New tests that use skshaper should hide behind SK_USING_SKSHAPER define.

Change-Id: Ifcd726d931e3eb1ff209085a63e8129c9cd5596d
Reviewed-on: https://skia-review.googlesource.com/c/192026
Reviewed-by: Hal Canary <halcanary@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2019-02-13 16:19:48 +00:00
Ben Wagner
a8d94c1688 Font fallback to handle no font with character.
In the event that no fallback font can be found to handle a character,
just keep using the current font.

Change-Id: I93c852dc8ee5eaa868e48a5ce3e8298a642b15c7
Reviewed-on: https://skia-review.googlesource.com/c/191661
Commit-Queue: Hal Canary <halcanary@google.com>
Reviewed-by: Hal Canary <halcanary@google.com>
2019-02-12 21:52:12 +00:00
Florin Malita
63136afbd0 [sksg] Fix group hit-testing order
Change-Id: Idc25109a598caabf01e3ab61dc97f984ff453d40
Reviewed-on: https://skia-review.googlesource.com/c/191664
Commit-Queue: Mike Reed <reed@google.com>
Auto-Submit: Florin Malita <fmalita@chromium.org>
Reviewed-by: Mike Reed <reed@google.com>
2019-02-12 21:10:00 +00:00
Brian Osman
7c979f52c3 Experimental Particle System
This adds a new "Particles" slide to viewer, that allows
editing, loading, and saving particle effects. All of the
particle system code is in modules/particles.

There are many rough edges and some not-yet-finished changes
to generalize the model[1]. A rough overview:

- SkReflected.h implements a lightweight reflection system
  for classes derived from SkReflected. Adding a new class
  involves deriving from SkReflected, adding a macro to the
  class declaration, and implementing visitFields(), which
  simply calls a virtual on an SkFieldVisitor for each field.
  Currently, emitters and affectors use this mechanism.

- SkParticleSerialization.h demonstrates two useful field
  visitors - for serializing to and from JSON. The driver
  code that uses those is directly in ParticlesSlide.

- SkParticleData.h and SkCurve.h define a variety of helper
  types for talking about particles, both for parameterizing
  individual values, and communicating about the state of a
  particle among the effect, affectors, and emitters.

- SkParticleEffect.h defines the static data definition of
  an effect (SkParticleEffectParams), as well as a running
  instance of an effect (SkParticleEffect). The effect has
  simple update() and draw() methods.

- ParticlesSlide.cpp adds a third field visitor to generate
  GUIs for interactively editing the running effect.

---

1: The critical change I'd like to make is to remove all
special case behavior over time and at spawn (setting sprite
frames, size over time, color over time, etc...). Integration
is the only fixed function behavior. Everything else is driven
by two lists of affectors. One is applied at spawn time, using
the effect's lifetime to evaluate curves. This allows spawning
particles with different colors as the effect ages out, for
example. The second list is applied every frame to update
existing particles, and is driven by the particle's lifetime.
This allows particles to change color after being spawned, for
example.

With a small set of affectors using a single expressive curve
primitive (keyframed list of cubic curve segments), we can
have affectors that update color, size, velocity, position,
sprite frame, etc., and implement many complex behaviors.

Bug: skia:
Change-Id: Id9402bef22825d55d021c5a2f9e5e41791aabaf4
Reviewed-on: https://skia-review.googlesource.com/c/181404
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2019-02-12 18:53:41 +00:00
Ben Wagner
50becee292 Primitive SkShaper to do primitive line breaking.
This essentially resurects the old SkTextBox code into a primitive
shaper.

Change-Id: Ia4d1a5ab3d1c7d410962b49ac3891298655c7dc4
Reviewed-on: https://skia-review.googlesource.com/c/191562
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Hal Canary <halcanary@google.com>
2019-02-12 17:56:40 +00:00
Mike Reed
ec80d901b9 starter sample for playing with SG.
will flesh out more over time.

Bug: skia:
Change-Id: If5eaf0a7c404b9209b93871eb3ac3d74da8c65dd
Reviewed-on: https://skia-review.googlesource.com/c/191003
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
2019-02-12 17:03:40 +00:00
Florin Malita
eb46bd892d [sksg] Hit-testing API
Introduce RenderNode::nodeAt(const SkPoint&) as the entry point for the hit-testing API.

This is backed by a onNodeAt() virtual, which gets dispatched throughout the render DAG,
and normally stops at the first leaf Draw node in encounters.

To support the implementation, introduce a GeometryNode::contains(const SkPoint&) API.

This is backed by a onContains() virtual, overridden in each concrete geometry class.

Expose nodeAt() on sksg::Scene, and add some basic unit tests.

Change-Id: I0c8abd9d1e51ecf2d8b4dd699f325cd636e21084
Reviewed-on: https://skia-review.googlesource.com/c/191296
Commit-Queue: Florin Malita <fmalita@chromium.org>
Reviewed-by: Mike Reed <reed@google.com>
2019-02-12 15:01:05 +00:00
Ben Wagner
454e5fb745 Fix cluster reporting from shaper.
Bug: skia:8420
Change-Id: I7eea8c6b3af2153a1ac1189782fc6cbaaf9ee5c6
Reviewed-on: https://skia-review.googlesource.com/c/190821
Reviewed-by: Hal Canary <halcanary@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Ben Wagner <bungeman@google.com>
2019-02-11 21:59:33 +00:00
Florin Malita
ef26fcb13f [sksg] Fix image filter content inval rect tracking
Image filters cannot let descendent damage pass through, as they may
transform their inputs arbitrarily.

Introduce the notion of "damage override" SG nodes (nodes which block
descendent damage and replace it with their own), and update
ImageFilterEffect to opt in for this behavior.

Also make InvalidationController damage dispatch optional (such that we
don't accumulate inval rects unnecessarily).

TBR=
Change-Id: Ie9f7d32ecdcc77dbe6ea009aed9ce269b3649a04
Reviewed-on: https://skia-review.googlesource.com/c/191005
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2019-02-10 21:43:20 +00:00
Florin Malita
dafd65217b Reland "[skottie] Add drop shadow support"
This reverts commit 0b36acdad9.

Reason for revert: Cannot repro build failure - maybe flake?  Trying again.

Original change's description:
> Revert "[skottie] Add drop shadow support"
> 
> 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>

TBR=fmalita@chromium.org,reed@google.com

Change-Id: Ic3f949f40ed4651715b6de906882f5f4522f91b9
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/191040
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2019-02-10 01:49:55 +00:00
Florin Malita
0b36acdad9 Revert "[skottie] Add drop shadow support"
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>
2019-02-09 14:41:40 +00:00
Florin Malita
1f43a4359d [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>
2019-02-09 13:35:57 +00:00
Chris Dalton
50e24d7d5f Add a mechanism for GMs to silently exclude themselves from Gold
This is useful, for example, when trying to test a hardware feature
that isn't supported in the current context.

Bug: skia:8731
Change-Id: I9a363159300c92e4039bfd05400238c27002efb1
Reviewed-on: https://skia-review.googlesource.com/c/189133
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2019-02-08 00:05:15 +00:00
Florin Malita
500133b1e2 [skshaper] Add per-line callback
Bug: skia:
Change-Id: Iaaf7e95230207bc796dd436a918722a089426e34
Reviewed-on: https://skia-review.googlesource.com/c/190220
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2019-02-07 16:30:00 +00:00
Florin Malita
3fb7bbe937 [skottie] Use SkShaper for text
Update the text adapter to shape using SkShaper.

Bug: skia:
Change-Id: Ie6ea579a1f58b2f6ba6101dcdfad8ae9809de808
Reviewed-on: https://skia-review.googlesource.com/c/183387
Commit-Queue: Florin Malita <fmalita@chromium.org>
Reviewed-by: Mike Reed <reed@google.com>
2019-02-07 15:32:20 +00:00
Ben Wagner
2fc1474f9d Add BOT/EOT to Shaper.
This informs HarfBuzz when we are at the beginning or end of a
paragraph so that it can handle a few rules in a special way.

Change-Id: I66a306f1ff7ddb2c1546b0fd9c0cee94cb9f7006
Reviewed-on: https://skia-review.googlesource.com/c/189850
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2019-02-06 23:04:59 +00:00
Hal Canary
6102192b96 SkLoadICU: simplify
Change-Id: I98cd1f36ca96a92b72974ae228465199638e4bea
Reviewed-on: https://skia-review.googlesource.com/c/189864
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2019-02-06 21:20:49 +00:00
Florin Malita
b26b8998fa [skottie] Fix logging of oversized messages
TBR=
Change-Id: I19077f2d287064139754efb5bdde8af81f06ff1b
Reviewed-on: https://skia-review.googlesource.com/c/189644
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2019-02-06 00:29:29 +00:00
Ben Wagner
0ec8ec27b8 Add a 'correct' shaper.
There are currently two consistent ways to do line breaking. The 'ok'
way where the entire line is shaped and the resulting glyphs broken
into lines based on hopeful cluster breaks. This has the one nice
property of preserving all shaping done by the font. The 'correct' way
is to shape to each break opportunity and pick the best one, then
continue to do so for each line. This has the nice property of not
shaping incorrectly.

Fortunately, the actual implementation can be hidden behind a common
interface. Keep both of them to ensure this continues to be the case.

Change-Id: I68086731c9c2eea00b26f1447e3ec17aba799ab3
Reviewed-on: https://skia-review.googlesource.com/c/156641
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2019-02-05 20:11:24 +00:00
Hal Canary
32498f0846 GN/ICU cleanup
For targets that depend on ICU, only define if `skia_use_icu` is set.

Move declare_args/skia_use_icu into skia.gni.  Other variables that need
to work like that can move there later.

icu/BUILD.gn defines SK_USING_THIRD_PARTY_ICU if needed.
SkShaper_harfbuzz.cpp SkPDFSubsetFont.cpp respects
SK_USING_THIRD_PARTY_ICU when calling SkLoadICU().

sfntly/BUILD.gn, harfbuzz/BUILD.gn, icu/icu.gni uses $_src variable to
reduce verbosity.   icu/icu.gni adds more headersto sources.

Change-Id: I9e000b9b19902d9f5c0c64e989bf42466aa8a299
Reviewed-on: https://skia-review.googlesource.com/c/189304
Commit-Queue: Hal Canary <halcanary@google.com>
Reviewed-by: Hal Canary <halcanary@google.com>
2019-02-05 17:27:55 +00:00
Chris Dalton
d7a5a1d27e Add a central skiagm::GM::DrawFailureMessage for error messages
Bug: skia:8731
Change-Id: If73216bd427a1ce773fa41044a45c1bbd7ea08e9
Reviewed-on: https://skia-review.googlesource.com/c/189124
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2019-02-04 17:49:42 +00:00
Florin Malita
8ec9a60bdb [skottie] Initial repeater support
TBR=reed
Bug: skia:8399
Change-Id: Iadaf6b7b363e345d736efd3fd3a5f401963a457b
Reviewed-on: https://skia-review.googlesource.com/c/188631
Commit-Queue: Florin Malita <fmalita@chromium.org>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2019-02-02 04:30:51 +00:00
Kevin Lubick
57abfe9737 Adjust variable names from paint to font
Bug: skia:
Change-Id: I9ca7c8dd5e0122b2a9d4edd4c4f4934e36151b7e
Reviewed-on: https://skia-review.googlesource.com/c/187383
Auto-Submit: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2019-01-28 20:57:56 +00:00
Ben Wagner
c5aa8ebe0d Use only icu c api in shaper.
Change-Id: I6e05404465b44ca48d391d0502dadbcef0b4b111
Reviewed-on: https://skia-review.googlesource.com/c/186702
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Ben Wagner <bungeman@google.com>
2019-01-24 21:53:25 +00:00
Mike Reed
77f94ea72b Move more utils into SkFontPriv, IWYU
Fissioned from https://skia-review.googlesource.com/c/skia/+/185460

Bug: skia:
Change-Id: Iaf980e931c17196f917602fc58fc39ab51e3d248
Reviewed-on: https://skia-review.googlesource.com/c/185840
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Auto-Submit: Mike Reed <reed@google.com>
2019-01-22 22:24:03 +00:00
Florin Malita
a4e1a63452 [skshaper] Relax create_hb_font assert
Log a message in debug mode instead of crashing.

Change-Id: Ib8d7733f3aab2e9f1324188a221550ccf13563cb
Reviewed-on: https://skia-review.googlesource.com/c/185881
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2019-01-22 22:20:33 +00:00
Florin Malita
c91527f297 [skottie] Fix rect/rrect/ellipse direction and starting point
Geometry effects (trim-path, etc) are sensitive to the SkPath conversion
direction and starting point.

Introduce SkSG{Rect,RRect) direction and initial point attributes, and
update Skottie to initialize these according to the AE model.

TBR=
Bug: skia:8303, skia:8328, skia:8299
Change-Id: I5ec82d747e015067c7fc416c9eded6eea73d759a
Reviewed-on: https://skia-review.googlesource.com/c/185689
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2019-01-22 17:56:40 +00:00
Mike Reed
9a4a05e211 iwyu
Bug: skia:
Change-Id: I4b9e1ef1e352f3495e92479501cfc5b6422e7a6d
Reviewed-on: https://skia-review.googlesource.com/c/185682
Commit-Queue: Mike Reed <reed@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2019-01-22 14:08:13 +00:00
Florin Malita
6d415bce3a [skshaper] Build tweaks
Preps for building in Chromium & G3.

Change-Id: I4eb802f27aac7d3652c3b3ce427dcc758d6c31fe
Reviewed-on: https://skia-review.googlesource.com/c/185000
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2019-01-18 20:25:40 +00:00
Florin Malita
950243df0e Hack up SkShaper to pass additional callback info
- rename LineHandler -> RunHandler (since it gets called per run)
- pass additionl run info:

  * line index
  * cumulative advance
  * ascent/descent/leading

Bug: skia:
Change-Id: Ie848e5a35243088b99989c73fdec44c6a1bdd051
Reviewed-on: https://skia-review.googlesource.com/c/183300
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2019-01-11 17:04:26 +00:00
Florin Malita
760a052c1e [sksg] Consolidate Matrix node implementations
Matrix and Matrix44 look almost identical -- consolidate as a template
class.

TBR=
Change-Id: I8f299a6138f190eb18de2e67b051307cf6a33383
Reviewed-on: https://skia-review.googlesource.com/c/182973
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2019-01-10 21:50:54 +00:00
Florin Malita
13c1b9649a [sksg] Add 3x3 Concat Transform specialization
When both inputs are 3x3, use 3x3 Concat.

TBR=
Change-Id: Ife6a98792c2ed57a2a987fe5d0bdf265aeb64b0a
Reviewed-on: https://skia-review.googlesource.com/c/182968
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2019-01-10 20:12:37 +00:00
Florin Malita
df0e1af263 [sksg] Hide some implementation methods from public Transform API
TBR=
Change-Id: I29ad15e83a64e6d9f13cd601379c6b624cba4ab5
Reviewed-on: https://skia-review.googlesource.com/c/182817
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2019-01-10 17:41:01 +00:00
Florin Malita
919e209d1a [sksg] 4x4 matrix support
Refactor the scene graph transform hierarchy to support 4x4 matrices:

  * rename current Transform to TransformEffect (operates as a render tree effect)
  * introduce a new Transform abstract base class, to replace current Matrix
  * refactor existing Matrix as a Transform specialization
  * introduce a new Matrix44 Transform specialization
  * refactor the existing composition helper (ComposedMatrix) as Concat,
    a Transform specialization (using composition instead of Matrix inheritance)

Change-Id: Ic3c1b499e10a0a229a7a76d4bef3dbc6a8b49194
Reviewed-on: https://skia-review.googlesource.com/c/182666
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2019-01-10 02:06:54 +00:00
Kevin Lubick
da3d8acce5 [canvaskit] Add path/canvas methods
ToCmds/MakePathFromCmds taken from PathKit, as were the tests
for those methods.

Bug: skia:
Change-Id: I9c52c04fe61e8934543a10f84ebf8b01b449f7f4
Reviewed-on: https://skia-review.googlesource.com/c/181565
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2019-01-07 16:32:57 +00:00
Kevin Lubick
faa73875d2 [*kit] fulfil promise immediately
I think this would only commonly happen for cases which files aren't
being loaded (debug asmjs), but could happen if multiple ready() calls
are made (which is discouraged).

Bug: skia:
Change-Id: If848aad8603f997661502563136ac590cc9a6d5a
Reviewed-on: https://skia-review.googlesource.com/c/181409
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2019-01-07 03:29:04 +00:00
Kevin Lubick
d2efe524af [pathkit] Increase test timeouts (for asmjs mostly)
Bug: skia:
Change-Id: Ia84b2eda24b43b858c3f95d860c3f9b6a880bc90
Reviewed-on: https://skia-review.googlesource.com/c/181401
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2019-01-04 20:59:36 +00:00
Kevin Lubick
275eaff3be [pathkit] Add .ready() to initialize
See https://github.com/kripken/emscripten/issues/5820 and
https://skia-review.googlesource.com/c/skia/+/181177 for more context.

(Problem was discovered in CanvasKit, and this ports the same fix to
PathKit).

Bug: skia:
Change-Id: Ic8b2fb399210631a571595a5b3d11d1736c00def
Reviewed-on: https://skia-review.googlesource.com/c/181178
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
2019-01-04 19:58:22 +00:00
Florin Malita
d2a18531e9 [skottie] Initial 3D layer transform support
TBR=
Change-Id: Ia849a0062a75863857edc66d8a5c1c62bfc6d00a
Reviewed-on: https://skia-review.googlesource.com/c/180362
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2019-01-02 19:28:33 +00:00
Florin Malita
9356393f5b [skottie] Derive most adapters from SkNVRefCnt
Bug: skia:
Change-Id: I6355a3802090a8da2c29486bd769d6a6b12af10f
Reviewed-on: https://skia-review.googlesource.com/c/180368
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2019-01-02 14:50:52 +00:00
Mike Reed
22451ccae5 accessors for RunBuffer as points or rsxforms
trying to reduce casts at call-sites

Bug: skia:
Change-Id: I7c74cfd89111f7a197cbb1d77b499e2adc193579
Reviewed-on: https://skia-review.googlesource.com/c/180363
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2019-01-02 04:10:36 +00:00
Kevin Lubick
fa720714c4 [canvaskit] Add files needed for npm release
Backport changes to pathkit too.

Bug: skia:
Change-Id: Id10f9ac52dc7d08f044eee1eeacc8737f1cd96f4
Reviewed-on: https://skia-review.googlesource.com/c/177894
Reviewed-by: Heather Miller <hcm@google.com>
2018-12-17 17:21:34 +00:00
Kevin Lubick
ec1c620316 Avoid system fonts when fuzzing
This should make reproducing certain fuzzes easier between oss-fuzz
and a typical dev's desktop.

This was the most straight-forward way I could think of to
accomplish this.  An ideal solution would "compile" a set of
fonts that was not the test set and embed it, but I lack the
domain knowledge to craft such a set.

If this method works ok, we can explore making the font set
more robust and varied.

Bug: 818769
Change-Id: I03eb2bc316caf7aec3ffa88e59ff29d76c8557ec
Reviewed-on: https://skia-review.googlesource.com/c/177800
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2018-12-14 17:11:56 +00:00
Florin Malita
9d0b306283 [skottie] Add initial tracing
Trace the following top-level entry points:

  - Animation::Builder::make
  - Animation::seek
  - Animation::render

Bug: skia:8601
Change-Id: I8497b9bca7744c210163ef344555e8b27a39d09f
Reviewed-on: https://skia-review.googlesource.com/c/177440
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2018-12-13 16:44:23 +00:00
Mike Reed
34c9b6d63e start removing legacy paint calls
Bug: skia:
Change-Id: I2a5c98c65e587015beb0ed6f6d5bcf5a3a1b69a2
Reviewed-on: https://skia-review.googlesource.com/c/177066
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2018-12-12 21:21:42 +00:00
Florin Malita
9867f61160 SkShaper per-line callback
Tweak SkShaper to call out for each line, instead of bundling everything
as a text blob.

Change-Id: Ic522f88afcf31cefd873dc8b5cde1ac2e107c64f
Reviewed-on: https://skia-review.googlesource.com/c/176592
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2018-12-12 17:54:12 +00:00
Mike Reed
722dd619cb use SkFont more
Bug: skia:
Change-Id: Ic88f04cb8326fd34596d31777cf853866d329d44
Reviewed-on: https://skia-review.googlesource.com/c/175593
Commit-Queue: Florin Malita <fmalita@chromium.org>
Auto-Submit: Mike Reed <reed@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2018-12-07 22:10:39 +00:00