Commit Graph

1475 Commits

Author SHA1 Message Date
Kevin Lubick
8172d16577 [canvaskit] Remove exposition of SkData
Change-Id: I5a7c2e30b2adc4b8947743ac82a800e96a7005b1
Bug: skia:10717
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/370879
Reviewed-by: Nathaniel Nifong <nifong@google.com>
2021-02-17 15:47:06 +00:00
John Stiles
dbd4e6f0c0 Move ProgramKind and ProgramSettings types out of SkSL::Program.
This change will allow these types to be forward-declared; C++ doesn't
allow forward declaration of types declared inside a struct. Moving
these types out of Programs resulted in a large diff.

The Settings::Value helper class has been moved inside of the
IRGenerator. In practice, it was actually just an implementation detail
of how IRGenerator looks up caps-values by name. It seems very unlikely
that this will be necessary elsewhere going forward.

Change-Id: I6119417fae608f1c492a27de746d2b550ef8ca20
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/370836
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2021-02-16 19:30:48 +00:00
John Stiles
1f19ce2272 Reland "Remove deprecated form of SkRuntimeEffect::Make."
This reverts commit e89b50ae05.

Reason for revert: landed Android fix at http://ag/13544365 (master) and
http://ag/13554983 (sc-dev)

Original change's description:
> Android roll broke with a compilation error:
> frameworks/base/libs/hwui/jni/Shader.cpp:243:37: error: no matching function for call to 'get'
>     sk_sp<SkRuntimeEffect> effect = std::get<0>(result)
>
> Revert "Remove deprecated form of SkRuntimeEffect::Make."
>
> This reverts commit 1cda194366.
>
> Reason for revert: <INSERT REASONING HERE>
>
> Original change's description:
> > Remove deprecated form of SkRuntimeEffect::Make.
> >
> > Chromium has migrated to the new API at https://crrev.com/c/2675855.
> >
> > Change-Id: Id4af77db2c462348e8031d28f56e543ad619c19c
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/367060
> > Reviewed-by: Brian Osman <brianosman@google.com>
> > Commit-Queue: Brian Osman <brianosman@google.com>
> > Commit-Queue: John Stiles <johnstiles@google.com>
> > Auto-Submit: John Stiles <johnstiles@google.com>
>
> TBR=mtklein@google.com,brianosman@google.com,johnstiles@google.com
>
> Change-Id: Ie18f865f3b7f5b0263db1e52b19cf6faa0500fdd
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/368616
> Reviewed-by: Stan Iliev <stani@google.com>
> Commit-Queue: Stan Iliev <stani@google.com>

TBR=mtklein@google.com,brianosman@google.com,stani@google.com,johnstiles@google.com

Change-Id: I9d679013cb275dc80aaaa977b7f1f4da31f36d1e
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/369037
Reviewed-by: John Stiles <johnstiles@google.com>
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2021-02-12 20:57:50 +00:00
Florin Malita
26af11c867 [skottie] Fix sphere lighting shader
Clamp s_base to avoid negative pow arguments.

Fixes rendering issues on Mac/Win.

Change-Id: I5176ffa6150ec430c2ab72115b74fd7ede5f5934
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/369482
Commit-Queue: Florin Malita <fmalita@chromium.org>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: Florin Malita <fmalita@chromium.org>
Reviewed-by: Brian Osman <brianosman@google.com>
2021-02-11 23:15:02 +00:00
Jorge Betancourt
1352d0e47d [canvaskit] perform audio asset lookup by layer id
Change-Id: Iac56d11a76be8d90df1159631a02f1713ece1bd8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/368938
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Jorge Betancourt <jmbetancourt@google.com>
2021-02-11 17:11:00 +00:00
Florin Malita
80aa5b1365 [skottie] Add threshold effect
https://helpx.adobe.com/lv/after-effects/user-guide.html/lv/after-effects/using/stylize-effects.ug.html#threshold_effect

