Commit Graph

40 Commits

Author SHA1 Message Date
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
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
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
Mike Reed
3e7af41224 Revert "switch to new filltype for SkPath"
This reverts commit 3a50981a83.

Reason for revert: chrome win build found compile-problem in xpsdevice

Original change's description:
> switch to new filltype for SkPath
> 
> Change-Id: I7793324a9acf4afb0eb38c1e20fbb38eac25d636
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/256102
> Reviewed-by: Florin Malita <fmalita@chromium.org>
> Commit-Queue: Mike Reed <reed@google.com>

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

Change-Id: Iacb3566da61c2512b9bd6b7e42b592febc85e031
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/256530
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2019-11-26 03:34:30 +00:00
Mike Reed
3a50981a83 switch to new filltype for SkPath
Change-Id: I7793324a9acf4afb0eb38c1e20fbb38eac25d636
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/256102
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
2019-11-25 22:31:46 +00:00
Kevin Lubick
9c2b7cfe90 [canvaskit] Try some things to reduce GPU test flakiness
1) some flags that "The Internet" says may help
2) retry running the test script up to 3 times.

I wasn't able to reproduce the crashes with a non-Docker
Chrome, only in the Docker container, which was
very hard to debug.

Change-Id: I87f31c32f63b2770d8d5afa6a8e4b90c35dbf0bb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/255820
Reviewed-by: Eric Boren <borenet@google.com>
Reviewed-by: Leandro Lovisolo <lovisolo@google.com>
2019-11-21 20:56:42 +00:00
Kevin Lubick
3085d9ac7d [canvaskit] Roll chrome version for testing
Also disabling failing perf test.

Change-Id: I5776a5dfba0d429ad6a9d725de26c585e61ba37b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/249427
Reviewed-by: Hal Canary <halcanary@google.com>
2019-10-18 17:37:52 +00:00
Kevin Lubick
fa5a138170 [canvaskit] Update to build with emscripten 1.38.47
Bug: skia:9052
Change-Id: Ic1aec2c9b8ace556f5b77862582894f59fd26b64
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/247302
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2019-10-09 15:08:10 +00:00
Mike Reed
4241f5e0a8 Revert "add guard to switch to SkPathTypes"
This reverts commit e1af44498b.

Reason for revert: breaking google3?

Original change's description:
> add guard to switch to SkPathTypes
> 
> Change-Id: I44d8b5ae8a5172d11a6d4cd9d994373dd3816d6f
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/241278
> Reviewed-by: Kevin Lubick <kjlubick@google.com>
> Reviewed-by: Florin Malita <fmalita@chromium.org>
> Commit-Queue: Mike Reed <reed@google.com>

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

Change-Id: If1fffb6310921ee6f213af000da793afcf62ab0b
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/241560
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2019-09-14 19:13:44 +00:00
Mike Reed
e1af44498b add guard to switch to SkPathTypes
Change-Id: I44d8b5ae8a5172d11a6d4cd9d994373dd3816d6f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/241278
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
2019-09-14 01:26:38 +00:00
Mike Klein
c0bd9f9fe5 rewrite includes to not need so much -Ifoo
Current strategy: everything from the top

Things to look at first are the manual changes:

   - added tools/rewrite_includes.py
   - removed -Idirectives from BUILD.gn
   - various compile.sh simplifications
   - tweak tools/embed_resources.py
   - update gn/find_headers.py to write paths from the top
   - update gn/gn_to_bp.py SkUserConfig.h layout
     so that #include "include/config/SkUserConfig.h" always
     gets the header we want.

No-Presubmit: true
Change-Id: I73a4b181654e0e38d229bc456c0d0854bae3363e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/209706
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Hal Canary <halcanary@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2019-04-24 16:27:11 +00:00
Mike Klein
ba201aea74 make -Werror or /WX optional, off by default
Most external users complain about -Werror,
and I've heard anecdotally that devs find it annoying too.

This turns it off by default, but keeps it on the bots.

Change-Id: I6e87c92215261ebf6e961f816177386d5d58f28e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/209787
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2019-04-23 20:39:34 +00:00
Brian Osman
c3186302bd Add skcms directory to public includes
skcms is part of Skia's public API now. This attempts to recognize that,
and pave the way for moving the header to another location more easily
in a follow up CL, or - at a minimum - for clients that redistribute
Skia as a library + includes to relocate the skcms.h header as part of
that.

Change-Id: I15da63b0d4ab8916a71fb7e6ab3656db87252707
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/209640
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2019-04-22 20:32:23 +00:00
Kevin Lubick
09d022cbb8 [pathkit] build with newer emscripten
Bug: skia:
Change-Id: I5576ec94cae42dd0e03079321e61f71292350808
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/206389
Reviewed-by: Eric Boren <borenet@google.com>
2019-04-08 13:56:18 +00:00
Kevin Lubick
d618027eaf [pathkit/canvaskit] Address race when uploading results
As long as I'm updating the image, update Chrome from 68 to 72

