Commit Graph

679 Commits

Author SHA1 Message Date
Brian Osman
107c66669d Make it safe to include SkRuntimeEffect.h from client code
Bundling the pipeline stage arguments also simplifies the code in
several spots.

Change-Id: I85e81b436a39378f753cc9404b6eeb27fe055525
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/261778
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2019-12-30 21:06:56 +00:00
Brian Osman
93de162dc2 Add SkRuntimeEffect::makeShader
This makes the effect *be* the factory, so we can get rid of
SkRuntimeShaderFactory (and later, SkColorFilterFactory).

Change-Id: I2cd95f1380a0ec1e65fe5a18b1226c042598a8bd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/261439
Auto-Submit: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2019-12-27 21:50:20 +00:00
Florin Malita
c8bf7969ec [skottie] Drop legacy effect logging
All clients have been updated

TBR=
Change-Id: I29e89d43606945f13e9933d34218b61be71db63d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/261279
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2019-12-20 16:30:19 +00:00
Florin Malita
e3f34a657b [skottie] Treat unknown effects as warnings
This used to be the case, but a recent change unintentionally switched
to errors.

TBR=
Change-Id: Ib92d2d04c667664921f47b48babdbe33e135b9ee
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/261179
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2019-12-19 22:04:16 +00:00
Brian Osman
77742c3503 Remove SkShader.Empty from CanvasKit
SkShaders::Empty may be easy to expose, but that doesn't mean we should.
It shouldn't even be public, but Chrome uses it in one place.

Change-Id: I398a5e6f782990a7baec0d9b1d0018f7456ff15f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/260956
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2019-12-19 14:11:17 +00:00
Kevin Lubick
e6e39bcbe0 [canvaskit] Fix SaveLayer constants
Turns out constant doesn't like to take an enum, but needs explicit
coercion to be an int.

Change-Id: I29c761fd2dfd9eb3cde0db3c0c3f0e97dd6ff411
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/260698
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2019-12-18 17:55:59 +00:00
Florin Malita
42725ae301 Reland "[skottie] Simplify effect builder lookup"
This reverts commit 187cd367d3.

Reason for revert: relanding with legacy enum support

Original change's description:
> Revert "[skottie] Simplify effect builder lookup"
> 
> This reverts commit ef363a9ce6.
> 
> Reason for revert: G3 unit tests failing
> 
> Original change's description:
> > [skottie] Simplify effect builder lookup
> > 
> > Layer effects fall into two categories:
> > 
> >   - effects that BM knows about: these get assigned a unique type enum
> >   - effects that BM doesn't know about: these are still exported, but
> >     get assigned a dummy type
> > 
> > To handle effects in the latter case, we rely on their canonical AE
> > name.
> > 
> > The list of supported effects has grown to the point where a) this
> > differentiation doesn't seem valuable anymore and b) the code is quite
> > repetitive.
> > 
> > Consoliate the lookup logic to rely solely on effect names + bsearch
> > table.
> > 
> > Change-Id: Ib5f9b064a373814865da9e8a26037209992e8b9b
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/259997
> > Commit-Queue: Florin Malita <fmalita@chromium.org>
> > Reviewed-by: Mike Reed <reed@google.com>
> > Reviewed-by: Mike Klein <mtklein@google.com>
> 
> TBR=mtklein@google.com,fmalita@chromium.org,reed@google.com
> 
> Change-Id: I3b4c681c260c121e422ade7395c33a77e788ff43
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/260196
> Reviewed-by: Florin Malita <fmalita@chromium.org>
> Commit-Queue: Florin Malita <fmalita@chromium.org>

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

# Not skipping CQ checks because original CL landed > 1 day ago.

Change-Id: I2a4360dc8216b8b45e20c6568c0a1d3d069aa56c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/260280
Reviewed-by: Florin Malita <fmalita@chromium.org>
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2019-12-16 19:56:22 +00:00
Shachar Langbeheim
07c4e1da31 remove use_PIC.
The Emscripten bug that required this change was fixed.

see:
https://skia-review.googlesource.com/c/skia/+/243317
https://github.com/emscripten-core/emscripten/issues/9317

Change-Id: Id3f6395a795bf61ce3f48d73a8749899ad55ef8a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/259516
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2019-12-16 16:56:10 +00:00
Florin Malita
187cd367d3 Revert "[skottie] Simplify effect builder lookup"
This reverts commit ef363a9ce6.

Reason for revert: G3 unit tests failing

