Commit Graph

169 Commits

Author SHA1 Message Date
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
Mike Reed
6d59568196 change private alloc methods to also take fonts
Bug: skia:2664
Change-Id: I772534179ce0c948984640f9fffc22e0372fce97
Reviewed-on: https://skia-review.googlesource.com/c/174848
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2018-12-06 02:15:36 +00:00
Mike Reed
97f3cc2085 flag to convert to SkTextEncoding
Bug: skia:
Change-Id: I9628bcabc5c6f902b79009e4f21badff3e8cca94
Reviewed-on: https://skia-review.googlesource.com/c/173980
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2018-12-03 15:20:36 +00:00
Florin Malita
91af8d8202 [skottie] Expose composition markers to embedders
Add a MarkerObserver interface (to replace the current
AnnotationObserver), and update CustomPropertyManager to intercept both
properties and markers.

TBR=
Change-Id: If79de419066916bc596316f0a551c75564069239
Reviewed-on: https://skia-review.googlesource.com/c/173766
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2018-12-01 04:44:03 +00:00
Brian Salomon
2335644771 Fix occurrences of "-Wextra-semi-stmt"
Docs-Preview: https://skia.org/?cl=173761
Change-Id: Iefdb91cd28eabb4b01b7b42a4f300b0b4caf05d9
Reviewed-on: https://skia-review.googlesource.com/c/173761
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2018-11-30 23:23:09 +00:00
Florin Malita
8ac81b7fb5 [skottie] Add a custom property manager util class
To facilitate demo code consolidation, introduce a custom property
manager which filters for node names starting with '$' and treats all
properties sharing the same name unitarily.

Update the Colorize GM to use this new helper.

Also revisit the PropertyObserver interface:

 * aliases for client-facing value types
 * introduce a new (decomposed) TransformPropertyValue, to replace component-wise setters
 * consolidate the PropertyHandle interface to only expose get()/set()

Bug: skia:
Change-Id: I9aa9ee80c1fb57bbfbacab0fc3f017da909b24d9
Reviewed-on: https://skia-review.googlesource.com/c/173220
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2018-11-28 17:12:07 +00:00
Hal Canary
2a1848d2aa SkShaper->SkFont
Change-Id: I6293f08c426650e3d1da8b2f94a81f7b0a65e8a3
Reviewed-on: https://skia-review.googlesource.com/c/172969
Commit-Queue: Ben Wagner <bungeman@google.com>
Auto-Submit: Hal Canary <halcanary@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2018-11-27 18:53:32 +00:00
Florin Malita
f7d6ac1f0d [sksg] Expose SkFont::Edging in TextNode
(instead of SkPaint flags)

TBR=
Change-Id: I31566f29d7922b26898234c357d8d249ebc1e094
Reviewed-on: https://skia-review.googlesource.com/c/172504
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2018-11-21 22:48:00 +00:00
Mike Reed
2ed7820970 use SkFont in a lot of places
Bug: skia:
Change-Id: I86df3f650eb5bb0219b3251ef5f8e95403838bba
Reviewed-on: https://skia-review.googlesource.com/c/172482
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2018-11-21 20:44:03 +00:00
Kevin Lubick
1a05fceb38 [canvaskit] Expand canvas2d API
Made addPath take one more arg to allow for append/expand
(which makes emulating the HTML canvas easier).

Add Gold test for various lineTo/pathTo, etc.

Make CanvasKit.Color() choose a better value for alpha
when omitted (was 0, should be 1).

Add some parsing logic to deal with colors/font sizes.
Fonts are going to be rather complex it seems.

Moves some arc-related logic to the JS side, (although
this should preserve the behavior of CanvasKit.arc() to
behave like the Canvas implementation)

Make Examples and tests to a side-by-side comparison to
HTML canvas where applicable.

Add a Changelog for PathKit.  There was a bug (I thought), but
turns out I was wrong.  The Changelog will be for future
bug fixes.

