GN: add a flag to implement Android_FrameworkDefs bot.

This bot builds Skia with a bunch of defines to mimic the Android roll.
Apparently it was supposed to be on the CQ... I'll add the GN version
to it when it exists.

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

Review-Url: https://codereview.chromium.org/2343103002
diff --git a/BUILD.gn b/BUILD.gn
index d67c8cd..0bd2636 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -18,6 +18,8 @@
   skia_use_sfntly = !is_fuchsia
   skia_use_vulkan = is_android && defined(ndk_api) && ndk_api >= 24
   skia_use_zlib = true
+
+  skia_enable_android_framework_defines = false
 }
 
 fontmgr_android_enabled = skia_use_expat && skia_use_freetype
@@ -222,6 +224,11 @@
   }
 }
 
+optional("android_framework_defines") {
+  enabled = skia_enable_android_framework_defines
+  public_defines = skia_android_framework_defines
+}
+
 optional("fontmgr_android") {
   enabled = fontmgr_android_enabled
 
@@ -384,6 +391,7 @@
   configs += skia_library_configs
 
   deps = [
+    ":android_framework_defines",
     ":arm64",
     ":armv7",
     ":avx",
diff --git a/gn/shared_sources.gni b/gn/shared_sources.gni
index 71c3b54..2da3d2c 100644
--- a/gn/shared_sources.gni
+++ b/gn/shared_sources.gni
@@ -71,14 +71,21 @@
 skia_pdf_sources = _pdf_gypi.sources
 
 _sources_gypi = exec_script("gypi_to_gn.py",
-                         [
-                           rebase_path("../gyp/skia_sources.gypi"),
-                         ],
-                         "scope",
-                         [ "../gyp/skia_sources.gypi" ])
+                            [ rebase_path("../gyp/skia_sources.gypi") ],
+                            "scope",
+                            [ "../gyp/skia_sources.gypi" ])
 skia_sksl_sources = get_path_info(_sources_gypi.sksl_sources, "abspath")
 skia_utils_sources = get_path_info(_sources_gypi.utils_sources, "abspath")
 
 # Skia Chromium defines. These flags will be defined in chromium If these
 # become 'permanent', they should be moved into Chrome's skia build file.
 skia_for_chromium_defines = [ "SK_IGNORE_LINEONLY_AA_CONVEX_PATH_OPTS" ]
+
+_android_framework_defines =
+    exec_script(
+        "gypi_to_gn.py",
+        [ rebase_path("../gyp/skia_for_android_framework_defines.gypi") ],
+        "scope",
+        [ "../gyp/core.gypi" ])
+skia_android_framework_defines =
+    _android_framework_defines.skia_for_android_framework_defines