Bug: skia:8844
Change-Id: Ia62ffb062b2c137c89f6e4eb3be30c22ca375bae
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/200508
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Ben Wagner <benjaminwagner@google.com>
2019-03-12 21:45:04 +00:00
Kevin Lubick
d254435603 [pathkit] Clean up perf/test init
This will hopefully help with flakiness.

Bug: skia:8810
Change-Id: Id2fa9abcc0e95f0cf8b08557215766b4f9c57478
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/200047
Reviewed-by: Ben Wagner <benjaminwagner@google.com>
2019-03-12 13:46:41 +00:00
Kevin Lubick
8abc842945 [pathkit] fix perf
Docs-Preview: https://skia.org/?cl=195360
Bug: skia:
Change-Id: I4109810832b69a71960f6e619e32288ae8fa5023
Reviewed-on: https://skia-review.googlesource.com/c/195360
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2019-02-26 13:17:22 +00:00
Kevin Lubick
2722083cbe [pathkit][canvaskit] roll versions
This removes the buggy .then() constructor, primarily.

Docs-Preview: https://skia.org/?cl=195126
Bug: skia:
Change-Id: Ie20512267ce3f822eb0d68e71fc07f3d3245c1e9
Reviewed-on: https://skia-review.googlesource.com/c/195126
Auto-Submit: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
Commit-Queue: Joe Gregorio <jcgregorio@google.com>
2019-02-25 21:53:53 +00:00
Kevin Lubick
2031f34a77 [canvaskit] Upgrade emscripten to .27
This should have some slightly better, more minified JS and other
bugfixes

Bug: skia:
Change-Id: I7c5367b6650267ec8bafcc5de9e351bd8788392b
Reviewed-on: https://skia-review.googlesource.com/c/193582
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
2019-02-21 14:13:00 +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
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
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
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
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
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
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
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
Kevin Lubick
cbcff385c1 Have pathkit use libpathkit.a for faster builds
Of note, it is very important for the -DSK_RELEASE/-DSK_DEBUG
to match between libskia.a and the WASM bindings, otherwise
things like SKDEBUGCODE are sometimes compiled in and sometimes
not, which can cause headaches like sizeof() mismatching between
.cpp files and .h files.

Bug: skia:
Change-Id: Id6ef58c44a7c10014a243b36708e0891514f6008
Reviewed-on: https://skia-review.googlesource.com/158341
Reviewed-by: Mike Klein <mtklein@google.com>
2018-10-02 13:27:29 +00:00
Kevin Lubick
217056c048 [CanvasKit] Implement some basic Canvas/Surface things.
drawText is having issues in a release build.  Skottie sometimes
asserts in debug mode. This possibly has something to do with
memory alignment - like https://skia-review.googlesource.com/c/skia/+/155980
helped fix.

Patchset 9 shows off integrating Skia drawing to
an HTML canvas using Ganesh.

To see it locally, set up https://kripken.github.io/emscripten-site/docs/getting_started/downloads.html
and then set $EMSDK to be that directory.  Then run

   make clean
   make local-example

and navigate to http://localhost:8000/skia-wasm/example.html

Patchset 20 shows off Skottie animating directly to a Canvas.

Docs-Preview: https://skia.org/?cl=153882
Bug: skia:
Change-Id: I2ad2f4ffac00925ee901982ccbaeb7aa63b1ea23
Reviewed-on: https://skia-review.googlesource.com/153882
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
2018-09-21 12:03:55 +00:00
Mike Klein
0191ed8e87 Make listener lists threadsafe with a mutex.
PS1 reverts commit 6c8d242b14.
PS2 uses an SkMutex for thread safety.

Change-Id: I9318f92cc028844b3dc5a99a00282c2762057895
Reviewed-on: https://skia-review.googlesource.com/155060
Reviewed-by: Mike Klein <mtklein@google.com>
2018-09-18 15:46:26 +00:00
Kevin Lubick
774be5aa96 [PathKit] Add cubicYFromX
Docs-Preview: https://skia.org/?cl=152385
Bug: skia:8216
Change-Id: I0020e8d2d4e6e7c7de5c71ddf923a618659cde2c
Reviewed-on: https://skia-review.googlesource.com/152385
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
2018-09-07 18:01:40 +00:00
Kevin Lubick
be5091c1fb [PathKit] Remove experimental- from package names
On the demo page, we use the skia-cdn bucket to hopefully
have better performance than unpkg.

Additionally, on the demo page, we default to using the
WASM version if supported by the browser.

Docs-Preview: https://skia.org/?cl=150904
Bug: skia:8216
Change-Id: I901016e95b8d66803053680691aac4d314821d18
Reviewed-on: https://skia-review.googlesource.com/150904
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
2018-08-31 15:11:04 +00:00
Kevin Lubick
c7d057103e [PathKit] Move from experimental to modules
Add in Code of Conduct and Contributing.md as well.

Docs-Preview: https://skia.org/?cl=150901
Bug: skia:8216
Change-Id: Ia881124f653617ad0b7b91f40ba21de2c13220a6
Reviewed-on: https://skia-review.googlesource.com/150901
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
2018-08-31 14:18:16 +00:00