Bug: skia:11311
Change-Id: I9d726b4526f2bbe584f11c77ee2e6829e5148956
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/369156
Commit-Queue: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2021-02-11 16:35:32 +00:00
Julia Lavrova
8d5ccce163 Glyph positioning in RTL empty lines
Bug: skia:11258
Change-Id: Icbb34e571ba53e893b2887c963a46677b16b43e0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/368754
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Julia Lavrova <jlavrova@google.com>
2021-02-10 22:27:18 +00:00
Florin Malita
792c2cb44e [skottie] Sphere effect lighting
Plumb lighting props and implement a Phong lighting model.

This is ~40% slower with the SW backend - to mitigate, construct two
runtime effects and only apply fancy lighting when needed.

Change-Id: If6f71253e7adc148f6d5cf5fbde2c1dff977f669
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/368246
Commit-Queue: Florin Malita <fmalita@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2021-02-10 21:34:57 +00:00
Julia Lavrova
39caaac7fd RTL Glyph positioning
Bug: skia:11257
Change-Id: I297763c9585b988f5f89fd87b596c39220115f6d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/368537
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Julia Lavrova <jlavrova@google.com>
2021-02-10 20:00:14 +00:00
Jorge Betancourt
0e604ca7b0 [canvaskit] add audio asset support to skottie-bindings
Change-Id: If4c36f0261a18ed068cd745a4c454c127d0e96bd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/360916
Reviewed-by: Florin Malita <fmalita@chromium.org>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Jorge Betancourt <jmbetancourt@google.com>
2021-02-10 17:19:12 +00:00
Stan Iliev
e89b50ae05 Android roll broke with a compilation error:
frameworks/base/libs/hwui/jni/Shader.cpp:243:37: error: no matching function for call to 'get'
    sk_sp<SkRuntimeEffect> effect = std::get<0>(result)

Revert "Remove deprecated form of SkRuntimeEffect::Make."

This reverts commit 1cda194366.

Reason for revert: <INSERT REASONING HERE>

Original change's description:
> Remove deprecated form of SkRuntimeEffect::Make.
>
> Chromium has migrated to the new API at https://crrev.com/c/2675855.
>
> Change-Id: Id4af77db2c462348e8031d28f56e543ad619c19c
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/367060
> Reviewed-by: Brian Osman <brianosman@google.com>
> Commit-Queue: Brian Osman <brianosman@google.com>
> Commit-Queue: John Stiles <johnstiles@google.com>
> Auto-Submit: John Stiles <johnstiles@google.com>

TBR=mtklein@google.com,brianosman@google.com,johnstiles@google.com

Change-Id: Ie18f865f3b7f5b0263db1e52b19cf6faa0500fdd
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/368616
Reviewed-by: Stan Iliev <stani@google.com>
Commit-Queue: Stan Iliev <stani@google.com>
2021-02-10 00:05:10 +00:00
Julia Lavrova
f756979dbf Fixing a crash in Flutter Text Editor
Change-Id: I01b92f7c5f6030afae164ba2999e3aa8168597b0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/368417
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Julia Lavrova <jlavrova@google.com>
2021-02-09 22:10:55 +00:00
John Stiles
1cda194366 Remove deprecated form of SkRuntimeEffect::Make.
Chromium has migrated to the new API at https://crrev.com/c/2675855.

Change-Id: Id4af77db2c462348e8031d28f56e543ad619c19c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/367060
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2021-02-09 21:27:34 +00:00
Florin Malita
21b8cec137 ResourceProviderProxyBase should forward loadAudioAsset()
ResourceProviderProxyBase is supposed to forward all virtuals to fProxy,
but it currently drops loadAudioAsset().

TBR=
Change-Id: I8c690802cd3ba6078232e210b032aa67499d7ba8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/368116
Auto-Submit: Florin Malita <fmalita@chromium.org>
Reviewed-by: Florin Malita <fmalita@google.com>
Commit-Queue: Florin Malita <fmalita@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2021-02-09 01:24:04 +00:00
Florin Malita
dfa269f1cd [skottie] Implement skew & skew axis support
Also add a SkMatrix::Skew() helper.