Original change's description:
> [skottie] Simplify effect builder lookup
> 
> Layer effects fall into two categories:
> 
>   - effects that BM knows about: these get assigned a unique type enum
>   - effects that BM doesn't know about: these are still exported, but
>     get assigned a dummy type
> 
> To handle effects in the latter case, we rely on their canonical AE
> name.
> 
> The list of supported effects has grown to the point where a) this
> differentiation doesn't seem valuable anymore and b) the code is quite
> repetitive.
> 
> Consoliate the lookup logic to rely solely on effect names + bsearch
> table.
> 
> Change-Id: Ib5f9b064a373814865da9e8a26037209992e8b9b
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/259997
> Commit-Queue: Florin Malita <fmalita@chromium.org>
> Reviewed-by: Mike Reed <reed@google.com>
> Reviewed-by: Mike Klein <mtklein@google.com>

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

Change-Id: I3b4c681c260c121e422ade7395c33a77e788ff43
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/260196
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2019-12-15 03:01:25 +00:00
Florin Malita
ef363a9ce6 [skottie] Simplify effect builder lookup
Layer effects fall into two categories:

  - effects that BM knows about: these get assigned a unique type enum
  - effects that BM doesn't know about: these are still exported, but
    get assigned a dummy type

To handle effects in the latter case, we rely on their canonical AE
name.

The list of supported effects has grown to the point where a) this
differentiation doesn't seem valuable anymore and b) the code is quite
repetitive.

Consoliate the lookup logic to rely solely on effect names + bsearch
table.

Change-Id: Ib5f9b064a373814865da9e8a26037209992e8b9b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/259997
Commit-Queue: Florin Malita <fmalita@chromium.org>
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2019-12-14 19:28:14 +00:00
Mike Reed
cf0e3c63fd remove dead code around old SkPath enums
Change-Id: I8dc06da48e881d3a9c40b47c799afe27bdcce819
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/257689
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2019-12-14 01:58:10 +00:00
Brian Osman
9d10abe300 Remove all layout(ctype=...) from runtime SkSKL
Most of these did nothing, and I'd like to remove the feature. Also, the
benchmark was using 'in uniform' which isn't supported (it asserts in
debug build).

Change-Id: I671ca69fdd50811a2090c7a03f5f23e6b38e6f96
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/260043
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2019-12-13 22:02:03 +00:00
Mike Klein
f46d5ca492 use std::make_unique
Change-Id: I7c672ff6b8eb95ec8c1123a5bfdb202e1644f494
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/259281
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2019-12-12 22:32:45 +00:00
Florin Malita
46a331b93f [skottie] Cascading track matte support
Currently, we treat track matte source layers (tagged with td:1) as single-shot mask triggers:
we apply once to the following layer, then move on.

But track mattes can cascade: a layer with a matte can itself be applied as a track matte for the
following layer.

Also, for matte/masking purposes, only the layer content is being considered (ignoring blend mode
and any masks applied to the matte itself).

To support this, refactor the layer attachment code:

  - instead of tracking the presence of a single-shot matte source, always track
    previous layer content trees
  - instead of triggering matte attachment in the presence of a matte source, trigger based on
    the matte *target* property (tt: X)
  - log errors on unknown matte modes

Change-Id: I6c71d4007e1e27d3f3a139344bbf367d7bc6e29d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/259820
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2019-12-12 21:42:11 +00:00
Florin Malita
e1fa70000a [skottie] Invert effect support
https://helpx.adobe.com/after-effects/using/channel-effects.html#invert_effect

Change-Id: Iac8e291ab9cb57714c50f1e40cecb66b3dc64ee1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/259276
Commit-Queue: Florin Malita <fmalita@chromium.org>
Reviewed-by: Mike Klein <mtklein@google.com>
2019-12-11 23:07:04 +00:00
Julia Lavrova
c5313e6b2a Font features
Change-Id: I8ae44d715fd2fa195c209c8ecb514db3e9644c31
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/259100
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Julia Lavrova <jlavrova@google.com>
2019-12-10 19:19:24 +00:00
Julia Lavrova
f9c6ee5461 Fixing the fix for memory leak
Change-Id: I0be996b30d3d86fc57eb9423ee7df2feb08fbda4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/258883
Commit-Queue: Julia Lavrova <jlavrova@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2019-12-09 23:29:33 +00:00
Julia Lavrova
90bfd1c1c3 Small changes
Change-Id: Ic9c41a2dd11b4df8ab24037df0109e36536ec6c3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/257892
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Julia Lavrova <jlavrova@google.com>
2019-12-09 21:58:13 +00:00
Hal Canary
3f7c49c96d skparagraph: fix another leak
Change-Id: I2394dfb10994ce055d87f881ea3bd3c88ab634d6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/258881
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2019-12-09 21:39:13 +00:00
Hal Canary
189f30216b skparagraph: fix leak
Change-Id: Ieb13a5430ac78ba3d310331c72a96f0323e67d6e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/258811
Auto-Submit: Hal Canary <halcanary@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2019-12-09 19:33:56 +00:00
Kevin Lubick
99e9532050 [canvaskit] roll to 0.10.0
Change-Id: Id06aad4db1a5c827d70ae28be38709167ab749b2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/258815
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2019-12-09 17:51:23 +00:00
Florin Malita
870374825b [skottie] Explicit seek(0) in tools
With recent deferred image loading changes, Skottie relies on clients
to always/explicitly seek() before drawing a frame.

