add Fuchsia condition results for G3 build

Change-Id: Ib03b7c1c72e394edf1b84b5c71492ef8c8882ea0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/293580
Auto-Submit: Mike Klein <mtklein@google.com>
Reviewed-by: Guruji Panda <guruji@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
diff --git a/public.bzl b/public.bzl
index f911b8b..b1f8dda 100644
--- a/public.bzl
+++ b/public.bzl
@@ -404,6 +404,44 @@
     ],
 )
 
+GL_SRCS_FUCHSIA = struct(
+    include = [
+        "src/gpu/gl/GrGLMakeNativeInterface_none.cpp",
+    ],
+    exclude = [],
+)
+PORTS_SRCS_FUCHSIA = struct(
+    include = [
+        "src/ports/**/*.cpp",
+        "src/ports/**/*.h",
+    ],
+    exclude = [
+        "src/ports/*FontConfig*",
+        #"src/ports/*FreeType*",
+        "src/ports/*WIC*",
+        "src/ports/*CG*",
+        "src/ports/*android*",
+        "src/ports/*chromium*",
+        "src/ports/*fontconfig*",
+        "src/ports/*mac*",
+        "src/ports/*mozalloc*",
+        "src/ports/*nacl*",
+        "src/ports/*win*",
+        #"src/ports/SkDebug_stdio.cpp",
+        #"src/ports/SkFontMgr_custom.cpp",
+        "src/ports/SkFontMgr_custom_directory.cpp",
+        "src/ports/SkFontMgr_custom_directory_factory.cpp",
+        "src/ports/SkFontMgr_custom_embedded.cpp",
+        "src/ports/SkFontMgr_custom_embedded_factory.cpp",
+        "src/ports/SkFontMgr_custom_empty.cpp",
+        "src/ports/SkFontMgr_custom_empty_factory.cpp",
+        #"src/ports/SkFontMgr_empty_factory.cpp",
+        "src/ports/SkFontMgr_fontconfig_factory.cpp",
+        #"src/ports/SkFontMgr_fuchsia.cpp",
+        "src/ports/SkImageGenerator_none.cpp",
+    ],
+)
+
 def base_srcs():
     return skia_glob(BASE_SRCS_ALL)
 
@@ -415,6 +453,7 @@
             skia_glob(PORTS_SRCS_ANDROID),
             skia_glob(PORTS_SRCS_IOS),
             skia_glob(PORTS_SRCS_WASM),
+            skia_glob(PORTS_SRCS_FUCHSIA),
         ],
     )
 
@@ -426,6 +465,7 @@
             skia_glob(GL_SRCS_ANDROID),
             skia_glob(GL_SRCS_IOS),
             skia_glob(GL_SRCS_WASM),
+            skia_glob(GL_SRCS_FUCHSIA),
         ],
     )
 
@@ -589,8 +629,9 @@
         [
             ["tests/FontMgrFontConfigTest.cpp"],
             ["tests/FontMgrAndroidParserTest.cpp"],
-            [],
-            [],
+            [],  # iOS
+            [],  # WASM
+            [],  # Fuchsia
         ],
     )
 
@@ -612,12 +653,11 @@
 ################################################################################
 
 def base_copts(os_conditions):
-    return skia_select(
+    return ["-Wno-implicit-fallthrough"] + skia_select(
         os_conditions,
         [
             # UNIX
             [
-                "-Wno-implicit-fallthrough",  # Some intentional fallthrough.
                 # Internal use of deprecated methods. :(
                 "-Wno-deprecated-declarations",
                 # TODO(kjlubick)
@@ -625,19 +665,13 @@
             ],
             # ANDROID
             [
-                "-Wno-implicit-fallthrough",  # Some intentional fallthrough.
                 # 'GrResourceCache' declared with greater visibility than the
                 # type of its field 'GrResourceCache::fPurgeableQueue'... bogus.
                 "-Wno-error=attributes",
             ],
-            # IOS
-            [
-                "-Wno-implicit-fallthrough",  # Some intentional fallthrough.
-            ],
-            # WASM
-            [
-                "-Wno-implicit-fallthrough",  # Some intentional fallthrough.
-            ],
+            [],  # iOS
+            [],  # wasm
+            [],  # Fuchsia
         ],
     )
 
@@ -704,6 +738,15 @@
                 "SK_FORCE_8_BYTE_ALIGNMENT",
                 "SKNX_NO_SIMD",
             ],
+            # FUCHSIA
+            [
+                "SK_BUILD_FOR_UNIX",
+                "SK_CODEC_DECODES_PNG",
+                "SK_CODEC_DECODES_WEBP",
+                "SK_ENCODE_PNG",
+                "SK_ENCODE_WEBP",
+                "SK_R32_SHIFT=16",
+            ],
         ],
     )
 
@@ -717,8 +760,7 @@
     ] + skia_select(
         os_conditions,
         [
-            # UNIX
-            [],
+            [],  # Unix
             # ANDROID
             [
                 "-lEGL",
@@ -732,8 +774,8 @@
                 "-framework ImageIO",
                 "-framework MobileCoreServices",
             ],
-            # WASM
-            [],
+            [],  # wasm
+            [],  # Fuchsia
         ],
     )