Change-Id: I3d385ddda107e54db2d5078e51da4e799defd8ac
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/368016
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Florin Malita <fmalita@google.com>
2021-02-08 22:24:38 +00:00
Tyler Denniston
627c6d2569 [svg] Refactor <pattern> and gradient stop elements to new parsing
Change-Id: I1fb84760f7a657aefeb7e0af3758766daac2d0f9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/367882
Reviewed-by: Florin Malita <fmalita@chromium.org>
2021-02-08 20:27:17 +00:00
Tyler Denniston
c683482e58 [svg] Refactor <polygon> and <polyline> to use new parsing
Change-Id: I7cc2dcce4a645326dcacadd28cbe1b3ea5f4ae36
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/367877
Commit-Queue: Tyler Denniston <tdenniston@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2021-02-08 20:27:17 +00:00
Tyler Denniston
52d9475b05 [svg] Refactor several simple nodes to new parsing code
Refactored nodes are <circle>, <ellipse>, <rect>, <line>.

Change-Id: I955c6a01d6533e61a0c12f56f97040ae0b5ed879
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/366721
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Tyler Denniston <tdenniston@google.com>
2021-02-08 20:27:17 +00:00
Tyler Denniston
1f4cd07af8 [svg] Support preserveAspectRatio for images
https://www.w3.org/TR/SVG11/struct.html#ImageElement
https://www.w3.org/TR/SVG11/coords.html#PreserveAspectRatioAttribute

We already had a function to compute the appropriate matrix, and since
we can share the functionality with other elements that establish a new
viewport (including svg, symbol, and a few others), this CL moves the
function to the SVG node base class.

Relevant test for images is struct-image-06.

Bug: skia:10842
Change-Id: I5d6261210d03959e28d0bd7189da7f4ea53abc03
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/366398
Commit-Queue: Tyler Denniston <tdenniston@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2021-02-05 15:59:10 +00:00
Kevin Lubick
a0fea40486 [canvaskit] Deploy 0.23.0
Change-Id: I436340f365f144c0cffc9cfb55af4199f5a4cf12
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/366397
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2021-02-04 19:09:15 +00:00
Brian Osman
f2f3d52ad5 Add CanvasKit bindings for SkRuntimeEffect's uniform data
Written to use the exact same names and semantics as particles.

Cq-Include-Trybots: luci.skia.skia.primary:Test-Debian10-EMCC-GCE-CPU-AVX2-wasm-Release-All-CanvasKit,Test-Debian10-EMCC-GCE-GPU-AVX2-wasm-Release-All-CanvasKit
Change-Id: I4031efbce06527a519f1ce8c261f79231554e1ef
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/365701
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2021-02-04 17:43:28 +00:00
Julia Lavrova
efae4d56e1 Glyph positions in empty lines (few places had to be fixed)
Bug: skia:11259
Change-Id: I6aa24f9f1f95698d39dbc2ae0e6836f404fd0b24
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/365491
Commit-Queue: Julia Lavrova <jlavrova@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2021-02-03 23:05:38 +00:00
Brian Osman
4d76f63e45 Fix particle bug where uniforms are allocated too late
Also adds an example particle system that uses uniforms, and an instance
of the particles GM that draws it.

Change-Id: I64e2514fd17c8ce615b4e13b9f82424f80b8424e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/356840
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
2021-02-03 22:50:28 +00:00
Julia Lavrova
e1db1fb6df Grapheme clusters and glypheme clusters edges don't match.
Bug: skia:11163
Change-Id: I8ba13c13843a2c04f3257a6857ba1a2a813dba76
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/361636
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Julia Lavrova <jlavrova@google.com>
2021-02-03 22:06:59 +00:00
John Stiles
20e92f77e2 Update SkRuntimeEffect::Make to take an Options struct.
This allows us to control the inline threshold of runtime effects in a
thread-safe way.

The new Make API now returns a struct, for readability; the old Make API
continues to return a tuple.

The old Make function is deprecated and subject to removal. You can
migrate to the new API by passing a default-constructed Options struct.
In this case there will be no difference in behavior.