Bug: skia:
Change-Id: I1bd603fdb518232604b098e24543e3453015b504
Reviewed-on: https://skia-review.googlesource.com/c/170446
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2018-11-20 18:39:43 +00:00
Hal Canary
ddef43ffdf SkShaper: better error info.
Change-Id: Ie7966e22282ef25861cc775bd0904c113ded76c1
Reviewed-on: https://skia-review.googlesource.com/c/171523
Commit-Queue: Hal Canary <halcanary@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
Auto-Submit: Hal Canary <halcanary@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2018-11-16 16:21:00 +00:00
Mike Reed
b5784ace85 use SkFontMetrics so we can deprecated the typedef
Bug: skia:
Change-Id: Icd40c042b0a8251bbd0b39dd3ee1a4634fff379f
Reviewed-on: https://skia-review.googlesource.com/c/170344
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2018-11-12 15:03:03 +00:00
Florin Malita
a8316554cb [skottie] Make animated image support generally available
Consolidate some helpers under skottie_utils, and update all related
tools to support animated images.

TBR=
Change-Id: If08e97143a11d9a414f3230a49ab4284c508b9d0
Reviewed-on: https://skia-review.googlesource.com/c/169342
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2018-11-10 19:52:19 +00:00
Mike Reed
9edbf42e75 Revert[4] "hide nested hinting enum"
This reverts commit 8e12cc6dfe.

Bug: skia:
Change-Id: Ice5e3480adad75ab77d97f7366495015f36b15a6
Reviewed-on: https://skia-review.googlesource.com/c/169520
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2018-11-08 16:33:04 +00:00
Mike Klein
8e12cc6dfe Reland "Revert "hide nested hinting enum""
This reverts commit f49563bf92.

Reason for revert: Google3 also.

Original change's description:
> Revert "Revert "hide nested hinting enum""
> 
> This reverts commit 6bd19df9fa.
> 
> Restores original CL, but adds guards for flutter.
> 
> Bug: skia:
> Change-Id: I380b4ea87d293355026d734249aa2b8c397da144
> Reviewed-on: https://skia-review.googlesource.com/c/169345
> Reviewed-by: Florin Malita <fmalita@chromium.org>
> Commit-Queue: Mike Reed <reed@google.com>
> Auto-Submit: Mike Reed <reed@google.com>

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

Change-Id: I26a07555df56ce92e86b114ecf4ab64643e71ed1
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/c/169441
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2018-11-07 23:56:24 +00:00
Mike Reed
f49563bf92 Revert "Revert "hide nested hinting enum""
This reverts commit 6bd19df9fa.

Restores original CL, but adds guards for flutter.

Bug: skia:
Change-Id: I380b4ea87d293355026d734249aa2b8c397da144
Reviewed-on: https://skia-review.googlesource.com/c/169345
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
Auto-Submit: Mike Reed <reed@google.com>
2018-11-07 22:47:53 +00:00
Mike Reed
6bd19df9fa Revert "hide nested hinting enum"
This reverts commit fbebecee0e.

Reason for revert: need staging guard for flutter

Original change's description:
> hide nested hinting enum
> 
> Bug: skia:2664
> Bug: skia:8527
> Change-Id: I8f4b832d5524fb792bcc608d6bd515229881b048
> Reviewed-on: https://skia-review.googlesource.com/c/168270
> Commit-Queue: Mike Reed <reed@google.com>
> Reviewed-by: Florin Malita <fmalita@chromium.org>

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

Change-Id: I19496daa059932574f36ac47061068a81d5524c3
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:2664, skia:8527
Reviewed-on: https://skia-review.googlesource.com/c/169344
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2018-11-07 22:06:01 +00:00
Mike Reed
fbebecee0e hide nested hinting enum
Bug: skia:2664
Bug: skia:8527
Change-Id: I8f4b832d5524fb792bcc608d6bd515229881b048
Reviewed-on: https://skia-review.googlesource.com/c/168270
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2018-11-07 21:42:28 +00:00
Florin Malita
5d3deb7301 [skottie] Preserve image aspect ratio
When the intrinsic image dimensions don't match the declared asset size,
use an aspect-preserving matrix for scaling.

