Commit Graph

17 Commits

Author SHA1 Message Date
Brian Salomon
76d13bbdf8 Remove texture idle proc mechanism
Bug: skia:11369
Change-Id: I0d1a74cc64dd74486acbb69df529ccc0f8b63ef3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/375202
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2021-02-25 22:23:20 +00:00
Nathaniel Nifong
110367dcfc Fix most remaining wasm gm unit tests by correctly providing gl context
The basic problem was that WasmContextInfo shadowed non-virtual members
of ContextInfo. the tests, which work with that type, end up calling the
super class's methods which return null for directContext()

The context created and stored in WasmContextInfo would have worked if it
could be returned, but I've opted to go with what looks like a more
canonical way to test a new backend, that is to create a platform-
specific subclass of GLTestContext, and let GrContextFactory create the
GL context.

Bug:skia:10869

Change-Id: Ie9e1142cf2e7268242ff9aab70f76151714850a3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/355116
Commit-Queue: Nathaniel Nifong <nifong@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2021-01-21 20:46:19 +00:00
Ethan Nicholas
92969f2656 SkSL DSL operator overloading
This adds basic operator overloading (everything but array indexing) and
related tests to the SkSL DSL.

Change-Id: Ic9fdc9a02a5496e2706d18fb435d838b4ee53ad7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/353103
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
2021-01-13 16:18:14 +00:00
Nathaniel Nifong
50940aba5d fix a few failing gm tests in wasm
The skia gn/ninja build step and the emscripten build step were using
a different set of defines. this violated assumptions of a couple of
tests

Change-Id: Id5364c0e1281b2e4024685fe8f106ee55c4961cb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/338343
Commit-Queue: Nathaniel Nifong <nifong@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2021-01-09 02:48:38 +00:00
Ethan Nicholas
b3d4e74d34 Add SkSL DSLType
Change-Id: I0bbda6a41391fc2a11dc812be5e9c0c0d14c4d75
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/351921
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2021-01-08 17:25:54 +00:00
Nathaniel Nifong
0355118f22 debug build for wasm gm tests
Change-Id: I802160c5734648a57b5ffe19f0df990c526e2c2a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/350896
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Nathaniel Nifong <nifong@google.com>
2021-01-08 16:46:49 +00:00
Ethan Nicholas
950461497d Beginnings of the SkSL DSL framework
The code at this point doesn't do anything useful, but establishes some
of the basic types and patterns.

Change-Id: I580a9e75ffa3162879893450fb7d1f0905a10687
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/350697
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
Auto-Submit: Ethan Nicholas <ethannicholas@google.com>
2021-01-07 21:53:01 +00:00
Brian Salomon
6cab033499 exclude surfacecontextwritepixels from CK
new unit tests is crashing like many others.

Bug: skia:10869
Change-Id: Ic9418468cb4720a52aebf2486cc359dc456c9983
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/350558
Commit-Queue: Brian Salomon <bsalomon@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Auto-Submit: Brian Salomon <bsalomon@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2021-01-06 14:42:19 +00:00
Brian Salomon
6bba3d8a5a Remove pixel write/read tests.
I found myself updating these for another change and realized they
are very limited tests that are redundant with more thorough tests.

Change-Id: I935da4d1da7ff3825a4042556845a8eb659b6ba8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/346856
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Auto-Submit: Brian Salomon <bsalomon@google.com>
2020-12-23 13:56:17 +00:00
Brian Salomon
fb018a8d80 Add SurfaceContextReadPixels to excluded wasm tests
Cq-Include-Trybots: luci.skia.skia.primary:Test-Ubuntu18-EMCC-Golo-GPU-QuadroP400-wasm-Release-All-WasmGMTests_WebGL2