Change-Id: Ic62d6f294f596d0a61095e35a87ccdbbe0b1cf93
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/363785
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2021-02-03 18:03:49 +00:00
Brian Osman
360035c244 Particle cleanup
Remove/rename some fields now that data migration is done, adjust
comments to reflect new data, etc.

Change-Id: I77a8ff182fc73699407eb711a54cf5642f23c257
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/365480
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2021-02-03 17:59:49 +00:00
Kevin Lubick
70b6729a05 [canvaskit] Add error callback for runtime effect constructor
It would otherwise be difficult/tedious/not-backwards-compatible
to return the RuntimeEffect AND the error message.

Change-Id: I9bdbafb653398ccbb72e6e762ec4b6af294f9110
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/365483
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
2021-02-03 17:35:23 +00:00
Kevin Lubick
5feaeb24d0 [canvaskit] Fix particles.setPosition and add test.
Change-Id: I49043df9e8fdf9ac7f5b25164a1c577f3c569b94
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/365478
Reviewed-by: Brian Osman <brianosman@google.com>
2021-02-03 15:52:23 +00:00
Julia Lavrova
045f87d27f Reasonable results for not styled text in findAllBlocks.
Bug: skia:11256
Change-Id: Ice964f722c3c9f15cf3feab3c74b1c7235bbea7f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/364636
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Julia Lavrova <jlavrova@google.com>
2021-02-03 14:40:09 +00:00
Tyler Denniston
8ca4626a4b [svg] Implement <image> element
https://www.w3.org/TR/SVG11/struct.html#ImageElement

Supported reference types are data and non-local URIs. Resource loading
requires a ResourceProvider to have been set on the render context.

Not handled in this CL:
- preserveAspectRatio support
- SVG reference types (i.e. '<image xlink:href="file.svg" ...')

Bug: skia:10842
Change-Id: Ieec7569f60516b01fc847f4160d0733b1e3a1cf5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/364576
Commit-Queue: Tyler Denniston <tdenniston@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2021-02-02 22:36:05 +00:00
Florin Malita
f3b1a751cb [skottie] Sphere layer effect
Implement CC Sphere.

No lighting support for now (matches AE's Light Intensity: 0,
Ambient: 100).

Change-Id: I7eb4d8f9c5dd4b4cb312321cefee0231a9901873
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/362457
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Florin Malita <fmalita@google.com>
2021-02-02 18:36:23 +00:00
Brian Osman
c81378624f Update all example particle data to new single-code-chunk format
Change-Id: Ic53dc7ecab1b44761fe06e6b528864d24cc5fa58
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/363940
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2021-02-02 18:07:53 +00:00
Kevin Lubick
e9e8e5d771 [canvaskit] Replace Postan value array with Float32Array.
Change-Id: Ie0e8a9271ef1b68551473fb9a1bcc9442f063efe
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/362477
Reviewed-by: Nathaniel Nifong <nifong@google.com>
2021-02-02 15:22:07 +00:00
Kevin Lubick
d62738d094 [canvaskit] Remove deprecated PathMeasure
This will make cleaning up the PosTan value easier.

Change-Id: I13aa12f94c560bf8539aa2edb1f9e13779635692
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/362458
Reviewed-by: Nathaniel Nifong <nifong@google.com>
2021-02-02 15:22:07 +00:00
Kevin Lubick
f6040ef2a7 [canvaskit] Remove value_array for vector3
Also removes the size value_objects, which appear unused.

Change-Id: Iecfc05b6c285b981415121943b7b43e2216516cd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/362339
Reviewed-by: Nathaniel Nifong <nifong@google.com>
2021-02-02 15:22:07 +00:00
Kevin Lubick
ed96264ad7 [canvaskit] Replace Point value_array with Float32Array
Using value_array (and value_object), while convenient,
adds a measurable overhead. This removes the Point value_object
and replaces it as a return value with Float32Array
(similar to rects). For inputs of a single point, I just
split it into x and y. For inputs with two points, I used
a _scratchFourFloats (formerly _scratchRect) bit of memory.

