[canvaskit] POC bindings for testing gms
In this CL, I forked compile.sh and created a new gm_bindings.cpp.
I also moved viewer.html into wasm_tools and created a gmtests.html
for testing out the bindings locally.
Right now there is only one gm file compiled in. I plan in a followup
CL to have some way to generate the list of cpp files that need to
be compiled in from gms.gni. I was unable to get it to work with
simply linking the lib_gm.gni, probably due to the same issue with
Registry that csmartdalton@ ran into when adding viewer.html
and the associated bindings.
Suggested reviewing order:
- gmtests.html to get a sense of how the test flow works.
- gm_bindings.cpp to make sure I setup the contexts/GMs correctly.
- compile_gm.sh to see how the gms are compiled in.
- The remaining files in any order.
When I tested this locally, the bleed_downscale digest was
exactly the same (pixel for pixel, byte for byte) as a known
digest in Gold, so I'm fairly confident in how things work.
Change-Id: I2babef848ca60f7db74e4adf27b8952a66bdeee1
Bug: skia:10812
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/322956
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
diff --git a/BUILD.gn b/BUILD.gn
index 3b99667..2006516 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -1971,6 +1971,17 @@
"modules/skshaper",
]
}
+ test_lib("hash_and_encode") {
+ sources = [
+ "tools/HashAndEncode.cpp",
+ "tools/HashAndEncode.h",
+ ]
+ deps = [
+ ":flags",
+ ":skia",
+ "//third_party/libpng",
+ ]
+ }
if (target_cpu != "wasm") {
test_app("convert-to-nia") {
sources = [ "tools/convert-to-nia.cpp" ]
@@ -1983,17 +1994,6 @@
":skia",
]
}
- test_lib("hash_and_encode") {
- sources = [
- "tools/HashAndEncode.cpp",
- "tools/HashAndEncode.h",
- ]
- deps = [
- ":flags",
- ":skia",
- "//third_party/libpng",
- ]
- }
test_app("fm") {
sources = [
"dm/DMGpuTestProcs.cpp", # blech