Some of the existing tools are still attempt to draw before the first
seek() fires (the animation callback is not guaranteed to occur before
the first draw).  For these, add an explicit seek(0) after loading the
animation, to ensure valid state.

TBR=
Change-Id: Ie453559af2d96560602b5e6508c25169dffb484d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/258805
Reviewed-by: Florin Malita <fmalita@chromium.org>
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2019-12-09 16:35:02 +00:00
Kevin Lubick
62836903bc [canvaskit] Expose SkShader combiners
Change-Id: I84652fcec828fea55e2aa35567c054e9678ecf80
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/258797
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2019-12-09 14:19:24 +00:00
Kevin Lubick
4b5b645049 [canvaskit] Add _RTShaderFactory for demos
Change-Id: Ib6dc1ff861efe4040508fea09c8a66d8d06db597
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/258568
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2019-12-06 19:35:25 +00:00
Jason Simmons
22bb52e95b Get baselines from cached default metrics if the text is empty
Change-Id: Ic04251d60d6d36f80c3e569312495190ba375d85
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/258488
Reviewed-by: Julia Lavrova <jlavrova@google.com>
Commit-Queue: Jason Simmons <jsimmons@google.com>
2019-12-06 18:36:55 +00:00
Ben Wagner
24ee4e0341 Add feature support to shaper.
Change-Id: Iab8bf9ab144d1661c0653b617ca394c3663ab35c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/248861
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Julia Lavrova <jlavrova@google.com>
2019-12-06 14:42:31 +00:00
Mike Klein
3e01360677 GCC gets worried when we memset Stats
... because it has a constructor, implied by all the initializers.
Luckily, that constructor does exactly what our memset() does.

Change-Id: Ibe538e9d840de9e6fd07d673783709df17b7b4fb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/258447
Commit-Queue: Florin Malita <fmalita@chromium.org>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2019-12-06 01:48:51 +00:00
Florin Malita
cc92b27c78 [skottie] Optionally-deferred single-frame image loading
Normally, we load single-frame images upfront to avoid instantiating
an animator (as the image content is supposed to be constant).

In certain cases, deferred behavior is desirable (and the extra animator
overhead is minimal).

Generalize MultiFrameAnimator to handle single-frame assets, and add an
optional deferred mode for single-frame image loading
(Animation::Builder::Flags::kDeferImageLoading).

Bug: skia:9686
Change-Id: I4d166cd1a0bf34ccb8679e7553848c831a9193d2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/258000
Commit-Queue: Avinash Parchuri <aparchur@google.com>
Reviewed-by: Avinash Parchuri <aparchur@google.com>
2019-12-05 21:46:59 +00:00
Florin Malita
6cc49538b3 [skottie] Fix precomposed camera sizing
Precomp layers can have a different size vs. main composition.

Instead of relying on the global animation (main comp) size, use the
current (pre)comp size when setting up cameras.

Change-Id: I54106375fb39dde2bfd11e14a38e5ec3e7190764
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/258156
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>
2019-12-05 14:34:15 +00:00
Kevin Lubick
0af13b3caf [canvaskit] update shaping example to have emoji
Docs-Preview: https://skia.org/?cl=257998
Change-Id: I4892f00d80375874198fc60edadf84ffe41a5f5b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/257998
Reviewed-by: Julia Lavrova <jlavrova@google.com>
2019-12-05 13:08:52 +00:00
Brian Salomon
4e1066f248 Remove SkSize& SkSize::operator=(const SkISize&)
Having it means you cannot write:

SkSize size;
float x, y;
size = {x , y};

clang allows it but GCC does not, claiming it is ambiguous between the
implicitly generated
SkSize& SkSize::operator=(const SkSize&)
  and
SkSize& SkSize::operator=(const SkISize&)

clang gives the same error if the former is explicitly declared default.

Change-Id: I3b64436ef6aa669b3d87e7f37057c5dcb4add987
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/257880
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2019-12-04 17:36:06 +00:00
Florin Malita
75368c3a02 [skottie] Deferred image frame resolution
Instead of always grabbing the first frame at load time, only do so for
single-frame images.

