GN: Android Vulkan support

Android's the easiest place to start supporting Vulkan, so it's up first.

ndk_api becomes user-specifiable so that the Vulkan bots can kick it up
to 24, the first release supporting Vulkan.  The defaults remain the same:
18 for 32-bit and 21 for 64-bit, the first release supporting 64-bit.

To test this, I set ndk_api=24 and skia_use_vulkan=true in GN, then
   $ ninja -C out dm; and droid out/dm --config vk --src gm

Seems to work!  Bot scripts to follow.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2336343002

Review-Url: https://codereview.chromium.org/2336343002
diff --git a/BUILD.gn b/BUILD.gn
index 258bf2d..8d53e51 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -16,6 +16,7 @@
   skia_use_libpng = true
   skia_use_libwebp = !is_fuchsia
   skia_use_sfntly = !is_fuchsia
+  skia_use_vulkan = false
   skia_use_zlib = true
 }
 
@@ -205,6 +206,7 @@
                              [
                                "public_defines",
                                "deps",
+                               "libs",
                                "sources",
                                "sources_when_disabled",
                              ])
@@ -339,6 +341,13 @@
   ]
 }
 
+optional("vulkan") {
+  enabled = skia_use_vulkan
+  public_defines = [ "SK_VULKAN" ]
+  libs = [ "vulkan" ]
+  sources = skia_vk_sources
+}
+
 optional("webp") {
   enabled = skia_use_libwebp
   public_defines = [ "SK_HAS_WEBP_LIBRARY" ]
@@ -390,6 +399,7 @@
     ":sse42",
     ":ssse3",
     ":typeface_freetype",
+    ":vulkan",
     ":webp",
     ":xml",
   ]
@@ -604,6 +614,10 @@
     } else if (is_mac) {
       sources += [ "tools/gpu/gl/mac/CreatePlatformGLTestContext_mac.cpp" ]
     }
+
+    if (skia_use_vulkan) {
+      sources += [ "tools/gpu/vk/VkTestContext.cpp" ]
+    }
   }
 
   test_lib("flags") {