SkXbyak basics

A little JIT proof of concept for SkRasterPipeline, using xbyak, which is a header-only assembler.  It's x86-only, but supports x86 very thoroughly, and it's very user friendly (at least as far as assembler libraries go...).

CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD

Change-Id: Ie17e562b0f3fff5914041badfb2c1fe4f86efab8
Reviewed-on: https://skia-review.googlesource.com/5730
Reviewed-by: Herb Derby <herb@google.com>
Reviewed-by: Heather Miller <hcm@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
diff --git a/BUILD.gn b/BUILD.gn
index 2c9335c..82751cf 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -23,6 +23,7 @@
   skia_use_lua = false
   skia_use_mesa = false
   skia_use_piex = !is_win
+  skia_use_xbyak = false
   skia_use_zlib = true
 
   skia_android_serial = ""
@@ -506,6 +507,22 @@
   ]
 }
 
+optional("xbyak") {
+  enabled = skia_use_xbyak
+  public_defines = [ "SK_XBYAK" ]
+
+  deps = [
+    "//third_party/xbyak",
+  ]
+
+  # xbyak uses exceptions, but SkXbyak catches them all.
+  configs_to_remove = [ "//gn:no_exceptions" ]
+
+  sources = [
+    "src/opts/SkXbyak.cpp",
+  ]
+}
+
 optional("xml") {
   enabled = skia_use_expat
   public_defines = [ "SK_XML" ]
@@ -546,6 +563,7 @@
     ":ssse3",
     ":typeface_freetype",
     ":webp",
+    ":xbyak",
     ":xml",
   ]