Bug: skia:
TBR=
Change-Id: Ie361f464fdbc2c32cb898c9f97103521162b46a7
Reviewed-on: https://skia-review.googlesource.com/c/168274
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
Auto-Submit: Florin Malita <fmalita@chromium.org>
2018-11-06 17:24:58 +00:00
Kevin Lubick
e70c6b13dd Update emsdk-release image
Bug: skia:
Change-Id: I780912e1c481765d2d17d2ce66a27470ee8b4912
Reviewed-on: https://skia-review.googlesource.com/c/168483
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2018-11-06 13:21:34 +00:00
Kevin Lubick
e71e9ef311 [canvaskit] Add catchException everywhere
This should make the logs in the bots more actionable by showing
the error and trace.

This also fixes the API change causing mysterious red.

Bug: skia:
Change-Id: I38df2bb4557041f8bdfefcae5c8d95b58e770033
Reviewed-on: https://skia-review.googlesource.com/c/168180
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2018-11-05 13:07:02 +00:00
Florin Malita
0a8b4e1acb [skottie] Add support for explicit text line breaks
To support wacky explicit AE line breaking:

  * add sksg::TextBlob (SG node backed by externally-built text blobs)
  * add skottie::TextAdapter logic to handle \r line breaks and construct
    the blob explicitly

Change-Id: I2eed9adf28a8c3c1f7de5bbec3d32abd7ddbd484
Reviewed-on: https://skia-review.googlesource.com/c/167384
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2018-11-04 15:19:46 +00:00
Kevin Lubick
b5ae3b5afc [canvaskit] Add drawVertices API
This also does some clean up to how we name enums - the caps felt a bit
obnoxious. CAPS are reserved now for constants (like colors).

Small bug fix with leaking memory on discrete path effects

This also adds a few more things from PathKit

Bug: skia:
Change-Id: Iad7e21ac36d35a36a8b255dc82b1dcc886344db1
Reviewed-on: https://skia-review.googlesource.com/c/166804
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2018-11-03 12:18:04 +00:00
Hal Canary
0dfa208450 SkShaper: Fix a couple of crashes when fonts aren't found
Change-Id: Id62bb0e0edde25fe90f63547d4dbedada2c09909
Reviewed-on: https://skia-review.googlesource.com/c/166803
Auto-Submit: Hal Canary <halcanary@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2018-10-31 17:46:54 +00:00
Mike Reed
3a42ec0ee7 hide the SkPaint::Align enum entirely
Bug: skia:2664
Change-Id: I080b015dbcb3a3cd73bb6847f3243a996d5f7b7d
Reviewed-on: https://skia-review.googlesource.com/c/166282
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2018-10-30 17:26:47 +00:00
Mike Klein
408ef21c79 Revert "replace SkNVRefCnt with SkRefCnt"
This reverts commit 0fb1ee98cf.

Reason for revert: looks like this increased size by ~8K.

Original change's description:
> replace SkNVRefCnt with SkRefCnt
> 
> SkNVRefCnt trades a small amount of code size (vtable) and runtime
> (vptr) memory usage for a larger amount of code size (templating).  It
> was written back in a time when all we were really thinking about was
> runtime memory usage, so I'm curious to see where performance, code
> size, and memory usage all move if it's removed.
> 
> Looking at the types I've changed here, my guess is that performance and
> memory usage will be basically unchanged, and that code size will drop a
> bit.  Nothing else it's nicer to have only one ref-counting base class.
> 
> Change-Id: I7d56a2b9e2b9fb000ff97792159ea1ff4f5e6f13
> Reviewed-on: https://skia-review.googlesource.com/c/166203
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Mike Klein <mtklein@google.com>