For multi-frame images, defer frame resolution until actually needed
(at seek time).

There's a slight complication in dealing with image scaling: since we
no longer know the intrinsic size of the frames upfront, we need to
set up a transform effect preemptively for multi-frame images, and
update on the fly when the frames are resolved.  This is not
necessarily bad, because theoretically frames could have different
sizes.

Bug: skia:9686
Change-Id: Ib831d0e2ecad061ba52bdd8721e7598ea38c1e6e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/257622
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2019-12-03 20:17:40 +00:00
Brian Osman
6104ba0dca Particles: Do a cleanup/standardization pass on the API
For clients not using JSON, the factories were inconsistent.

Change-Id: Ifd920fa1e18f5edffa12de238af8488406951e5b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/257683
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2019-12-03 20:06:18 +00:00
Florin Malita
a4f1391bb9 Reland "[skottie] Remove defensive seek(0) from Animation ctor"
This reverts commit e0f374bf8f.

Reason for revert: including tracing fix
Original change's description:
> Revert "[skottie] Remove defensive seek(0) from Animation ctor"
>
> This reverts commit 042fe0847b.
>
> Reason for revert: SkottieTracing bots not happy.
>
> Original change's description:
> > [skottie] Remove defensive seek(0) from Animation ctor
> >
> > It potentially causes unnecessary image frame loads.
> >
> > Well-behaved clients should always seek() before calling render().
> >
> > Bug: skia:9686
> > Change-Id: If16257dc947941541d9ae8906b5ec7b1754dd7df
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/257625
> > Reviewed-by: Mike Reed <reed@google.com>
> > Commit-Queue: Florin Malita <fmalita@chromium.org>
>
> TBR=fmalita@chromium.org,reed@google.com,aparchur@google.com
>
> Change-Id: I3b7efdfc8e0aed1deb8756d585f946b4309d469d
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: skia:9686
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/257630
> Reviewed-by: Florin Malita <fmalita@chromium.org>
> Commit-Queue: Florin Malita <fmalita@chromium.org>

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

Bug: skia:9686
Change-Id: Ib8a5d76821685cfa7e7dac61bcc31da5629d9055
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/257632
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2019-12-03 18:26:40 +00:00
Florin Malita
e0f374bf8f Revert "[skottie] Remove defensive seek(0) from Animation ctor"
This reverts commit 042fe0847b.

Reason for revert: SkottieTracing bots not happy.

Original change's description:
> [skottie] Remove defensive seek(0) from Animation ctor
> 
> It potentially causes unnecessary image frame loads.
> 
> Well-behaved clients should always seek() before calling render().
> 
> Bug: skia:9686
> Change-Id: If16257dc947941541d9ae8906b5ec7b1754dd7df
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/257625
> Reviewed-by: Mike Reed <reed@google.com>
> Commit-Queue: Florin Malita <fmalita@chromium.org>

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

Change-Id: I3b7efdfc8e0aed1deb8756d585f946b4309d469d
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:9686
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/257630
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2019-12-03 17:17:36 +00:00
Florin Malita
042fe0847b [skottie] Remove defensive seek(0) from Animation ctor
It potentially causes unnecessary image frame loads.

Well-behaved clients should always seek() before calling render().

Bug: skia:9686
Change-Id: If16257dc947941541d9ae8906b5ec7b1754dd7df
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/257625
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2019-12-03 16:49:10 +00:00
Kevin Lubick
eda0b436df [canvaskit] Add test and extern for MakeImage
This was originally exposed for use with specs/web-img-decode and has
seen some actual use.

Change-Id: I6cc4fdf431b45cbbc21b91881c688c5545ca44a3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/257317
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2019-12-03 15:39:48 +00:00
Brian Osman
db2e7641be Particles: SkImageBinding to allow sampling an image from script
Provides functionality similar to AE property maps