Two subtle decisions here:
 - Why not use scratch memory for a single point? The cost of
   having one extra param is a small/negligible price to pay
   for less complex code.
 - Why not accept Malloc objects? Again, simplicity. Accommodating
   Malloc would make the code harder to read and require more
   checks. I don't know if anyone wants to have malloced points;
   if they do, we can probably accommodate that.

Change-Id: I1b1c29f62e01c2f1c8c1218f58e3bad642214322
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/362097
Reviewed-by: Nathaniel Nifong <nifong@google.com>
2021-02-02 15:22:07 +00:00
Tyler Denniston
209857c20f [svg] Parse data and non-local IRIs
Not currently used, but will be used for <image> support.

Change-Id: I3bbb79c88890100901a8b85734d3a4d86a618848
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/360605
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Tyler Denniston <tdenniston@google.com>
2021-02-02 03:46:59 +00:00
Mike Reed
9223665316 Guard legacy matrixtransforms, and expose new one
Bug: skia:11236
Bug: skia:11235
Change-Id: I53fc0532a6067c5b30fc0345ded95d50d9955d38
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/363098
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
2021-02-01 22:10:39 +00:00
Kevin Lubick
3364579f83 [canvaskit] Move matrix helpers to their own file and make optional.
Change-Id: I904a491134d5e3b19de8b7c34dcde30f1fd2487e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/362037
Reviewed-by: Nathaniel Nifong <nifong@google.com>
2021-02-01 20:01:07 +00:00
Kevin Lubick
d1c6cc1692 Reland "[canvaskit] Break up helper.js into smaller files"
This is a reland of 2c3cec998f

Original change's description:
> [canvaskit] Break up helper.js into smaller files
>
> This will hopefully make some things easier to find/understand.
> I have a few more ideas for breaking up other parts.
>
> Bug: skia:11203
> Change-Id: Ia54c13fd6e3c897e04a737b258f6e77c50a1aed3
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/356839
> Reviewed-by: Nathaniel Nifong <nifong@google.com>

Bug: skia:11203
Change-Id: I8850e8e9e5f39f537232e0f1f8a814f763ab7853
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/363942
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2021-02-01 20:00:16 +00:00
Brian Osman
383168902b Particle refactor: Only have one code string, uniforms, etc.
Leverage the field visitor to temporarily support effects with the old
JSON layout.

See also: https://skia-review.googlesource.com/c/buildbot/+/363784

Change-Id: Ifab128172089fe9e570be96d7067c6c9d25aae9b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/363878
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
2021-02-01 19:29:48 +00:00
Brian Osman
7935900cad Make SkParticleEffect::RegisterParticleTypes thread-safe
TSAN caught this when I added particle GMs.

Change-Id: I6c03afe4b7a4323c7b8d8a1eaf197ff9aa76a09c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/362498
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2021-01-30 23:04:50 +00:00
John Stiles
03da7cb8a3 Revert "[canvaskit] Break up helper.js into smaller files"
This reverts commit 2c3cec998f.

Reason for revert: broken in Google3?

http://test/ui?utm_source=tap-notifier&utm_medium=email&utm_campaign=buildcop#t=//third_party/skia/HEAD/modules/canvaskit:canvaskit_web_tests_chrome-linux&cl=354150879&p=skia.canvaskit&flags=CAMQBQ==

https://test.corp.google.com/ui#cl=354150879&prefer_presubmit=false

http://fusion2/invocations/b963e4f2-25af-4bab-93c3-2da799e56b15/targets/%2F%2Fthird_party%2Fskia%2FHEAD%2Fmodules%2Fcanvaskit:canvaskit_web_tests_chrome-linux/tests

Original change's description:
> [canvaskit] Break up helper.js into smaller files
>
> This will hopefully make some things easier to find/understand.
> I have a few more ideas for breaking up other parts.
>
> Bug: skia:11203
> Change-Id: Ia54c13fd6e3c897e04a737b258f6e77c50a1aed3
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/356839
> Reviewed-by: Nathaniel Nifong <nifong@google.com>