TBR=mtklein@google.com,bsalomon@google.com,mtklein@chromium.org

Change-Id: Ibcfcc4b523c466a535bea5ffa30d0fe2574c5bd7
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/166360
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2018-10-30 15:23:06 +00:00
Mike Klein
0fb1ee98cf replace SkNVRefCnt with SkRefCnt
SkNVRefCnt trades a small amount of code size (vtable) and runtime
(vptr) memory usage for a larger amount of code size (templating).  It
was written back in a time when all we were really thinking about was
runtime memory usage, so I'm curious to see where performance, code
size, and memory usage all move if it's removed.

Looking at the types I've changed here, my guess is that performance and
memory usage will be basically unchanged, and that code size will drop a
bit.  Nothing else it's nicer to have only one ref-counting base class.

Change-Id: I7d56a2b9e2b9fb000ff97792159ea1ff4f5e6f13
Reviewed-on: https://skia-review.googlesource.com/c/166203
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2018-10-30 13:26:12 +00:00
Mike Klein
6ddd4421ee only build non-prod skottie/sksg code in our tree
This this is enough to get Fuchsia going?

Change-Id: Id6577ee6b4e3c2cbae5ec8c42f3e004712ea477c
Reviewed-on: https://skia-review.googlesource.com/c/163442
Reviewed-by: Sanjay Chouksey <sanjayc@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Klein <mtklein@google.com>
2018-10-18 17:50:51 +00:00
Florin Malita
928db927f7 [skottie] Clang-tidy fixes
Mostly const-relax to allow moving.  Also add an r-val overload for
Node attribute setters.

Change-Id: I15e5eeee95b7c2a460844fec5a5d312d59b612ca
Reviewed-on: https://skia-review.googlesource.com/c/163168
Commit-Queue: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Klein <mtklein@google.com>
Auto-Submit: Florin Malita <fmalita@chromium.org>
Reviewed-by: Mike Klein <mtklein@google.com>
2018-10-17 21:38:26 +00:00
Kevin Lubick
3d99b1e347 Add Correctness tests for CanvasKit
Also make a CPU only and GPU only build (although
the latter still has a lot of CPU logic).

Bug: skia:
Change-Id: I857c2300021c2adb5344865c28e4ad3e8d332954
Reviewed-on: https://skia-review.googlesource.com/c/162022
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2018-10-16 14:32:28 +00:00
Kevin Lubick
556350de37 Add Perf jobs for PathKit
We have a similar ingestion strategy to Gold.

I tried to use something off the shelf like benchmark.js
but passing the PathKit context into the benchmarks was
non-trivial. Plus, making a basic benchmarking tool
ended up being not too hard.

We should be able to re-use the docker container/aggregator
for CanvasKit too.

Bug: skia:
Change-Id: I613dfc58ea57c31cf71566a8ac55f8df9272ad25
Reviewed-on: https://skia-review.googlesource.com/c/161620
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
Reviewed-by: Stephan Altmueller <stephana@google.com>
2018-10-12 19:50:04 +00:00
Florin Malita
21119ace66 [skottie] Add support for fill effect opacity
Also, it turns out layer effect properties are keyed by their
index in the property array, and not by "ty".  Update the
implementation to reflect this.


Change-Id: I72c6cf83f60ee1f8240222c7e2be2d567555a772
Reviewed-on: https://skia-review.googlesource.com/c/161840
Commit-Queue: Florin Malita <fmalita@chromium.org>
Reviewed-by: Mike Reed <reed@google.com>
2018-10-12 17:38:28 +00:00
Florin Malita
4963a64bc1 [skottie] Fix image loading in Viewer
With the switch to ImageAsset, I forgot to update the default/local
resource loader.