Bug: skia:10869
Change-Id: Ib924218aeb4d6dc2e383b86135123efe6eb5639a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/343096
Commit-Queue: Brian Salomon <bsalomon@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Auto-Submit: Brian Salomon <bsalomon@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2020-12-10 20:20:09 +00:00
Kevin Lubick
823b1537f7 [canvaskit] Add config key and manual mode to unit test harness.
Change-Id: Ic72f31ba7833c23f7baf4872d05671a7c3808e34
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/333216
Reviewed-by: Chris Dalton <csmartdalton@google.com>
2020-11-09 21:12:39 +00:00
Kevin Lubick
2f30936d46 [canvaskit] Disable GrTextBlobMoveAround
Failing with RuntimeError: function signature mismatch

Bug: skia:10869
Change-Id: Ifd2f78362e2fd30b1c53be56a811551974e3cac3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/333119
Reviewed-by: Herb Derby <herb@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2020-11-09 15:05:52 +00:00
Kevin Lubick
dffd20efe9 [canvaskit] Add unit tests to wasm_gm_tests
There are currently many tests skipped, but many more pass.
This changes the built binary to have a lot of debugging logic
in it so we should be able to get backtraces on those crashes
more easily when debugging.

gmtests.html was removed as it was superceded by run-wasm-gm-tests
and make run_local.

Bug: skia:10812, skia:10869
Change-Id: I72ab34d3db83a654dc8829831b3ecb795fe23d43
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/329170
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Nathaniel Nifong <nifong@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
2020-11-02 16:51:23 +00:00
Kevin Lubick
acdc283404 [canvaskit] Use portable fonts for GMs
This adds an Init() which should be called before any resources
are loaded or GMs/Tests are called.

This also adds a little helper in compile.sh for building only
a single GM, which can make local development faster given the
fact that emsdk doesn't do its final compilation/linking in
parallel.

Bug: skia:10812
Change-Id: I1a8932549b9ae951c153c0d49927bdc933c29657
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/329358
Reviewed-by: Ben Wagner <bungeman@google.com>
2020-10-23 17:04:48 +00:00
Kevin Lubick
65674e4c2e [canvaskit] Compile in most gms for testing
The few we omit fail to compile or link.

Bug: skia:10812
Change-Id: I660d64b6f9bfe63949a12506d29e9a8d73898e6b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/328377
Reviewed-by: Chris Dalton <csmartdalton@google.com>
2020-10-22 16:44:07 +00:00
Kevin Lubick
bffc116a4a [canvaskit] Load resources into wasm gms/unit tests.
To load in the resources, we have the Node JS script
find all files in the provided resources directory and serve
that as a JSON file (the HTML JS can't list files easily).
The HTML JS reads that file, then loads all those files as
ArrayBuffers.

After the testing WASM and the resources all load, we pre-load
them into the WASM memory, assigned with their name. This is
just a map of name -> SkData. The WASM code can't (easily)
make fetch calls, so rather than load these resources on demand
like we would in a real file system, we pre-load them all
and serve them from RAM. For simplicity (and consistency with
the known_hashes), this map is a global.

Finally, to connect the resources to the GMs, we overwrite the
gResourceFactory (defined in ResourceFactory.h) which is used
by tools/Resources.cpp to load any resource file (in theory).

One more change is to write some progress steps to window._log
so it can be read by puppeteer and dumped to disk to aid in
debugging.

Bug: skia:10812
Change-Id: Ie22c7f4b8d7cbbd18173b4e2ed755105c1b45249
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/328901
Reviewed-by: Leandro Lovisolo <lovisolo@google.com>
2020-10-21 20:40:29 +00:00
Kevin Lubick
cd74dfa477 [canvaskit] Add test harness for running all gms and getting output
The JS starts a web server and then uses puppeteer to load the html
page. The page will load the compiled JS+WASM to run the GMs,
calculate the md5 hash of the pixels using the exact same algorithm
as DM and then get those encoded as a PNG. The HTML then makes
a post request with that image data (assuming it's not an image we
have seen before) and keeps all the test results in a simple
JSON array.

The JSON array will be read in by a task driver in a followup CL.

Bug: skia:10812
Change-Id: I90e8ed42bd96ae11fa75ce84ef2ee1a97ab93d5f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/328378
Reviewed-by: Leandro Lovisolo <lovisolo@google.com>
2020-10-20 11:54:23 +00:00