Change-Id: I1705706a6b7e25fbab55465f2e20d0b145330b0b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/255977
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2019-12-03 15:22:20 +00:00
Brian Osman
9dac0d8216 Particles: Better integration for ResourceProvider
This untangles some of the dirty state tracking and dynamic rebuilding
support (that's only needed for the GUI editor), so the core code is
more streamlined. It also paves the way for feeding the RP to bindings.

Change-Id: I208ec59622154fdb2845c3ae8f7efb070d1abfc7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/257476
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2019-12-03 14:12:50 +00:00
Julia Lavrova
3281b961c5 A new API call on Paragraph: a number of unresolved glyphs
Change-Id: Iba33c0df4aa9f2dc9b816c0954980ac8a971909b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/257326
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Julia Lavrova <jlavrova@google.com>
2019-12-02 19:23:45 +00:00
Mike Reed
2e3be5648a Reland "fix sense of ifdef for deprecated method"
This reverts commit b97a24a009.

Reason for revert: flag added to chrome

Original change's description:
> Revert "fix sense of ifdef for deprecated method"
> 
> This reverts commit aa98dd3d27.
> 
> Reason for revert: broke chrome, easy to add a flag there
> 
> Original change's description:
> > fix sense of ifdef for deprecated method
> > 
> > Change-Id: I32164225750b23e1cc26aa36a60feda27bbd90a8
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/257319
> > Reviewed-by: Florin Malita <fmalita@chromium.org>
> > Reviewed-by: Kevin Lubick <kjlubick@google.com>
> > Commit-Queue: Mike Reed <reed@google.com>
> 
> TBR=bungeman@google.com,kjlubick@google.com,fmalita@chromium.org,reed@google.com
> 
> Change-Id: I629bbd7f04a4ac8227c62f4d05cf2cb2601900c3
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/257328
> Reviewed-by: Mike Reed <reed@google.com>
> Commit-Queue: Mike Reed <reed@google.com>

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

Change-Id: If4c1e2a51fc8bc34f8053d716efea55e809967f7
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/257378
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2019-12-02 17:45:26 +00:00
Mike Reed
b97a24a009 Revert "fix sense of ifdef for deprecated method"
This reverts commit aa98dd3d27.

Reason for revert: broke chrome, easy to add a flag there

Original change's description:
> fix sense of ifdef for deprecated method
> 
> Change-Id: I32164225750b23e1cc26aa36a60feda27bbd90a8
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/257319
> Reviewed-by: Florin Malita <fmalita@chromium.org>
> Reviewed-by: Kevin Lubick <kjlubick@google.com>
> Commit-Queue: Mike Reed <reed@google.com>

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

Change-Id: I629bbd7f04a4ac8227c62f4d05cf2cb2601900c3
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/257328
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2019-12-02 16:45:39 +00:00
Mike Reed
aa98dd3d27 fix sense of ifdef for deprecated method
Change-Id: I32164225750b23e1cc26aa36a60feda27bbd90a8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/257319
Reviewed-by: Florin Malita <fmalita@chromium.org>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2019-12-02 16:17:34 +00:00
Brian Osman
2a490bc769 Add particle entry points to externs.js to fix missing symbols
Bug: skia:9513
Change-Id: Ibaf3ad930fdc0072916143dea63142ca0c6e4aeb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/257050
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: Brian Osman <brianosman@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2019-11-27 18:58:23 +00:00
Brian Osman
d12f2786e2 Use ResourceProvider in particles
Currently just for image drawable, but going to use this for
references to other kinds of data in bindings, too.

Change-Id: Ic6673530013337bbaadd2d3f1c040626ec24ffb8
Bug: skia:9513
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/256776
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2019-11-27 16:45:23 +00:00
Julia Lavrova
0193e8c6bd Bug fixes
Change-Id: Id2b75e515a3f9fa695339980a6c9036435f3f5d5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/256658
Commit-Queue: Julia Lavrova <jlavrova@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2019-11-26 21:12:44 +00:00
Florin Malita
466f571a51 [skottie] Handle null mask filter effects gracefully
We allow animating the mask filters, so we can end up with null filters
sometimes.

TBR=
Change-Id: Id93aa033407f58bfeb5e059210141c936c356701
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/256697
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2019-11-26 19:09:04 +00:00
Mike Reed
7d34dc7747 Revert "Revert "switch to new filltype for SkPath""
This reverts commit 3e7af41224.

Change-Id: Id4f66b3956f4bdbe690db20fc478b7365ee89717
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/256676
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Auto-Submit: Mike Reed <reed@google.com>
2019-11-26 17:43:14 +00:00
Brian Osman
4449f1f3fa Remove ResourceProvider and ImageAsset sample impls from skottie
All tools are updated to use the new copies in skresources

Change-Id: If3cfc3104d72535ea4c49f70f1fa68dcf78af987
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/256657
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Brian Osman <brianosman@google.com>
2019-11-26 15:47:14 +00:00
Brian Osman
849f4d6571 Copy SkottieUtils' classes into skresources
For now, we'll have two copies. Once clients are using the skresources
versions exclusively, we can remove the originals from skottie.

Change-Id: I3152f526b0505b8374bdd9b4513a80bddc702ccc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/256416
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2019-11-26 14:25:44 +00:00