TBR=
Change-Id: I1ab898a896162718df04094a31648bf8e876d91b
Reviewed-on: https://skia-review.googlesource.com/c/161546
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2018-10-11 20:47:32 +00:00
Kevin Lubick
e805b243f6 Tweak to compile flags
Bug: skia:
Change-Id: I067fa83e1a07b244bec71ed4f95c144dc7e2edc1
Reviewed-on: https://skia-review.googlesource.com/c/161143
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2018-10-10 19:10:26 +00:00
Florin Malita
d9c56b41d4 [skottie] Support external annotations
Add a callback mechanism for passing opaque/external annotation string
dictionaries to the embedder.

Change-Id: I2b053d6697cdd51a310ced687e2ba454ab39a24a
Reviewed-on: https://skia-review.googlesource.com/c/160900
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2018-10-09 20:22:08 +00:00
Kevin Lubick
8e9750d3c5 Add CanvasKit build
Building CanvasKit uses very similar logic to PathKit, so there
was a fair amount of copy/paste/customize.

Fixes the name of skia.js/wasm -> canvaskit.js/wasm and
adds a package.json to formally track versions.

Also move PathKit helper scripts to align better.

Docs-Preview: https://skia.org/?cl=160463
Bug: skia:
Change-Id: Ie75b30592dcc4d520dca41f6f5579006aaa8849b
Reviewed-on: https://skia-review.googlesource.com/c/160463
Reviewed-by: Eric Boren <borenet@google.com>
2018-10-09 13:56:56 +00:00
Florin Malita
2c06e14697 [skottie] Optional path control points
Make parsing the in/out Bezier control points optional (default [0,0]).

Change-Id: Id1ef43cea133fab3a112e653d4ce2ab21b91effb
Reviewed-on: https://skia-review.googlesource.com/c/159980
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2018-10-05 16:07:01 +00:00
Florin Malita
9059c23946 [skottie] Remove temporary ResourceProvider::load() fallback
All clients are now using loadImageAsset().

TBR=
Change-Id: I3d7800fc9a294b01aaa8e21a39703e01fa866a40
Reviewed-on: https://skia-review.googlesource.com/c/159946
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
Auto-Submit: Florin Malita <fmalita@chromium.org>
2018-10-05 15:32:25 +00:00
Mike Klein
e749c2f30c looks like Animation can use SkNVRefCnt?
It's not otherwise virtual, so this'll make it a pointer smaller.
Just happened to notice this when debugging WASM bindings with Kevin.

Change-Id: I9fc051048a9c9cd65927be5a7bbf3fd19ea7df33
Reviewed-on: https://skia-review.googlesource.com/c/159301
Commit-Queue: Mike Klein <mtklein@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2018-10-03 21:07:29 +00:00
Florin Malita
62c6bd910a [skottie] Multi-frame image support
Extend the image asset provider API to support animated/multi-frame images.

Add a GM based on SkAnimCodecPlayer + animated public domain GIF
(source: https://giphy.com/explore/public-domain).

Bug: skia:
Change-Id: Iaa596e01a7626ca6574db1ebc90632f5a9a02bdc
Reviewed-on: https://skia-review.googlesource.com/159162
Commit-Queue: Florin Malita <fmalita@chromium.org>
Reviewed-by: Mike Reed <reed@google.com>
2018-10-03 19:02:35 +00:00
Florin Malita
57b9d4071b [skottie] External logger support
Add a skottie::Logger interface, allowing clients to register for log events
from the animation builder.

Convert existing log messages to the new machinery.

Change-Id: If9083f89b27f197bfc0d8d81860bbacb6b764be3
Reviewed-on: https://skia-review.googlesource.com/c/158580
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2018-10-02 18:17:35 +00:00
Florin Malita
bee88d433d [sksg] Fix inval tracking in Group::removeChild()
TBR=
Change-Id: If3536f8be9d379402cde18c0482108fcf5ae01bb
Reviewed-on: https://skia-review.googlesource.com/158822
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2018-10-02 17:27:34 +00:00