TBR=kjlubick@google.com,nifong@google.com

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

Bug: skia:11203
Change-Id: I6e953a702713fd81a02ff2776f61e923783a577b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/362697
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2021-01-30 06:25:29 +00:00
Brian Osman
38d8deae8f Revert "Add particle GM that uses uniforms, fix related bug in particle effect"
This reverts commit 964b4465c4.

Reason for revert: Earlier CL needs revert

Original change's description:
> Add particle GM that uses uniforms, fix related bug in particle effect
>
> We weren't allocating uniform storage until after the first update, far
> too late for users to pump uniform values in. They're now allocated as
> soon as the effect is created, which is tested by the new GM.
>
> Change-Id: Ia0084bcec5986479c350ead27d14344c3ed82520
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/362176
> Reviewed-by: Brian Osman <brianosman@google.com>
> Commit-Queue: Brian Osman <brianosman@google.com>

TBR=brianosman@google.com

Change-Id: Ib6f963840af2abba0a4e6b99185f4010b61dde54
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/362418
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2021-01-29 19:21:49 +00:00
Kevin Lubick
365949cf54 [canvaskit] Skip particles gms
The gms are failing to link at the moment with the current build.

Change-Id: I3c73c68c9bfd053ffb2687e54ed9d0899dadca5a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/362337
Reviewed-by: Brian Osman <brianosman@google.com>
2021-01-29 19:17:08 +00:00
Mike Reed
99da77ae93 Pass sampling to drawImage
Bug: skia:7650
Change-Id: Ia0e02023ab65267e0be17ee1509c8562fe55d75a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/362180
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2021-01-29 18:53:48 +00:00
Brian Osman
964b4465c4 Add particle GM that uses uniforms, fix related bug in particle effect
We weren't allocating uniform storage until after the first update, far
too late for users to pump uniform values in. They're now allocated as
soon as the effect is created, which is tested by the new GM.

Change-Id: Ia0084bcec5986479c350ead27d14344c3ed82520
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/362176
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2021-01-29 18:01:48 +00:00
Mike Reed
0ab283aaf2 Revert "Hide SK_SUPPORT_LEGACY_DRAWIMAGE_NOSAMPLING flag"
This reverts commit 5817fe1069.

Reason for revert: broke GifTest

Original change's description:
> Hide SK_SUPPORT_LEGACY_DRAWIMAGE_NOSAMPLING flag
>
> Bug: skia:7650
> Change-Id: I7924efdbbb957c0453c5444796dc31f0b0f7459b
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/361437
> Commit-Queue: Mike Reed <reed@google.com>
> Reviewed-by: Kevin Lubick <kjlubick@google.com>

TBR=kjlubick@google.com,reed@google.com

Change-Id: I1e6dc844b8780b332ef94234bed2e8fbdf60f8cf
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:7650
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/362179
Reviewed-by: Mike Reed <reed@google.com>
2021-01-29 17:25:45 +00:00
Mike Reed
5817fe1069 Hide SK_SUPPORT_LEGACY_DRAWIMAGE_NOSAMPLING flag
Bug: skia:7650
Change-Id: I7924efdbbb957c0453c5444796dc31f0b0f7459b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/361437
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2021-01-29 17:06:48 +00:00
Florin Malita
24df67d04e Reland "[svg] Plumb a ResourceProvider"
This is a reland of dd29e20904

Original change's description:
> [svg] Plumb a ResourceProvider
>
> ... for image loading.
>
> Update the SVG tools to pass local/FS resource providers.
>
> Change-Id: I2c0e446047da87f177fde0f23b7ea1f0a856e808
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/359996
> Commit-Queue: Florin Malita <fmalita@google.com>
> Reviewed-by: Tyler Denniston <tdenniston@google.com>

Change-Id: I28de60b299fc89f46b090812fc632105143fb6da
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/360607
Commit-Queue: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@google.com>
Reviewed-by: Florin Malita <fmalita@google.com>
2021-01-27 21:12:23 +00:00