To get the gold images out of the browser tests, this adds
testReporter.js and pathkit_aggregator.go. testReporter bundles
up the output as a base64 encoded PNG and sends it over the local
network to pathkit_aggregator. pathkit_aggregator will keep
a list of test results reported in this way and write the PNGs
to /OUT of the container (which is the swarming output directory).
Finally, after all the tests are run, the helper script "test_pathkit.sh"
makes a POST request that creates the JSON file that gold expects
(following the schema https://github.com/google/skia-buildbot/blob/master/golden/docs/INGESTION.md)
pathkit_aggregator takes many command line arguments which control
the keys that Gold needs in order to ingest and handle the data.
Of note, this creates a new set (i.e. source_type) of gold images
called "pathkit", which will distinguish it from "gm", "image", etc.
There will be at least 2 sub-sets of "pathkit" images, "canvas" and "svg",
(representing the 2 output types of PathKit). This CL doesn't
quite handle SVG yet, as it needs a way to convert SVG to PNG in the
browser and will be addressed in a follow up CL.
A "standard" gm is sized at 600x600. This was arbitrarily picked.
Note that the functions in testReporter.js return Promises based
on the fetch requests to post the data. This eliminates the race
condition between the /report_gold_data and /dump_json since
running the karma tests won't return until all reports are done.
Other changes of note:
- Adds go to karma-chrome-tests container.
- renames recipe_modules/build/wasm.py -> pathkit.py to be consistent with
the name of test_pathkit.py and make for easier grepping.
- Increases the JS test timeout to 10s (up from 5) to hopefully avoid
the flakes seen in the Debug Test.
Bug: skia:8216
Change-Id: Ic2cad54f3d19cc16601cf2e9a87798db1e6887a2
Reviewed-on: https://skia-review.googlesource.com/147042
Reviewed-by: Stephan Altmueller <stephana@google.com>
Because of https://skia-review.googlesource.com/c/skia/+/146165 and
https://skia-review.googlesource.com/c/skia/+/146100 we have a way
to turn PathOps tests into JSON, which has input paths (as Cmd arrays),
combination verb and expected output.
In this CL, we make tests from the JSON, compare them to the expected
output and, optionally, create SVGs to visualize the difference if any.
API changes (nothing breaking on release builds):
- Exposes SkRect as a JS Object. No need to call delete() on this.
- expose path.getBounds() and path.computeTightBounds()
- Remove SkRegion exposure (debug/test only), which was going to be
used for this purpose, but the approach in this CL works fine.
- Add loadCmdsTypedArray(cmd) helper function to JS [see helper.js].
This was previously known as `floatTypedArrayFrom2D` in the
old shell.html, and is now exposed to avoid clients having to
implement this boilerplate by themselves.
- Add set/getFillType - mostly for testing the difference between
a Winding and an EvenOdd path.
Bug: skia:8216
Change-Id: I2cd25ce2e1e7f285c79c596678678e62135963f0
Reviewed-on: https://skia-review.googlesource.com/146524
Reviewed-by: Cary Clark <caryclark@google.com>
This adds a few JS tests (see *.spec.test) and runs them
using Karma and a Docker image containing Karma, node, and
Chrome (currently at 68).
We only add a Debug Test here because the Release version
has some test helpers (e.g. Region) compiled out. If those
end up not mattering for tests, we can add in a Release version.
Bug: skia:8216
Change-Id: Ica6ab3a4f21688cfa175a90d42c2254d38e8fcf1
Reviewed-on: https://skia-review.googlesource.com/145723
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
Reviewed-by: Eric Boren <borenet@google.com>
Bug: skia:8185
Change-Id: Id40f288515169a378926d6042cc76a976cdf7513
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/145892
Commit-Queue: Eric Boren <borenet@google.com>
Auto-Submit: Ben Wagner <benjaminwagner@google.com>
Reviewed-by: Eric Boren <borenet@google.com>
Bug: skia:8081
Change-Id: Ibcb82389668bd9ea7395e498696417d5701761c0
Reviewed-on: https://skia-review.googlesource.com/140782
Commit-Queue: Ben Wagner <benjaminwagner@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
They crash, presumably because they use multiple large images.
Change-Id: I277958cd6661820085b4e1a04e0668e3a3e9fddc
Reviewed-on: https://skia-review.googlesource.com/145880
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
This doesn't really add any CQ load. We're already running
Test-iOS-Clang-iPhone7-GPU-GT7600-arm64-Debug-All which depends on this.
It'll just help make iOS Build failures stand out from Test failures.
Change-Id: I8614dd32d0ff3797357bfa41ea46d2571ec7976d
Reviewed-on: https://skia-review.googlesource.com/145725
Commit-Queue: Mike Klein <mtklein@google.com>
Commit-Queue: Ravi Mistry <rmistry@google.com>
Auto-Submit: Mike Klein <mtklein@google.com>
Reviewed-by: Ravi Mistry <rmistry@google.com>
Adds arc, arcTo, rect and Path2D names for quadTo, cubicTo, close.
Adds conic verb support (approximated with 2 quads).
Breaking changes:
Some functions have been moved to be member functions:
PathKit.Simplify(path) -> path.simplify()
PathKit.ToCanvas(path, ctx) -> path.toCanvas(ctx)
PathKit.ToSVGString(path) -> path.toSVGString()
PathKit.ToPath2D(path) -> path.toPath2D()
PathKit.ToCmds(path) -> path.toCmds()
PathKit.ResolveBuilder(builder) -> builder.resolve()
PathKit.GetBoundaryPathFromRegion(region) -> region.getBoundaryPath()
Pathkit.ApplyPathOp(pathOne, pathTwo, op) still exists, but there's
now also pathOne.op(pathTwo, op) for cases when that's easier.
As per custom with version 0.x.y projects, I'm bumping the
minor version (in npm) for these breaking changes instead of the
major version (which will happen when we are version >= 1.0.0).
This also has some small improvements to the output code size.
The biggest jump was from enabling the closure compiler on the
helper JS, which trimmed it down by about 40%. Using the closure
compiler requires the JRE on the bots, which prompted the emsdk-base
image change.
Bug: skia:8216
Change-Id: I40902d23380093c34d1679df0255bcb0eaa77b01
Reviewed-on: https://skia-review.googlesource.com/145420
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Bug: skia:
Change-Id: I3437830069de5ff8ace21115024396120d21b2a0
Reviewed-on: https://skia-review.googlesource.com/145482
Reviewed-by: Ravi Mistry <rmistry@google.com>
Commit-Queue: Eric Boren <borenet@google.com>
I'm keeping the Release jobs for a few commits for blame.
There are a few reasons for this change:
- This will free up more Mac VMs for Build jobs.
- The CPU jobs currently run on VMs, which don't provide reliable perf
numbers.
- The two bare-metal MacMini7.1 bots (currently running the GPU TSAN
jobs) are over-capacity.
- Lets us test AVX2 rather than AVX.
I used the MacBookPro11.5 for all of these, but we could spread them
out to other Mac bots if it's too much load for these bots.
No-Try: true
Change-Id: I8c97e194c4f3e0018e7e646b93c3d96db8d0ca82
Reviewed-on: https://skia-review.googlesource.com/145431
Auto-Submit: Ben Wagner <benjaminwagner@google.com>
Reviewed-by: Eric Boren <borenet@google.com>
Commit-Queue: Eric Boren <borenet@google.com>
iOS builds still causing an error on installation:
ERROR: Install failed. Got error "APIInternalError".
stephana will help with debugging this when he's back in the office.
Bug: chromium:862292
Change-Id: I8fdff24938f000da550e1c5420c7ac312f09dce7
Reviewed-on: https://skia-review.googlesource.com/144440
Auto-Submit: Ben Wagner <benjaminwagner@google.com>
Commit-Queue: Eric Boren <borenet@google.com>
Reviewed-by: Eric Boren <borenet@google.com>
This contains the Go code dependencies of our infra repo and will be
used to insulate us from upstream changes which break us due to API
changes, etc.
Bug: skia:
Change-Id: I6ce36a4e41b6d7686fe2598ba980640854cd4f11
Reviewed-on: https://skia-review.googlesource.com/145158
Commit-Queue: Eric Boren <borenet@google.com>
Reviewed-by: Ravi Mistry <rmistry@google.com>
Change-Id: I88ee8200b82d12ba8cee637e01b360ce2d2bb2b3
Reviewed-on: https://skia-review.googlesource.com/145360
Auto-Submit: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Change-Id: I0eb3dcc4d38eb2aeab22d1df1515e499cf21dc62
Reviewed-on: https://skia-review.googlesource.com/144608
Commit-Queue: Eric Boren <borenet@google.com>
Auto-Submit: Ben Wagner <benjaminwagner@google.com>
Reviewed-by: Eric Boren <borenet@google.com>
This adds a job to build it and adds it to the npm
under /bin/debug.
The debug build is useful for clients because it
has all the debug symbols, which makes it possible to
see which WASM calls are taking the longest when using
DevTools' Performance testing.
Bug: skia:8216
Change-Id: I3068cb395f29c1de927508cf15c419f5af284eb7
Reviewed-on: https://skia-review.googlesource.com/145337
Reviewed-by: Eric Boren <borenet@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Bug: skia:
Change-Id: Ibdfa20023019dc6372293600b0b1b4607916694f
Reviewed-on: https://skia-review.googlesource.com/145330
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Eric Boren <borenet@google.com>