# Copyright 2016 Google Inc.
#
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

import("gn/flutter_defines.gni")
import("gn/fuchsia_defines.gni")
import("gn/shared_sources.gni")
import("gn/skia.gni")

if (is_fuchsia) {
  import("//build/fuchsia/sdk.gni")
  import("build/fuchsia/fuchsia_download_sdk.gni")
}

if (skia_use_dawn) {
  import("third_party/externals/dawn/scripts/dawn_features.gni")
}

if (defined(skia_settings)) {
  import(skia_settings)
}

import("gn/ios.gni")

# Skia public API, generally provided by :skia.
config("skia_public") {
  include_dirs = [ "." ]

  defines = []
  cflags_objcc = []
  if (is_component_build) {
    defines += [ "SKIA_DLL" ]
  }
  if (is_fuchsia || is_linux) {
    defines += [ "SK_R32_SHIFT=16" ]
  }
  if (skia_enable_flutter_defines) {
    defines += flutter_defines
  }
  if (!skia_enable_gpu) {
    defines += [ "SK_SUPPORT_GPU=0" ]
  }
  if (is_fuchsia) {
    defines += fuchsia_defines
  }
  if (skia_gl_standard == "gles") {
    defines += [ "SK_ASSUME_GL_ES=1" ]
  } else if (skia_gl_standard == "gl") {
    defines += [ "SK_ASSUME_GL=1" ]
  } else if (skia_gl_standard == "webgl") {
    defines += [
      "SK_ASSUME_WEBGL=1",
      "SK_USE_WEBGL",
    ]
  }

  # Some older versions of the Clang toolchain change the visibility of
  # symbols decorated with API_AVAILABLE macro to be visible. Users of such
  # toolchains suppress the use of this macro till toolchain updates are made.
  if (is_mac || is_ios) {
    if (skia_enable_api_available_macro) {
      defines += [ "SK_ENABLE_API_AVAILABLE" ]
    } else {
      cflags_objcc += [ "-Wno-unguarded-availability" ]
    }
  }
}

# Skia internal APIs, used by Skia itself and a few test tools.
config("skia_private") {
  visibility = [ ":*" ]

  defines = [ "SK_GAMMA_APPLY_TO_A8" ]
  if (skia_use_fixed_gamma_text) {
    defines += [
      "SK_GAMMA_EXPONENT=1.4",
      "SK_GAMMA_CONTRAST=0.0",
    ]
  }
  if (is_skia_dev_build) {
    defines += [
      "SK_ALLOW_STATIC_GLOBAL_INITIALIZERS=1",
      "GR_TEST_UTILS=1",
    ]
  }
  libs = []
  lib_dirs = []
  if (skia_use_gl && skia_use_angle) {
    defines += [ "SK_ANGLE" ]
  }
  if (skia_use_vma) {
    defines += [ "SK_USE_VMA" ]
  }
}

# Any code that's linked into Skia-the-library should use this config via += skia_library_configs.
config("skia_library") {
  visibility = [ ":*" ]
  defines = [ "SKIA_IMPLEMENTATION=1" ]
}

skia_library_configs = [
  ":skia_public",
  ":skia_private",
  ":skia_library",
]

# Use for CPU-specific Skia code that needs particular compiler flags.
template("opts") {
  visibility = [ ":*" ]
  if (invoker.enabled) {
    source_set(target_name) {
      check_includes = false
      forward_variables_from(invoker, "*")
      configs += skia_library_configs
    }
  } else {
    # If not enabled, a phony empty target that swallows all otherwise unused variables.
    source_set(target_name) {
      check_includes = false
      forward_variables_from(invoker,
                             "*",
                             [
                               "sources",
                               "cflags",
                             ])
    }
  }
}

is_x86 = current_cpu == "x64" || current_cpu == "x86"

opts("none") {
  enabled = !is_x86 && current_cpu != "arm" && current_cpu != "arm64"
  sources = skia_opts.none_sources
  cflags = []
}

opts("armv7") {
  enabled = current_cpu == "arm"
  sources = skia_opts.armv7_sources + skia_opts.neon_sources
  cflags = []
}

opts("arm64") {
  enabled = current_cpu == "arm64"
  sources = skia_opts.arm64_sources
  cflags = []
}

opts("crc32") {
  enabled = current_cpu == "arm64"
  sources = skia_opts.crc32_sources
  cflags = [ "-march=armv8-a+crc" ]
}

opts("sse2") {
  enabled = is_x86
  sources = skia_opts.sse2_sources
  if (!is_clang && is_win) {
    defines = [ "SK_CPU_SSE_LEVEL=SK_CPU_SSE_LEVEL_SSE2" ]
  } else {
    cflags = [ "-msse2" ]
  }
}

opts("ssse3") {
  enabled = is_x86
  sources = skia_opts.ssse3_sources
  if (!is_clang && is_win) {
    defines = [ "SK_CPU_SSE_LEVEL=SK_CPU_SSE_LEVEL_SSSE3" ]
  } else {
    cflags = [ "-mssse3" ]
  }
}

opts("sse41") {
  enabled = is_x86
  sources = skia_opts.sse41_sources
  if (!is_clang && is_win) {
    defines = [ "SK_CPU_SSE_LEVEL=SK_CPU_SSE_LEVEL_SSE41" ]
  } else {
    cflags = [ "-msse4.1" ]
  }
}

opts("sse42") {
  enabled = is_x86
  sources = skia_opts.sse42_sources
  if (!is_clang && is_win) {
    defines = [ "SK_CPU_SSE_LEVEL=SK_CPU_SSE_LEVEL_SSE42" ]
  } else {
    cflags = [ "-msse4.2" ]
  }
}

opts("avx") {
  enabled = is_x86
  sources = skia_opts.avx_sources
  if (is_win) {
    cflags = [ "/arch:AVX" ]
  } else {
    cflags = [ "-mavx" ]
    if (is_mac && is_debug) {
      cflags += [ "-fno-stack-check" ]  # Work around skia:9709
    }
  }
}

opts("hsw") {
  enabled = is_x86
  sources = skia_opts.hsw_sources
  if (is_win) {
    cflags = [ "/arch:AVX2" ]
  } else {
    cflags = [ "-march=haswell" ]
    if (is_mac && is_debug) {
      cflags += [ "-fno-stack-check" ]  # Work around skia:9709
    }
  }
}

opts("skx") {
  enabled = is_x86
  sources = skia_opts.skx_sources
  if (is_win) {
    cflags = [ "/arch:AVX512" ]
  } else {
    cflags = [ "-march=skylake-avx512" ]
    if (is_mac && is_debug) {
      cflags += [ "-fno-stack-check" ]  # Work around skia:9709
    }
  }
}

# Any feature of Skia that requires third-party code should be optional and use this template.
template("optional") {
  visibility = [ ":*" ]
  if (invoker.enabled) {
    config(target_name + "_public") {
      if (defined(invoker.public_defines)) {
        defines = invoker.public_defines
      }
      if (defined(invoker.public_configs)) {
        configs = invoker.public_configs
      }
      if (defined(invoker.public_include_dirs)) {
        include_dirs = invoker.public_include_dirs
      }
    }
    source_set(target_name) {
      check_includes = false
      forward_variables_from(invoker,
                             "*",
                             [
                               "public_defines",
                               "sources_when_disabled",
                               "configs_to_remove",
                             ])
      all_dependent_configs = [ ":" + target_name + "_public" ]
      configs += skia_library_configs
      if (defined(invoker.configs_to_remove)) {
        configs -= invoker.configs_to_remove
      }
    }
  } else {
    source_set(target_name) {
      forward_variables_from(invoker,
                             "*",
                             [
                               "public",
                               "public_defines",
                               "public_deps",
                               "deps",
                               "libs",
                               "frameworks",
                               "sources",
                               "sources_when_disabled",
                               "configs_to_remove",
                             ])
      if (defined(invoker.sources_when_disabled)) {
        sources = invoker.sources_when_disabled
      }
      configs += skia_library_configs
    }
  }
}

optional("android_utils") {
  enabled = skia_enable_android_utils

  public = [
    "client_utils/android/BRDAllocator.h",
    "client_utils/android/BitmapRegionDecoder.h",
    "client_utils/android/FrontBufferedStream.h",
  ]
  public_defines = [ "SK_ENABLE_ANDROID_UTILS" ]
  sources = [
    "client_utils/android/BitmapRegionDecoder.cpp",
    "client_utils/android/FrontBufferedStream.cpp",
  ]
}

group("fontmgr_factory") {
  public_deps = [ skia_fontmgr_factory ]
}

optional("fontmgr_empty_factory") {
  enabled = true
  sources = [ "src/ports/SkFontMgr_empty_factory.cpp" ]
}

optional("fontmgr_android") {
  enabled = skia_enable_fontmgr_android

  deps = [
    ":typeface_freetype",
    "//third_party/expat",
  ]
  public = [ "include/ports/SkFontMgr_android.h" ]
  sources = [
    "src/ports/SkFontMgr_android.cpp",
    "src/ports/SkFontMgr_android_parser.cpp",
    "src/ports/SkFontMgr_android_parser.h",
  ]
}
optional("fontmgr_android_factory") {
  enabled = skia_enable_fontmgr_android
  deps = [ ":fontmgr_android" ]
  sources = [ "src/ports/SkFontMgr_android_factory.cpp" ]
}

optional("fontmgr_custom") {
  enabled =
      skia_enable_fontmgr_custom_directory ||
      skia_enable_fontmgr_custom_embedded || skia_enable_fontmgr_custom_empty

  deps = [ ":typeface_freetype" ]
  public = [ "src/ports/SkFontMgr_custom.h" ]
  sources = [ "src/ports/SkFontMgr_custom.cpp" ]
}

optional("fontmgr_custom_directory") {
  enabled = skia_enable_fontmgr_custom_directory

  deps = [
    ":fontmgr_custom",
    ":typeface_freetype",
  ]
  public = [ "include/ports/SkFontMgr_directory.h" ]
  sources = [ "src/ports/SkFontMgr_custom_directory.cpp" ]
}
optional("fontmgr_custom_directory_factory") {
  enabled = skia_enable_fontmgr_custom_directory
  deps = [ ":fontmgr_custom_directory" ]
  sources = [ "src/ports/SkFontMgr_custom_directory_factory.cpp" ]
}

optional("fontmgr_custom_embedded") {
  enabled = skia_enable_fontmgr_custom_embedded

  deps = [
    ":fontmgr_custom",
    ":typeface_freetype",
  ]
  sources = [ "src/ports/SkFontMgr_custom_embedded.cpp" ]
}
optional("fontmgr_custom_embedded_factory") {
  enabled = skia_enable_fontmgr_custom_embedded
  deps = [ ":fontmgr_custom_embedded" ]
  sources = [ "src/ports/SkFontMgr_custom_embedded_factory.cpp" ]
}

optional("fontmgr_custom_empty") {
  enabled = skia_enable_fontmgr_custom_empty

  deps = [
    ":fontmgr_custom",
    ":typeface_freetype",
  ]
  public = [ "include/ports/SkFontMgr_empty.h" ]
  sources = [ "src/ports/SkFontMgr_custom_empty.cpp" ]
}
optional("fontmgr_custom_empty_factory") {
  enabled = skia_enable_fontmgr_custom_empty
  deps = [ ":fontmgr_custom_empty" ]
  sources = [ "src/ports/SkFontMgr_custom_empty_factory.cpp" ]
}

optional("fontmgr_fontconfig") {
  enabled = skia_enable_fontmgr_fontconfig

  # The public header includes fontconfig.h and uses FcConfig*
  public_deps = [ "//third_party:fontconfig" ]
  public = [ "include/ports/SkFontMgr_fontconfig.h" ]
  deps = [ ":typeface_freetype" ]
  sources = [ "src/ports/SkFontMgr_fontconfig.cpp" ]
}
optional("fontmgr_fontconfig_factory") {
  enabled = skia_enable_fontmgr_fontconfig
  deps = [ ":fontmgr_fontconfig" ]
  sources = [ "src/ports/SkFontMgr_fontconfig_factory.cpp" ]
}

optional("fontmgr_FontConfigInterface") {
  enabled = skia_enable_fontmgr_FontConfigInterface

  deps = [
    ":typeface_freetype",
    "//third_party:fontconfig",
  ]
  public = [
    "include/ports/SkFontConfigInterface.h",
    "include/ports/SkFontMgr_FontConfigInterface.h",
  ]
  sources = [
    "src/ports/SkFontConfigInterface.cpp",
    "src/ports/SkFontConfigInterface_direct.cpp",
    "src/ports/SkFontConfigInterface_direct_factory.cpp",
    "src/ports/SkFontConfigTypeface.h",
    "src/ports/SkFontMgr_FontConfigInterface.cpp",
  ]
}
optional("fontmgr_FontConfigInterface_factory") {
  enabled = skia_enable_fontmgr_FontConfigInterface
  deps = [ ":fontmgr_FontConfigInterface" ]
  sources = [ "src/ports/SkFontMgr_FontConfigInterface_factory.cpp" ]
}

optional("fontmgr_fuchsia") {
  enabled = skia_enable_fontmgr_fuchsia

  deps = []

  if (is_fuchsia && using_fuchsia_sdk) {
    deps += [ "//build/fuchsia/fidl:fuchsia.fonts" ]
  } else {
    deps = [ "//sdk/fidl/fuchsia.fonts" ]
  }
  public = [ "src/ports/SkFontMgr_fuchsia.h" ]
  sources = [ "src/ports/SkFontMgr_fuchsia.cpp" ]
}

optional("fontmgr_mac_ct") {
  enabled = skia_use_fonthost_mac

  public = [
    "include/ports/SkFontMgr_mac_ct.h",
    "include/ports/SkTypeface_mac.h",
  ]
  sources = [
    "src/ports/SkFontMgr_mac_ct.cpp",
    "src/ports/SkScalerContext_mac_ct.cpp",
    "src/ports/SkScalerContext_mac_ct.h",
    "src/ports/SkTypeface_mac_ct.cpp",
    "src/ports/SkTypeface_mac_ct.h",
  ]

  if (is_mac) {
    frameworks = [
      # AppKit symbols NSFontWeightXXX may be dlsym'ed.
      "AppKit.framework",
      "ApplicationServices.framework",
    ]
  }

  if (is_ios) {
    frameworks = [
      "CoreFoundation.framework",
      "CoreGraphics.framework",
      "CoreText.framework",

      # UIKit symbols UIFontWeightXXX may be dlsym'ed.
      "UIKit.framework",
    ]
  }
}
optional("fontmgr_mac_ct_factory") {
  enabled = skia_use_fonthost_mac
  deps = [ ":fontmgr_mac_ct" ]
  sources = [ "src/ports/SkFontMgr_mac_ct_factory.cpp" ]
}

optional("fontmgr_win") {
  enabled = skia_enable_fontmgr_win

  public = [ "include/ports/SkTypeface_win.h" ]
  sources = [
    "src/fonts/SkFontMgr_indirect.cpp",
    "src/ports/SkFontMgr_win_dw.cpp",
    "src/ports/SkScalerContext_win_dw.cpp",
    "src/ports/SkTypeface_win_dw.cpp",
  ]
}
optional("fontmgr_win_factory") {
  enabled = skia_enable_fontmgr_win
  deps = [ ":fontmgr_win" ]
  sources = [ "src/ports/SkFontMgr_win_dw_factory.cpp" ]
}

optional("fontmgr_win_gdi") {
  enabled = skia_enable_fontmgr_win_gdi

  public = [ "include/ports/SkTypeface_win.h" ]
  sources = [ "src/ports/SkFontHost_win.cpp" ]
  libs = [ "Gdi32.lib" ]
}

if (skia_lex) {
  executable("sksllex") {
    sources = [
      "src/sksl/lex/Main.cpp",
      "src/sksl/lex/NFA.cpp",
      "src/sksl/lex/RegexNode.cpp",
      "src/sksl/lex/RegexParser.cpp",
    ]
    include_dirs = [ "." ]
  }

  action("run_sksllex") {
    script = "gn/run_sksllex.py"
    deps = [ ":sksllex(//gn/toolchain:$host_toolchain)" ]
    sources = [ "src/sksl/lex/sksl.lex" ]

    # GN insists its outputs should go somewhere underneath target_out_dir, so we trick it with a
    # path that starts with target_out_dir and then uses ".." to back up into the src dir.
    outputs = [
      "$target_out_dir/" +
          rebase_path("src/sksl/lex/SkSLLexer.h", target_out_dir),
      # the script also modifies the corresponding .cpp file, but if we tell GN that it gets
      # confused due to the same file being named by two different paths
    ]
    sksllex_path = "$root_out_dir/"
    sksllex_path += "sksllex"
    if (host_os == "win") {
      sksllex_path += ".exe"
    }
    args = [
      rebase_path(sksllex_path),
      rebase_path("bin/clang-format"),
      rebase_path("bin/fetch-clang-format"),
      rebase_path("src"),
    ]
  }
} else {
  group("run_sksllex") {
  }
}

# `Compile Processors` and `Compile SkSL Tests` both rely on skslc.
if (skia_compile_processors || skia_compile_sksl_tests) {
  executable("skslc") {
    defines = [ "SKSL_STANDALONE" ]
    sources = [ "src/sksl/SkSLMain.cpp" ]
    sources += skia_sksl_sources
    sources += skia_sksl_gpu_sources
    include_dirs = [ "." ]
    deps = [
      ":run_sksllex",
      "//third_party/spirv-tools:spvtools",
    ]
  }

  skslc_path = "$root_out_dir/"
  if (host_toolchain != default_toolchain_name) {
    skslc_path += "$host_toolchain/"
  }
  skslc_path += "skslc"
  if (host_os == "win") {
    skslc_path += ".exe"
  }

  action("create_sksl_fp") {
    script = "gn/create_sksl_fp.py"
    sources = [
      "include/private/GrSharedEnums.h",
      "src/sksl/sksl_fp_raw.sksl",
    ]
    outputs = [ "$root_out_dir/sksl_fp.sksl" ]
    args = [
      rebase_path(sources[0]),
      rebase_path(sources[1]),
      rebase_path(outputs[0]),
    ]
  }

  copy("sksl_pre_includes") {
    sources = [
      "src/sksl/sksl_frag.sksl",
      "src/sksl/sksl_geom.sksl",
      "src/sksl/sksl_gpu.sksl",
      "src/sksl/sksl_interp.sksl",
      "src/sksl/sksl_pipeline.sksl",
      "src/sksl/sksl_vert.sksl",
    ]
    outputs = [ "$root_out_dir/{{source_file_part}}" ]
  }

  dehydrate_sksl_sources = get_target_outputs(":sksl_pre_includes")
  dehydrate_sksl_sources += get_target_outputs(":create_sksl_fp")

  dehydrate_sksl_outputs = []
  foreach(src, dehydrate_sksl_sources) {
    name = get_path_info(src, "name")

    # GN insists its outputs should go somewhere underneath target_out_dir, so we trick it with a
    # path that starts with target_out_dir and then uses ".." to back up into the src dir.
    dehydrate_sksl_outputs += [ "$target_out_dir/" + rebase_path(
                                    "src/sksl/generated/$name.dehydrated.sksl",
                                    target_out_dir) ]
  }

  action("dehydrate_sksl") {
    script = "gn/dehydrate_sksl.py"
    deps = [
      ":create_sksl_fp",
      ":sksl_pre_includes",
      ":skslc(//gn/toolchain:$host_toolchain)",
    ]
    sources = dehydrate_sksl_sources
    outputs = dehydrate_sksl_outputs
    args = [
      rebase_path(skslc_path),
      rebase_path("src/sksl/generated"),
    ]
    args += rebase_path(dehydrate_sksl_sources)
  }
} else {
  group("dehydrate_sksl") {
  }
}

skia_gpu_processor_outputs = []
if (skia_compile_processors) {
  foreach(src, skia_gpu_processor_sources) {
    dir = get_path_info(src, "dir")
    name = get_path_info(src, "name")

    # GN insists its outputs should go somewhere underneath target_out_dir, so we trick it with a
    # path that starts with target_out_dir and then uses ".." to back up into the src dir.
    skia_gpu_processor_outputs += [
      "$target_out_dir/" +
          rebase_path("$dir/generated/$name.h", target_out_dir),
      # the script also modifies the corresponding .cpp file, but if we tell GN that it gets
      # confused due to the same file being named by two different paths
    ]
  }

  action("compile_processors") {
    script = "gn/compile_processors.py"
    deps = [
      ":create_sksl_fp",
      ":sksl_pre_includes",
      ":skslc(//gn/toolchain:$host_toolchain)",
    ]
    sources = skia_gpu_processor_sources
    outputs = skia_gpu_processor_outputs
    args = [
      rebase_path(skslc_path),
      rebase_path("bin/clang-format"),
      rebase_path("bin/fetch-clang-format"),
    ]
    args += rebase_path(skia_gpu_processor_sources)
  }
} else {
  group("compile_processors") {
  }
}

if (skia_compile_sksl_tests) {
  import("gn/sksl_tests.gni")
  sksl_fp_tests_outputs = []
  foreach(src, sksl_fp_tests_sources) {
    dir = get_path_info(src, "dir")
    name = get_path_info(src, "name")
    sksl_fp_tests_outputs += [
      "$target_out_dir/" + rebase_path("$dir/golden/$name.cpp", target_out_dir),
      "$target_out_dir/" + rebase_path("$dir/golden/$name.h", target_out_dir),
    ]
  }

  sksl_glsl_tests_outputs = []
  foreach(src, sksl_glsl_tests_sources) {
    dir = get_path_info(src, "dir")
    name = get_path_info(src, "name")
    sksl_glsl_tests_outputs +=
        [ "$target_out_dir/" +
          rebase_path("$dir/golden/$name.glsl", target_out_dir) ]
  }

  action("compile_sksl_tests") {
    script = "gn/compile_sksl_tests.py"
    deps = [
      ":create_sksl_fp",
      ":sksl_pre_includes",
      ":skslc(//gn/toolchain:$host_toolchain)",
    ]
    sources = sksl_fp_tests_sources + sksl_glsl_tests_sources
    outputs = sksl_fp_tests_outputs + sksl_glsl_tests_outputs
    args = [ rebase_path(skslc_path) ]
    args += rebase_path(sksl_fp_tests_sources)
    args += rebase_path(sksl_glsl_tests_sources)
  }
} else {
  group("compile_sksl_tests") {
  }
}

optional("gpu") {
  enabled = skia_enable_gpu
  deps = [
    ":compile_processors",
    ":compile_sksl_tests",
    ":dehydrate_sksl",
    ":run_sksllex",
  ]
  if (skia_generate_workarounds) {
    deps += [ ":workaround_list" ]
  }
  public_defines = []
  public_configs = []
  public_deps = []

  sources =
      skia_gpu_sources + skia_sksl_gpu_sources + skia_gpu_processor_outputs
  if (!skia_enable_ccpr) {
    sources -= skia_ccpr_sources
    sources += [ "src/gpu/ccpr/GrCoverageCountingPathRenderer_none.cpp" ]
  }
  if (!skia_enable_nvpr) {
    sources -= skia_nvpr_sources
    sources += [ "src/gpu/GrPathRendering_none.cpp" ]
  }

  libs = []
  frameworks = []

  if (skia_use_gl) {
    public_defines += [ "SK_GL" ]
    if (is_android) {
      sources += [ "src/gpu/gl/egl/GrGLMakeNativeInterface_egl.cpp" ]

      # this lib is required to link against AHardwareBuffer
      if (defined(ndk_api) && ndk_api >= 26) {
        libs += [ "android" ]
      }
    } else if (skia_use_egl) {
      sources += [ "src/gpu/gl/egl/GrGLMakeNativeInterface_egl.cpp" ]
      libs += [ "EGL" ]
    } else if (skia_use_webgl) {
      sources += [ "src/gpu/gl/webgl/GrGLMakeNativeInterface_webgl.cpp" ]
    } else if (is_linux && skia_use_x11) {
      sources += [ "src/gpu/gl/glx/GrGLMakeNativeInterface_glx.cpp" ]
      libs += [ "GL" ]
    } else if (is_mac) {
      sources += [ "src/gpu/gl/mac/GrGLMakeNativeInterface_mac.cpp" ]
    } else if (is_ios) {
      sources += [ "src/gpu/gl/iOS/GrGLMakeNativeInterface_iOS.cpp" ]
    } else if (is_win) {
      sources += [ "src/gpu/gl/win/GrGLMakeNativeInterface_win.cpp" ]
      if (target_cpu != "arm64") {
        libs += [ "OpenGL32.lib" ]
      }
    } else {
      sources += [ "src/gpu/gl/GrGLMakeNativeInterface_none.cpp" ]
    }
    sources += skia_gl_gpu_sources
  }

  if (skia_use_vulkan) {
    public_defines += [ "SK_VULKAN" ]
    if (skia_use_vma) {
      deps += [ "third_party/vulkanmemoryallocator" ]
    }
    sources += skia_vk_sources
    if (skia_enable_vulkan_debug_layers) {
      public_defines += [ "SK_ENABLE_VK_LAYERS" ]
    }
    if (is_fuchsia) {
      if (using_fuchsia_sdk) {
        public_deps += [ "$fuchsia_sdk_root/pkg:vulkan" ]
      } else {
        public_deps += [ "//src/graphics/lib/vulkan" ]
      }
    }
  }

  if (is_android && (skia_use_gl || skia_use_vulkan)) {
    # this lib is required to link against AHardwareBuffer
    if (defined(ndk_api) && ndk_api >= 26) {
      libs += [ "android" ]
    }
  }

  if (skia_use_dawn) {
    public_defines += [ "SK_DAWN" ]
    sources += skia_dawn_sources
    public_deps += [ "//third_party/externals/dawn/src/dawn:dawn_headers" ]
    deps += [
      "//third_party/externals/dawn/src/dawn:dawn_proc",
      "//third_party/externals/dawn/src/dawn:dawncpp",
      "//third_party/externals/dawn/src/dawn_native",
    ]
    if (dawn_enable_d3d12) {
      libs += [
        "d3d12.lib",
        "dxgi.lib",
        "d3dcompiler.lib",
      ]
    } else if (dawn_enable_metal) {
      frameworks += [ "Metal.framework" ]
    }
  }

  if (skia_use_direct3d) {
    public_defines += [ "SK_DIRECT3D" ]
    deps += [ "//third_party/spirv-cross:spirv_cross" ]
    sources += skia_direct3d_sources
    if (skia_enable_direct3d_debug_layer) {
      public_defines += [ "SK_ENABLE_D3D_DEBUG_LAYER" ]
    }
    libs += [
      "d3d12.lib",
      "dxgi.lib",
      "d3dcompiler.lib",
    ]
  }

  cflags_objcc = []
  if (skia_use_metal) {
    public_defines += [ "SK_METAL" ]
    sources += skia_metal_sources
    frameworks += [ "Metal.framework" ]
    frameworks += [ "MetalKit.framework" ]
    frameworks += [ "Foundation.framework" ]
    cflags_objcc += [ "-fobjc-arc" ]
  }

  if (is_debug) {
    public_defines += [ "SK_ENABLE_DUMP_GPU" ]
  }
}

optional("gif") {
  enabled = !skia_use_wuffs && skia_use_libgifcodec
  _libgifcodec_gni_path = "third_party/externals/libgifcodec/libgifcodec.gni"
  if ("True" ==
      exec_script("gn/checkpath.py",
                  [ rebase_path(_libgifcodec_gni_path, root_build_dir) ],
                  "trim string")) {
    public_defines = [ "SK_USE_LIBGIFCODEC" ]
    public_include_dirs = [
      ".",
      skia_libgifcodec_path,
    ]
    include_dirs = public_include_dirs
    import(_libgifcodec_gni_path)
    sources = rebase_path(libgifcodec_sources + libgifcodec_public,
                          ".",
                          skia_libgifcodec_path)
  }
}

optional("heif") {
  enabled = skia_use_libheif
  public_defines = [ "SK_HAS_HEIF_LIBRARY" ]

  deps = []

  sources = [ "src/codec/SkHeifCodec.cpp" ]
}

optional("jpeg_decode") {
  enabled = skia_use_libjpeg_turbo_decode
  public_defines = [ "SK_CODEC_DECODES_JPEG" ]

  deps = [ "//third_party/libjpeg-turbo:libjpeg" ]
  sources = [
    "src/codec/SkJpegCodec.cpp",
    "src/codec/SkJpegDecoderMgr.cpp",
    "src/codec/SkJpegUtility.cpp",
  ]
}

optional("jpeg_encode") {
  enabled = skia_use_libjpeg_turbo_encode
  public_defines = [ "SK_ENCODE_JPEG" ]

  deps = [ "//third_party/libjpeg-turbo:libjpeg" ]
  public = [ "include/encode/SkJpegEncoder.h" ]
  sources = [
    "src/images/SkJPEGWriteUtility.cpp",
    "src/images/SkJpegEncoder.cpp",
  ]
}

optional("ndk_images") {
  enabled = skia_use_ndk_images
  public_defines = [ "SK_ENABLE_NDK_IMAGES" ]
  sources = [
    "src/ports/SkImageEncoder_NDK.cpp",
    "src/ports/SkImageGeneratorNDK.cpp",
    "src/ports/SkNDKConversions.cpp",
  ]
  libs = [ "jnigraphics" ]
}

optional("pdf") {
  enabled = skia_use_zlib && skia_enable_pdf
  public_defines = [ "SK_SUPPORT_PDF" ]

  deps = [ "//third_party/zlib" ]
  if (skia_use_libjpeg_turbo_decode) {
    deps += [ ":jpeg_decode" ]
  }
  if (skia_use_libjpeg_turbo_encode) {
    deps += [ ":jpeg_encode" ]
  }
  public = skia_pdf_public
  sources = skia_pdf_sources
  sources_when_disabled = [ "src/pdf/SkDocument_PDF_None.cpp" ]
  if (skia_use_icu && skia_use_harfbuzz && skia_pdf_subset_harfbuzz) {
    deps += [ "//third_party/harfbuzz" ]
    defines = [ "SK_PDF_USE_HARFBUZZ_SUBSET" ]
  } else if (skia_use_icu && skia_use_sfntly) {
    deps += [ "//third_party/sfntly" ]
    defines = [ "SK_PDF_USE_SFNTLY" ]
  }
}

optional("xps") {
  enabled = skia_use_xps && is_win
  public_defines = [ "SK_SUPPORT_XPS" ]
  public = skia_xps_public
  sources = skia_xps_sources
}

optional("png_decode") {
  enabled = skia_use_libpng_decode
  public_defines = [ "SK_CODEC_DECODES_PNG" ]

  deps = [ "//third_party/libpng" ]
  sources = [
    "src/codec/SkIcoCodec.cpp",
    "src/codec/SkPngCodec.cpp",
  ]
}

optional("png_encode") {
  enabled = skia_use_libpng_encode
  public_defines = [ "SK_ENCODE_PNG" ]

  deps = [ "//third_party/libpng" ]
  sources = [ "src/images/SkPngEncoder.cpp" ]
}

optional("raw") {
  enabled = skia_use_dng_sdk && skia_use_libjpeg_turbo_decode && skia_use_piex
  public_defines = [ "SK_CODEC_DECODES_RAW" ]

  deps = [
    "//third_party/dng_sdk",
    "//third_party/libjpeg-turbo:libjpeg",
    "//third_party/piex",
  ]

  # SkRawCodec catches any exceptions thrown by dng_sdk, insulating the rest of
  # Skia.
  configs_to_remove = [ "//gn:no_exceptions" ]

  sources = [ "src/codec/SkRawCodec.cpp" ]
}

import("third_party/skcms/skcms.gni")
source_set("skcms") {
  cflags = []
  if (!is_win || is_clang) {
    cflags += [
      "-w",
      "-std=c11",
    ]
  }

  public = [ "include/third_party/skcms/skcms.h" ]
  include_dirs = [ "include/third_party/skcms" ]
  sources = rebase_path(skcms_sources, ".", "third_party/skcms")
}

optional("typeface_freetype") {
  enabled = skia_use_freetype

  deps = [ "//third_party/freetype2" ]
  sources = [
    "src/ports/SkFontHost_FreeType.cpp",
    "src/ports/SkFontHost_FreeType_common.cpp",
    "src/ports/SkFontHost_FreeType_common.h",
  ]
}

optional("webp_decode") {
  enabled = skia_use_libwebp_decode
  public_defines = [ "SK_CODEC_DECODES_WEBP" ]

  deps = [ "//third_party/libwebp" ]
  sources = [ "src/codec/SkWebpCodec.cpp" ]
}

optional("webp_encode") {
  enabled = skia_use_libwebp_encode
  public_defines = [ "SK_ENCODE_WEBP" ]

  deps = [ "//third_party/libwebp" ]
  sources = [ "src/images/SkWebpEncoder.cpp" ]
}

optional("wuffs") {
  enabled = skia_use_wuffs
  public_defines = [ "SK_HAS_WUFFS_LIBRARY" ]

  deps = [ "//third_party/wuffs" ]
  sources = [ "src/codec/SkWuffsCodec.cpp" ]
}

optional("xml") {
  enabled = skia_use_expat
  public_defines = [ "SK_XML" ]

  deps = [ "//third_party/expat" ]
  sources = [
    "src/svg/SkSVGCanvas.cpp",
    "src/svg/SkSVGDevice.cpp",
    "src/xml/SkDOM.cpp",
    "src/xml/SkXMLParser.cpp",
    "src/xml/SkXMLWriter.cpp",
  ]
}

optional("sksl_interpreter") {
  enabled = skia_enable_sksl_interpreter
  public_defines = [ "SK_ENABLE_SKSL_INTERPRETER" ]
}

optional("skvm_jit") {
  enabled = skia_enable_skvm_jit_when_possible
  public_defines = [ "SKVM_JIT_WHEN_POSSIBLE" ]
  if (skia_vtune_path != "") {
    public_defines += [ "SKVM_JIT_VTUNE" ]
    public_include_dirs = [ "$skia_vtune_path/include" ]
    libs = [ "$skia_vtune_path/lib64/jitprofiling.lib" ]
  }
}

if (skia_enable_gpu && skia_generate_workarounds) {
  action("workaround_list") {
    script = "tools/build_workaround_header.py"

    inputs = [ "src/gpu/gpu_workaround_list.txt" ]

    # see comments in skia_compile_processors about out dir path shenanigans.
    output_file =
        rebase_path("include/gpu/GrDriverBugWorkaroundsAutogen.h", root_out_dir)

    outputs = [ "$root_out_dir/$output_file" ]
    args = [
      "--output-file",
      "$output_file",
    ]

    foreach(file, inputs) {
      args += [ rebase_path(file, root_build_dir) ]
    }
  }
}

component("skia") {
  public_configs = [ ":skia_public" ]
  configs += skia_library_configs

  public_deps = [
    ":fontmgr_FontConfigInterface",
    ":fontmgr_android",
    ":fontmgr_custom_directory",
    ":fontmgr_custom_embedded",
    ":fontmgr_custom_empty",
    ":fontmgr_fontconfig",
    ":fontmgr_fuchsia",
    ":fontmgr_mac_ct",
    ":fontmgr_win",
    ":fontmgr_win_gdi",
    ":gpu",
    ":pdf",
    ":skcms",
    ":xps",
  ]

  deps = [
    ":android_utils",
    ":arm64",
    ":armv7",
    ":avx",
    ":compile_processors",
    ":crc32",
    ":dehydrate_sksl",
    ":fontmgr_factory",
    ":gif",
    ":heif",
    ":hsw",
    ":jpeg_decode",
    ":jpeg_encode",
    ":ndk_images",
    ":none",
    ":png_decode",
    ":png_encode",
    ":raw",
    ":sksl_interpreter",
    ":skvm_jit",
    ":skx",
    ":sse2",
    ":sse41",
    ":sse42",
    ":ssse3",
    ":webp_decode",
    ":webp_encode",
    ":wuffs",
    ":xml",
  ]

  # This file (and all GN files in Skia) are designed to work with an
  # empty sources assignment filter; we handle all that explicitly.
  # We clear the filter here for clients who may have set up a global filter.
  set_sources_assignment_filter([])

  public = skia_core_public
  public += skia_utils_public
  public += skia_effects_public
  public += skia_effects_imagefilter_public

  sources = []
  sources += skia_core_sources
  sources += skia_utils_sources
  sources += skia_effects_sources
  sources += skia_effects_imagefilter_sources
  sources += skia_sksl_sources
  sources += [
    "src/android/SkAndroidFrameworkUtils.cpp",
    "src/android/SkAnimatedImage.cpp",
    "src/codec/SkAndroidCodec.cpp",
    "src/codec/SkAndroidCodecAdapter.cpp",
    "src/codec/SkBmpBaseCodec.cpp",
    "src/codec/SkBmpCodec.cpp",
    "src/codec/SkBmpMaskCodec.cpp",
    "src/codec/SkBmpRLECodec.cpp",
    "src/codec/SkBmpStandardCodec.cpp",
    "src/codec/SkCodec.cpp",
    "src/codec/SkCodecImageGenerator.cpp",
    "src/codec/SkColorTable.cpp",
    "src/codec/SkEncodedInfo.cpp",
    "src/codec/SkMaskSwizzler.cpp",
    "src/codec/SkMasks.cpp",
    "src/codec/SkParseEncodedOrigin.cpp",
    "src/codec/SkSampledCodec.cpp",
    "src/codec/SkSampler.cpp",
    "src/codec/SkStreamBuffer.cpp",
    "src/codec/SkSwizzler.cpp",
    "src/codec/SkWbmpCodec.cpp",
    "src/images/SkImageEncoder.cpp",
    "src/ports/SkDiscardableMemory_none.cpp",
    "src/ports/SkGlobalInitialization_default.cpp",
    "src/ports/SkImageGenerator_skia.cpp",
    "src/ports/SkMemory_malloc.cpp",
    "src/ports/SkOSFile_stdio.cpp",
    "src/sfnt/SkOTTable_name.cpp",
    "src/sfnt/SkOTUtils.cpp",
  ]

  defines = []
  libs = []

  if (is_win) {
    sources += [
      "src/ports/SkDebug_win.cpp",
      "src/ports/SkImageEncoder_WIC.cpp",
      "src/ports/SkImageGeneratorWIC.cpp",
      "src/ports/SkOSFile_win.cpp",
      "src/ports/SkOSLibrary_win.cpp",
    ]
    libs += [
      "FontSub.lib",
      "Ole32.lib",
      "OleAut32.lib",
      "User32.lib",
      "Usp10.lib",
    ]
  } else {
    sources += [
      "src/ports/SkOSFile_posix.cpp",
      "src/ports/SkOSLibrary_posix.cpp",
    ]
    libs += [ "dl" ]
  }

  if (is_android) {
    deps += [ "//third_party/expat" ]
    if (defined(ndk) && ndk != "") {
      deps += [ "//third_party/cpu-features" ]
    }
    sources += [ "src/ports/SkDebug_android.cpp" ]
    libs += [
      "EGL",
      "GLESv2",
      "log",
    ]
  }

  if (is_linux || target_cpu == "wasm") {
    sources += [ "src/ports/SkDebug_stdio.cpp" ]
    if (skia_use_egl) {
      libs += [ "GLESv2" ]
    }
  }

  if (is_mac) {
    sources += [
      "src/ports/SkDebug_stdio.cpp",
      "src/ports/SkImageEncoder_CG.cpp",
      "src/ports/SkImageGeneratorCG.cpp",
    ]
    frameworks = [
      "ApplicationServices.framework",
      "OpenGL.framework",
    ]
  }

  if (is_ios) {
    sources += [
      "src/ports/SkDebug_stdio.cpp",
      "src/ports/SkImageEncoder_CG.cpp",
      "src/ports/SkImageGeneratorCG.cpp",
    ]
    frameworks = [
      "CoreFoundation.framework",
      "ImageIO.framework",
      "MobileCoreServices.framework",
    ]
  }

  if (is_fuchsia) {
    sources += [ "src/ports/SkDebug_stdio.cpp" ]
  }

  if (skia_enable_spirv_validation) {
    deps += [ "//third_party/spirv-tools:spvtools_val" ]
    defines += [ "SK_ENABLE_SPIRV_VALIDATION" ]
  }

  if (skia_include_multiframe_procs) {
    sources += [ "tools/SkSharingProc.cpp" ]
  }
}

# DebugCanvas used in experimental/wasm-skp-debugger
if (target_cpu == "wasm") {
  static_library("debugcanvas") {
    public_configs = [ ":skia_public" ]

    sources = [
      "tools/SkSharingProc.cpp",
      "tools/UrlDataManager.cpp",
      "tools/debugger/DebugCanvas.cpp",
      "tools/debugger/DebugLayerManager.cpp",
      "tools/debugger/DrawCommand.cpp",
      "tools/debugger/JsonWriteBuffer.cpp",
    ]
  }
}

static_library("pathkit") {
  check_includes = false
  public_configs = [ ":skia_public" ]
  configs += skia_library_configs

  deps = [
    ":arm64",
    ":armv7",
    ":avx",
    ":crc32",
    ":hsw",
    ":none",
    ":sse2",
    ":sse41",
    ":sse42",
    ":ssse3",
  ]

  # This file (and all GN files in Skia) are designed to work with an
  # empty sources assignment filter; we handle all that explicitly.
  # We clear the filter here for clients who may have set up a global filter.
  set_sources_assignment_filter([])

  sources = []
  sources += skia_pathops_sources
  sources += skia_pathops_public
  sources += [
    "src/core/SkAnalyticEdge.cpp",
    "src/core/SkArenaAlloc.cpp",
    "src/core/SkContourMeasure.cpp",
    "src/core/SkCubicMap.cpp",
    "src/core/SkEdge.cpp",
    "src/core/SkEdgeBuilder.cpp",
    "src/core/SkEdgeClipper.cpp",
    "src/core/SkGeometry.cpp",
    "src/core/SkIDChangeListener.cpp",
    "src/core/SkLineClipper.cpp",
    "src/core/SkMalloc.cpp",
    "src/core/SkMallocPixelRef.cpp",
    "src/core/SkMath.cpp",
    "src/core/SkMatrix.cpp",
    "src/core/SkOpts.cpp",
    "src/core/SkPaint.cpp",
    "src/core/SkPath.cpp",
    "src/core/SkPathBuilder.cpp",
    "src/core/SkPathEffect.cpp",
    "src/core/SkPathMeasure.cpp",
    "src/core/SkPathRef.cpp",
    "src/core/SkPoint.cpp",
    "src/core/SkRRect.cpp",
    "src/core/SkReadBuffer.cpp",
    "src/core/SkRect.cpp",
    "src/core/SkSemaphore.cpp",
    "src/core/SkStream.cpp",
    "src/core/SkString.cpp",
    "src/core/SkStringUtils.cpp",
    "src/core/SkStroke.cpp",
    "src/core/SkStrokeRec.cpp",
    "src/core/SkStrokerPriv.cpp",
    "src/core/SkThreadID.cpp",
    "src/core/SkUtils.cpp",
    "src/effects/SkDashPathEffect.cpp",
    "src/effects/SkTrimPathEffect.cpp",
    "src/ports/SkDebug_stdio.cpp",
    "src/ports/SkMemory_malloc.cpp",
    "src/utils/SkDashPath.cpp",
    "src/utils/SkParse.cpp",
    "src/utils/SkParsePath.cpp",
    "src/utils/SkUTF.cpp",
  ]
}

group("modules") {
  deps = [
    "modules/particles",
    "modules/skottie",
    "modules/skparagraph",
    "modules/skshaper",
  ]
}

config("our_vulkan_headers") {
  include_dirs = [ "include/third_party/vulkan" ]
}

# Targets guarded by skia_enable_tools may use //third_party freely.
if (skia_enable_tools) {
  skia_public_includes = [
    "client_utils/android",
    "include/android",
    "include/c",
    "include/codec",
    "include/config",
    "include/core",
    "include/docs",
    "include/effects",
    "include/encode",
    "include/gpu",
    "include/pathops",
    "include/ports",
    "include/svg",
    "include/utils",
    "include/utils/mac",
    "modules/skparagraph/include",
    "modules/skshaper/include",
    "modules/skottie/include",
  ]

  # Used by gn_to_bp.py to list our public include dirs.
  source_set("public") {
    configs += [ ":skia_public" ]
    include_dirs = skia_public_includes
  }

  config("skia.h_config") {
    include_dirs = [ "$target_gen_dir" ]
  }
  action("skia.h") {
    public_configs = [ ":skia.h_config" ]
    skia_h = "$target_gen_dir/skia.h"
    script = "gn/find_headers.py"

    args = [ rebase_path("//bin/gn") ] + [ rebase_path("//") ] +
           [ rebase_path(skia_h, root_build_dir) ] +
           rebase_path(skia_public_includes)
    depfile = "$skia_h.deps"
    outputs = [ skia_h ]
  }

  if (target_cpu == "x64") {
    executable("fiddle") {
      check_includes = false
      libs = []
      sources = [
        "tools/fiddle/draw.cpp",
        "tools/fiddle/fiddle_main.cpp",
      ]

      if (skia_use_egl) {
        sources += [ "tools/fiddle/egl_context.cpp" ]
      } else {
        sources += [ "tools/fiddle/null_context.cpp" ]
      }
      testonly = true
      deps = [
        ":flags",
        ":gpu_tool_utils",
        ":skia",
        ":skia.h",
        "modules/skottie",
        "modules/skshaper",
      ]
    }
  }

  config("cpp14") {
    if (is_win) {
      cflags_cc = [ "/std:c++14" ]
    } else {
      cflags_cc = [ "-std=c++14" ]
    }
  }

  source_set("public_headers_warnings_check") {
    sources = [ "tools/public_headers_warnings_check.cpp" ]
    configs -= [ "//gn:warnings_except_public_headers" ]
    configs += [
      ":our_vulkan_headers",
      ":cpp14",
    ]
    deps = [
      ":skia",
      ":skia.h",
      "modules/skottie",
      "modules/skshaper",
    ]

    if (skia_use_dawn) {
      deps += [ "//third_party/externals/dawn/src/dawn:dawn_headers" ]
    }
  }

  template("test_lib") {
    config(target_name + "_config") {
      if (defined(invoker.public_defines)) {
        defines = invoker.public_defines
      }
    }
    source_set(target_name) {
      forward_variables_from(invoker, "*", [])
      check_includes = false
      public_configs = [
        ":" + target_name + "_config",
        ":skia_private",
      ]

      if (!defined(deps)) {
        deps = []
      }
      deps += [ ":skia" ]
      testonly = true
    }
  }

  template("test_app") {
    if (is_ios) {
      ios_app_bundle(target_name) {
        forward_variables_from(invoker,
                               "*",
                               [
                                 "output_name",
                                 "visibility",
                                 "is_shared_library",
                               ])
        testonly = true
        extra_configs = [ ":skia_private" ]
        launchscreen = "platform_tools/ios/app/LaunchScreen.storyboard"
        data_sources = [ "resources" ]
        if ("True" == exec_script("//gn/checkdir.py",
                                  [ rebase_path("skps", root_build_dir) ],
                                  "trim string")) {
          data_sources += [ "skps" ]
        }
      }
    } else {
      # !is_ios

      output_dir = root_build_dir
      if (defined(invoker.is_shared_library) && invoker.is_shared_library) {
        shared_library("lib" + target_name) {
          forward_variables_from(invoker, "*", [ "is_shared_library" ])
          configs += [ ":skia_private" ]
          testonly = true
        }
      } else {
        _executable = target_name
        executable(_executable) {
          check_includes = false
          forward_variables_from(invoker, "*", [ "is_shared_library" ])
          configs += [ ":skia_private" ]
          testonly = true
        }
      }
      if (is_android && skia_android_serial != "" && defined(_executable)) {
        action("push_" + target_name) {
          script = "gn/push_to_android.py"
          deps = [ ":" + _executable ]
          _stamp = "$target_gen_dir/$_executable.pushed_$skia_android_serial"
          outputs = [ _stamp ]
          args = [
            rebase_path("$root_build_dir/$_executable"),
            skia_android_serial,
            rebase_path(_stamp),
          ]
          testonly = true
        }
      }
    }
  }

  test_lib("gpu_tool_utils") {
    public_defines = []

    # Bots and even devs may not have Vulkan headers, so put
    # include/third_party/vulkan on our path so they're always available.
    all_dependent_configs = [ ":our_vulkan_headers" ]

    defines = []
    if (skia_enable_discrete_gpu) {
      defines += [ "SK_ENABLE_DISCRETE_GPU" ]
    }

    deps = []
    public_deps = []
    sources = [
      "tools/gpu/BackendTextureImageFactory.cpp",
      "tools/gpu/BackendTextureImageFactory.h",
      "tools/gpu/FlushFinishTracker.cpp",
      "tools/gpu/FlushFinishTracker.h",
      "tools/gpu/GrContextFactory.cpp",
      "tools/gpu/GrTest.cpp",
      "tools/gpu/MemoryCache.cpp",
      "tools/gpu/MemoryCache.h",
      "tools/gpu/ProxyUtils.cpp",
      "tools/gpu/TestContext.cpp",
      "tools/gpu/TestOps.cpp",
      "tools/gpu/TestOps.h",
      "tools/gpu/YUVUtils.cpp",
      "tools/gpu/YUVUtils.h",
      "tools/gpu/gl/GLTestContext.cpp",  # See comment below about
                                         # GrContextFactory workaround.
      "tools/gpu/mock/MockTestContext.cpp",
    ]

    libs = []
    frameworks = []

    if (skia_use_gl) {
      sources +=
          [ "tools/gpu/gl/command_buffer/GLTestContext_command_buffer.cpp" ]
      if (is_ios) {
        sources += [ "tools/gpu/gl/iOS/CreatePlatformGLTestContext_iOS.mm" ]
        frameworks += [ "OpenGLES.framework" ]
      } else if (is_mac) {
        sources += [ "tools/gpu/gl/mac/CreatePlatformGLTestContext_mac.cpp" ]
      }
      if (skia_use_angle) {
        deps += [ "//third_party/angle2" ]
        sources += [ "tools/gpu/gl/angle/GLTestContext_angle.cpp" ]
      }
    }

    # We need the GLTestContext on Vulkan-only builds for the persistent GL context workaround in
    # in GrContextFactory. This only matters for OSes that can run Vulkan.
    if ((skia_use_gl || skia_use_vulkan) && target_cpu != "wasm") {
      if (is_android || skia_use_egl) {
        sources += [ "tools/gpu/gl/egl/CreatePlatformGLTestContext_egl.cpp" ]
        libs += [ "EGL" ]
      } else if (is_linux) {
        sources += [ "tools/gpu/gl/glx/CreatePlatformGLTestContext_glx.cpp" ]
        libs += [
          "GLU",
          "GL",
          "X11",
        ]
      } else if (is_win) {
        sources += [ "tools/gpu/gl/win/CreatePlatformGLTestContext_win.cpp" ]
        libs += [ "Gdi32.lib" ]
        if (target_cpu != "arm64") {
          libs += [ "OpenGL32.lib" ]
        }
      }
    }

    if (skia_use_vulkan) {
      sources += [ "tools/gpu/vk/VkTestContext.h" ]
      sources += [ "tools/gpu/vk/VkTestContext.cpp" ]
      sources += [ "tools/gpu/vk/VkTestHelper.h" ]
      sources += [ "tools/gpu/vk/VkTestHelper.cpp" ]
      sources += [ "tools/gpu/vk/VkTestUtils.h" ]
      sources += [ "tools/gpu/vk/VkTestUtils.cpp" ]
      sources += [ "tools/gpu/vk/VkYcbcrSamplerHelper.h" ]
      sources += [ "tools/gpu/vk/VkYcbcrSamplerHelper.cpp" ]
    }
    if (skia_use_metal) {
      sources += [ "tools/gpu/mtl/MtlTestContext.mm" ]
    }
    if (skia_use_direct3d) {
      sources += [ "tools/gpu/d3d/D3DTestContext.cpp" ]
      sources += [ "tools/gpu/d3d/D3DTestUtils.cpp" ]
    }
    if (skia_use_dawn) {
      public_deps += [ "//third_party/externals/dawn/src/dawn:dawn_headers" ]
      sources += [ "tools/gpu/dawn/DawnTestContext.cpp" ]
      if (is_clang) {
        cflags_cc = [ "-Wno-microsoft-cast" ]
      }
    }

    if (is_fuchsia && using_fuchsia_sdk) {
      libs +=
          [ "${fuchsia_sdk_path}/arch/${target_cpu}/sysroot/lib/libzircon.so" ]
    }

    cflags_objcc = [ "-fobjc-arc" ]
  }  # test_lib("gpu_tool_utils")

  test_lib("flags") {
    sources = [ "tools/flags/CommandLineFlags.cpp" ]
  }

  test_lib("common_flags_config") {
    sources = [ "tools/flags/CommonFlagsConfig.cpp" ]
    deps = [ ":flags" ]
    public_deps = [ ":gpu_tool_utils" ]
  }
  test_lib("common_flags_gpu") {
    sources = [ "tools/flags/CommonFlagsGpu.cpp" ]
    deps = [ ":flags" ]
    public_deps = [ ":gpu_tool_utils" ]
  }
  test_lib("common_flags_images") {
    sources = [ "tools/flags/CommonFlagsImages.cpp" ]
    deps = [ ":flags" ]
  }
  test_lib("common_flags_aa") {
    sources = [ "tools/flags/CommonFlagsAA.cpp" ]
    deps = [ ":flags" ]
  }

  test_lib("trace") {
    deps = [ ":flags" ]
    sources = [
      "tools/trace/ChromeTracingTracer.cpp",
      "tools/trace/ChromeTracingTracer.h",
      "tools/trace/EventTracingPriv.cpp",
      "tools/trace/EventTracingPriv.h",
      "tools/trace/SkDebugfTracer.cpp",
      "tools/trace/SkDebugfTracer.h",
    ]
  }

  test_lib("tool_utils") {
    sources = [
      "tools/AndroidSkDebugToStdOut.cpp",
      "tools/AutoreleasePool.h",
      "tools/DDLPromiseImageHelper.cpp",
      "tools/DDLPromiseImageHelper.h",
      "tools/DDLTileHelper.cpp",
      "tools/DDLTileHelper.h",
      "tools/LsanSuppressions.cpp",
      "tools/ProcStats.cpp",
      "tools/ProcStats.h",
      "tools/Resources.cpp",
      "tools/Resources.h",
      "tools/SkMetaData.cpp",
      "tools/SkMetaData.h",
      "tools/SkSharingProc.cpp",
      "tools/SkSharingProc.h",
      "tools/Stats.h",
      "tools/ToolUtils.cpp",
      "tools/ToolUtils.h",
      "tools/UrlDataManager.cpp",
      "tools/UrlDataManager.h",
      "tools/debugger/DebugCanvas.cpp",
      "tools/debugger/DebugCanvas.h",
      "tools/debugger/DebugLayerManager.cpp",
      "tools/debugger/DebugLayerManager.h",
      "tools/debugger/DrawCommand.cpp",
      "tools/debugger/DrawCommand.h",
      "tools/debugger/JsonWriteBuffer.cpp",
      "tools/debugger/JsonWriteBuffer.h",
      "tools/fonts/RandomScalerContext.cpp",
      "tools/fonts/RandomScalerContext.h",
      "tools/fonts/TestEmptyTypeface.h",
      "tools/fonts/TestFontMgr.cpp",
      "tools/fonts/TestFontMgr.h",
      "tools/fonts/TestSVGTypeface.cpp",
      "tools/fonts/TestSVGTypeface.h",
      "tools/fonts/TestTypeface.cpp",
      "tools/fonts/TestTypeface.h",
      "tools/fonts/ToolUtilsFont.cpp",
      "tools/random_parse_path.cpp",
      "tools/random_parse_path.h",
      "tools/timer/TimeUtils.h",
      "tools/timer/Timer.cpp",
      "tools/timer/Timer.h",
    ]
    if (target_cpu != "wasm") {
      sources += [ "tools/CrashHandler.cpp" ]
    }
    libs = []
    frameworks = []
    if (is_ios) {
      sources += [ "tools/ios_utils.m" ]
      sources += [ "tools/ios_utils.h" ]
      if (skia_use_metal) {
        sources += [ "tools/AutoreleasePool.mm" ]
      }
      frameworks += [ "Foundation.framework" ]
    } else if (is_mac) {
      if (skia_use_metal) {
        sources += [ "tools/AutoreleasePool.mm" ]
        frameworks += [ "Foundation.framework" ]
      }
    } else if (is_win) {
      libs += [ "DbgHelp.lib" ]
    }

    defines = []
    if (skia_tools_require_resources) {
      defines += [ "SK_TOOLS_REQUIRE_RESOURCES" ]
    }
    deps = [
      ":experimental_svg_model",
      ":flags",
    ]
    public_deps = [ ":gpu_tool_utils" ]
  }

  test_lib("etc1") {
    sources = [ "third_party/etc1/etc1.cpp" ]
  }

  import("gn/gm.gni")
  test_lib("gm") {
    sources = gm_sources
    if (skia_use_gl) {
      sources += gl_gm_sources
    }
    deps = [
      ":etc1",
      ":flags",
      ":skia",
      ":tool_utils",
      "modules/skottie",
      "modules/skottie:gm",
      "modules/skparagraph",
      "modules/skparagraph:gm",
      "modules/skshaper",
    ]
    if (is_skia_dev_build) {
      sources += [ "gm/fiddle.cpp" ]
      deps += [ ":skia.h" ]
    }
    public_deps = [ ":gpu_tool_utils" ]

    if (skia_use_ffmpeg) {
      deps += [ "experimental/ffmpeg:video_decoder" ]
      sources += [ "gm/video_decoder.cpp" ]
    }
  }

  test_lib("skvm_builders") {
    sources = [
      "tools/SkVMBuilders.cpp",
      "tools/SkVMBuilders.h",
    ]
  }

  import("gn/tests.gni")
  test_lib("tests") {
    sources = tests_sources + pathops_tests_sources
    if (skia_use_metal) {
      sources += metal_tests_sources
      cflags_objcc = [ "-fobjc-arc" ]
    }
    if (skia_use_gl) {
      sources += gl_tests_sources
    }
    if (!skia_enable_fontmgr_android) {
      sources -= [ "//tests/FontMgrAndroidParserTest.cpp" ]
    }
    if (!skia_enable_fontmgr_fontconfig) {
      sources -= [ "//tests/FontMgrFontConfigTest.cpp" ]
    }
    deps = [
      ":experimental_svg_model",
      ":flags",
      ":skia",
      ":skvm_builders",
      ":tool_utils",
      "experimental/skrive:tests",
      "modules/skottie:tests",
      "modules/skparagraph:tests",
      "modules/sksg:tests",
      "modules/skshaper",
      "//third_party/libpng",
      "//third_party/libwebp",
      "//third_party/zlib",
    ]
    public_deps = [
      ":gpu_tool_utils",  # Test.h #includes headers from this target.
    ]
  }

  import("gn/bench.gni")
  test_lib("bench") {
    sources = bench_sources
    deps = [
      ":flags",
      ":gm",
      ":gpu_tool_utils",
      ":skia",
      ":skvm_builders",
      ":tool_utils",
      "modules/skparagraph:bench",
      "modules/skshaper",
    ]
  }

  test_lib("experimental_svg_model") {
    if (skia_use_expat) {
      sources = [
        "experimental/svg/model/SkSVGAttribute.cpp",
        "experimental/svg/model/SkSVGAttributeParser.cpp",
        "experimental/svg/model/SkSVGCircle.cpp",
        "experimental/svg/model/SkSVGClipPath.cpp",
        "experimental/svg/model/SkSVGContainer.cpp",
        "experimental/svg/model/SkSVGDOM.cpp",
        "experimental/svg/model/SkSVGEllipse.cpp",
        "experimental/svg/model/SkSVGGradient.cpp",
        "experimental/svg/model/SkSVGLine.cpp",
        "experimental/svg/model/SkSVGLinearGradient.cpp",
        "experimental/svg/model/SkSVGNode.cpp",
        "experimental/svg/model/SkSVGPath.cpp",
        "experimental/svg/model/SkSVGPattern.cpp",
        "experimental/svg/model/SkSVGPoly.cpp",
        "experimental/svg/model/SkSVGRadialGradient.cpp",
        "experimental/svg/model/SkSVGRect.cpp",
        "experimental/svg/model/SkSVGRenderContext.cpp",
        "experimental/svg/model/SkSVGSVG.cpp",
        "experimental/svg/model/SkSVGShape.cpp",
        "experimental/svg/model/SkSVGStop.cpp",
        "experimental/svg/model/SkSVGText.cpp",
        "experimental/svg/model/SkSVGTransformableNode.cpp",
        "experimental/svg/model/SkSVGUse.cpp",
        "experimental/svg/model/SkSVGValue.cpp",
      ]
      deps = [
        ":skia",
        ":xml",
      ]
    }
  }

  test_lib("experimental_xform") {
    sources = [
      "experimental/xform/SkShape.cpp",
      "experimental/xform/SkXform.cpp",
      "experimental/xform/XContext.cpp",
    ]
    deps = [ ":skia" ]
  }

  if (is_linux || is_mac) {
    test_app("skottie_tool") {
      deps = [ "modules/skottie:tool" ]
    }
  }

  test_app("make_skqp_model") {
    sources = [ "tools/skqp/make_skqp_model.cpp" ]
    deps = [ ":skia" ]
  }

  import("gn/samples.gni")
  test_lib("samples") {
    sources = samples_sources
    if (skia_enable_ccpr) {
      sources += samples_sources_ccpr
    }
    public_deps = [ ":tool_utils" ]
    deps = [
      ":experimental_svg_model",
      ":flags",
      ":gpu_tool_utils",
      ":xml",
      "modules/audioplayer",
      "modules/skparagraph:samples",
      "modules/skshaper",
    ]
  }
  if (target_cpu != "wasm") {
    test_app("convert-to-nia") {
      sources = [ "tools/convert-to-nia.cpp" ]
      deps = [ ":skia" ]
    }
    test_app("imgcvt") {
      sources = [ "tools/imgcvt.cpp" ]
      deps = [
        ":skcms",
        ":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
        "tools/fm/fm.cpp",
      ]
      deps = [
        ":common_flags_aa",
        ":common_flags_gpu",
        ":experimental_svg_model",
        ":flags",
        ":gm",
        ":gpu_tool_utils",
        ":hash_and_encode",
        ":skia",
        ":tests",
        ":tool_utils",
        ":trace",
        "modules/skottie",
        "modules/skottie:utils",
      ]
    }
    test_app("dm") {
      sources = [
        "dm/DM.cpp",
        "dm/DMGpuTestProcs.cpp",
        "dm/DMJsonWriter.cpp",
        "dm/DMSrcSink.cpp",
      ]
      deps = [
        ":common_flags_aa",
        ":common_flags_config",
        ":common_flags_gpu",
        ":common_flags_images",
        ":experimental_svg_model",
        ":flags",
        ":gm",
        ":gpu_tool_utils",
        ":hash_and_encode",
        ":skia",
        ":tests",
        ":tool_utils",
        ":trace",
        "experimental/skrive",
        "modules/skottie",
        "modules/skottie:utils",
      ]
    }
  }

  if (!is_win) {
    test_app("remote_demo") {
      sources = [ "tools/remote_demo.cpp" ]
      deps = [ ":skia" ]
    }
  }

  if (!is_win) {
    test_app("blob_cache_sim") {
      sources = [ "tools/blob_cache_sim.cpp" ]
      deps = [ ":skia" ]
    }
  }

  test_app("nanobench") {
    sources = [ "bench/nanobench.cpp" ]
    deps = [
      ":bench",
      ":common_flags_aa",
      ":common_flags_config",
      ":common_flags_gpu",
      ":common_flags_images",
      ":experimental_svg_model",
      ":flags",
      ":gm",
      ":gpu_tool_utils",
      ":skia",
      ":tool_utils",
      ":trace",
      "modules/skparagraph",
      "modules/skshaper",
    ]
  }

  test_app("skpinfo") {
    sources = [ "tools/skpinfo.cpp" ]
    deps = [
      ":flags",
      ":skia",
    ]
  }

  if (skia_use_ffmpeg) {
    test_app("skottie2movie") {
      sources = [ "tools/skottie2movie.cpp" ]
      deps = [
        ":flags",
        ":gpu_tool_utils",
        ":skia",
        "experimental/ffmpeg:video_encoder",
        "modules/skottie",
        "modules/skottie:utils",
      ]
    }
  }

  test_app("skpbench") {
    sources = [ "tools/skpbench/skpbench.cpp" ]
    deps = [
      ":common_flags_config",
      ":common_flags_gpu",
      ":flags",
      ":gpu_tool_utils",
      ":skia",
      ":tool_utils",
    ]
  }

  test_app("sktexttopdf") {
    sources = [ "tools/using_skia_and_harfbuzz.cpp" ]
    deps = [
      ":skia",
      "modules/skshaper",
    ]
  }

  test_app("create_test_font") {
    sources = [ "tools/fonts/create_test_font.cpp" ]
    deps = [ ":skia" ]
    assert_no_deps = [
      # tool_utils requires the output of this app.
      ":tool_utils",
    ]
  }

  if (skia_use_expat) {
    test_app("create_test_font_color") {
      sources = [ "tools/fonts/create_test_font_color.cpp" ]
      deps = [
        ":flags",
        ":skia",
        ":tool_utils",
      ]
    }
  }

  test_app("get_images_from_skps") {
    sources = [ "tools/get_images_from_skps.cpp" ]
    deps = [
      ":flags",
      ":skia",
    ]
  }

  if (!is_ios && target_cpu != "wasm" && !(is_win && target_cpu == "arm64")) {
    test_app("skiaserve") {
      sources = [
        "tools/skiaserve/Request.cpp",
        "tools/skiaserve/Response.cpp",
        "tools/skiaserve/skiaserve.cpp",
        "tools/skiaserve/urlhandlers/BreakHandler.cpp",
        "tools/skiaserve/urlhandlers/ClipAlphaHandler.cpp",
        "tools/skiaserve/urlhandlers/CmdHandler.cpp",
        "tools/skiaserve/urlhandlers/ColorModeHandler.cpp",
        "tools/skiaserve/urlhandlers/DataHandler.cpp",
        "tools/skiaserve/urlhandlers/DownloadHandler.cpp",
        "tools/skiaserve/urlhandlers/EnableGPUHandler.cpp",
        "tools/skiaserve/urlhandlers/ImgHandler.cpp",
        "tools/skiaserve/urlhandlers/InfoHandler.cpp",
        "tools/skiaserve/urlhandlers/OpBoundsHandler.cpp",
        "tools/skiaserve/urlhandlers/OpsHandler.cpp",
        "tools/skiaserve/urlhandlers/OverdrawHandler.cpp",
        "tools/skiaserve/urlhandlers/PostHandler.cpp",
        "tools/skiaserve/urlhandlers/QuitHandler.cpp",
        "tools/skiaserve/urlhandlers/RootHandler.cpp",
      ]
      deps = [
        ":flags",
        ":gpu_tool_utils",
        ":skia",
        ":tool_utils",
        "//third_party/libmicrohttpd",
      ]
    }
  }

  test_app("fuzz") {
    sources = [
      "fuzz/Fuzz.cpp",
      "fuzz/Fuzz.h",
      "fuzz/FuzzCanvas.cpp",
      "fuzz/FuzzCommon.cpp",
      "fuzz/FuzzCommon.h",
      "fuzz/FuzzCreateDDL.cpp",
      "fuzz/FuzzDrawFunctions.cpp",
      "fuzz/FuzzEncoders.cpp",
      "fuzz/FuzzGradients.cpp",
      "fuzz/FuzzMain.cpp",
      "fuzz/FuzzParsePath.cpp",
      "fuzz/FuzzPathMeasure.cpp",
      "fuzz/FuzzPathop.cpp",
      "fuzz/FuzzPolyUtils.cpp",
      "fuzz/FuzzRegionOp.cpp",
      "fuzz/oss_fuzz/FuzzAndroidCodec.cpp",
      "fuzz/oss_fuzz/FuzzAnimatedImage.cpp",
      "fuzz/oss_fuzz/FuzzImage.cpp",
      "fuzz/oss_fuzz/FuzzImageFilterDeserialize.cpp",
      "fuzz/oss_fuzz/FuzzIncrementalImage.cpp",
      "fuzz/oss_fuzz/FuzzJSON.cpp",
      "fuzz/oss_fuzz/FuzzPathDeserialize.cpp",
      "fuzz/oss_fuzz/FuzzRegionDeserialize.cpp",
      "fuzz/oss_fuzz/FuzzRegionSetPath.cpp",
      "fuzz/oss_fuzz/FuzzSKP.cpp",
      "fuzz/oss_fuzz/FuzzSKSL2GLSL.cpp",
      "fuzz/oss_fuzz/FuzzSKSL2Metal.cpp",
      "fuzz/oss_fuzz/FuzzSKSL2Pipeline.cpp",
      "fuzz/oss_fuzz/FuzzSKSL2SPIRV.cpp",
      "fuzz/oss_fuzz/FuzzSVG.cpp",
      "fuzz/oss_fuzz/FuzzSkDescriptorDeserialize.cpp",
      "fuzz/oss_fuzz/FuzzSkRuntimeEffect.cpp",
      "fuzz/oss_fuzz/FuzzTextBlobDeserialize.cpp",
      "tools/UrlDataManager.cpp",
      "tools/debugger/DebugCanvas.cpp",
      "tools/debugger/DebugLayerManager.cpp",
      "tools/debugger/DrawCommand.cpp",
      "tools/debugger/JsonWriteBuffer.cpp",
    ]
    deps = [
      ":flags",
      ":gpu_tool_utils",
      ":skia",
      "modules/skottie:fuzz",
    ]
  }

  test_app("pathops_unittest") {
    sources = pathops_tests_sources + [
                rebase_path("tests/skia_test.cpp"),
                rebase_path("tests/Test.cpp"),
              ]
    deps = [
      ":flags",
      ":gpu_tool_utils",
      ":skia",
      ":tool_utils",
    ]
  }

  test_app("dump_record") {
    sources = [ "tools/dump_record.cpp" ]
    deps = [
      ":flags",
      ":skia",
    ]
  }

  test_app("skdiff") {
    sources = [
      "tools/skdiff/skdiff.cpp",
      "tools/skdiff/skdiff_html.cpp",
      "tools/skdiff/skdiff_main.cpp",
      "tools/skdiff/skdiff_utils.cpp",
    ]
    deps = [
      ":skia",
      ":tool_utils",
    ]
  }

  test_app("skp_parser") {
    sources = [ "tools/skp_parser.cpp" ]
    deps = [
      ":skia",
      ":tool_utils",
    ]
  }

  if (!is_win) {
    source_set("skqp_lib") {
      check_includes = false
      testonly = true
      if (!is_official_build) {
        configs -= [ "//gn:warnings" ]
      }
      public_configs = [ ":skia_private" ]
      defines =
          [ "SK_SKQP_GLOBAL_ERROR_TOLERANCE=$skia_skqp_global_error_tolerance" ]
      sources = [
        "dm/DMGpuTestProcs.cpp",
        "tools/skqp/src/skqp.cpp",
        "tools/skqp/src/skqp_model.cpp",
      ]
      deps = [
        ":gm",
        ":skia",
        ":tests",
        ":tool_utils",
      ]
    }
    test_app("skqp") {
      sources = [ "tools/skqp/src/skqp_main.cpp" ]
      include_dirs = [ "//" ]
      lib_dirs = []
      deps = [ ":skqp_lib" ]
    }
    test_app("jitter_gms") {
      sources = [ "tools/skqp/jitter_gms.cpp" ]
      deps = [
        ":gm",
        ":skia",
        ":skqp_lib",
      ]
    }
  }
  if (is_fuchsia) {
    # Build a package repository for skqp on Fuchsia.
    group("skqp_repo") {
      testonly = true
      deps = [ "//build/fuchsia/skqp:skqp_repo" ]
    }
  }
  if (is_android) {
    shared_library("libskqp_app") {
      configs += [ ":skia_private" ]
      if (!is_official_build) {
        configs -= [ "//gn:warnings" ]
      }
      testonly = true
      sources = [ "tools/skqp/src/jni_skqp.cpp" ]
      deps = [
        ":skia",
        ":skqp_lib",
        ":tool_utils",
      ]
      libs = [ "android" ]
    }
  }
  if (is_android && skia_use_gl) {
    test_app("skottie_android") {
      is_shared_library = true

      sources = [ "platform_tools/android/apps/skottie/skottielib/src/main/cpp/native-lib.cpp" ]
      libs = []

      deps = [
        ":skia",
        "modules/skottie",
        "modules/sksg:samples",
        "//third_party/oboe",
      ]
    }
  }

  test_app("list_gms") {
    sources = [ "tools/list_gms.cpp" ]
    deps = [
      ":gm",
      ":skia",
    ]
  }
  test_app("list_gpu_unit_tests") {
    sources = [
      "dm/DMGpuTestProcs.cpp",
      "tools/list_gpu_unit_tests.cpp",
    ]
    deps = [
      ":skia",
      ":tests",
    ]
  }

  test_lib("sk_app") {
    public_deps = [
      ":gpu_tool_utils",
      ":skia",
    ]
    sources = [
      "tools/sk_app/Application.h",
      "tools/sk_app/CommandSet.cpp",
      "tools/sk_app/CommandSet.h",
      "tools/sk_app/DisplayParams.h",
      "tools/sk_app/RasterWindowContext.h",
      "tools/sk_app/Window.cpp",
      "tools/sk_app/Window.h",
      "tools/sk_app/WindowContext.cpp",
      "tools/sk_app/WindowContext.h",
    ]
    libs = []
    frameworks = []

    if (is_android) {
      sources += [
        "tools/sk_app/android/RasterWindowContext_android.cpp",
        "tools/sk_app/android/WindowContextFactory_android.h",
        "tools/sk_app/android/Window_android.cpp",
        "tools/sk_app/android/Window_android.h",
        "tools/sk_app/android/main_android.cpp",
        "tools/sk_app/android/surface_glue_android.cpp",
        "tools/sk_app/android/surface_glue_android.h",
      ]
      libs += [ "android" ]
    } else if (is_linux) {
      sources += [
        "tools/sk_app/unix/RasterWindowContext_unix.cpp",
        "tools/sk_app/unix/WindowContextFactory_unix.h",
        "tools/sk_app/unix/Window_unix.cpp",
        "tools/sk_app/unix/Window_unix.h",
        "tools/sk_app/unix/keysym2ucs.c",
        "tools/sk_app/unix/keysym2ucs.h",
        "tools/sk_app/unix/main_unix.cpp",
      ]
      libs += [
        "GL",  # Used by raster window context, so cannot be behind skia_use_gl.
        "X11",
      ]
    } else if (is_win) {
      sources += [
        "tools/sk_app/win/RasterWindowContext_win.cpp",
        "tools/sk_app/win/WindowContextFactory_win.h",
        "tools/sk_app/win/Window_win.cpp",
        "tools/sk_app/win/Window_win.h",
        "tools/sk_app/win/main_win.cpp",
      ]
    } else if (is_mac) {
      sources += [
        "tools/sk_app/mac/RasterWindowContext_mac.mm",
        "tools/sk_app/mac/WindowContextFactory_mac.h",
        "tools/sk_app/mac/Window_mac.h",
        "tools/sk_app/mac/Window_mac.mm",
        "tools/sk_app/mac/main_mac.mm",
      ]
      frameworks += [
        "QuartzCore.framework",
        "Cocoa.framework",
        "Foundation.framework",
      ]
    } else if (is_ios) {
      sources += [
        "tools/sk_app/ios/RasterWindowContext_ios.mm",
        "tools/sk_app/ios/WindowContextFactory_ios.h",
        "tools/sk_app/ios/Window_ios.h",
        "tools/sk_app/ios/Window_ios.mm",
        "tools/sk_app/ios/main_ios.mm",
      ]
      frameworks += [ "QuartzCore.framework" ]
    }

    if (skia_use_gl) {
      sources += [ "tools/sk_app/GLWindowContext.cpp" ]
      sources += [ "tools/sk_app/GLWindowContext.h" ]
      if (is_android) {
        sources += [ "tools/sk_app/android/GLWindowContext_android.cpp" ]
      } else if (is_linux) {
        sources += [ "tools/sk_app/unix/GLWindowContext_unix.cpp" ]
      } else if (is_win) {
        sources += [ "tools/sk_app/win/GLWindowContext_win.cpp" ]
        if (skia_use_angle) {
          sources += [ "tools/sk_app/win/ANGLEWindowContext_win.cpp" ]
        }
      } else if (is_mac) {
        sources += [ "tools/sk_app/mac/GLWindowContext_mac.mm" ]
      } else if (is_ios) {
        sources += [ "tools/sk_app/ios/GLWindowContext_ios.mm" ]
      }
    }

    if (skia_use_vulkan) {
      sources += [ "tools/sk_app/VulkanWindowContext.cpp" ]
      sources += [ "tools/sk_app/VulkanWindowContext.h" ]
      if (is_android) {
        sources += [ "tools/sk_app/android/VulkanWindowContext_android.cpp" ]
      } else if (is_linux) {
        sources += [ "tools/sk_app/unix/VulkanWindowContext_unix.cpp" ]
        libs += [ "X11-xcb" ]
      } else if (is_win) {
        sources += [ "tools/sk_app/win/VulkanWindowContext_win.cpp" ]
      }
    }

    if (skia_use_metal) {
      sources += [ "tools/sk_app/MetalWindowContext.mm" ]
      sources += [ "tools/sk_app/MetalWindowContext.h" ]
      if (is_mac) {
        sources += [ "tools/sk_app/mac/MetalWindowContext_mac.mm" ]
      } else if (is_ios) {
        sources += [ "tools/sk_app/ios/MetalWindowContext_ios.mm" ]
      }
    }

    if (skia_use_direct3d) {
      sources += [ "tools/sk_app/win/D3D12WindowContext_win.cpp" ]
    }

    if (skia_use_dawn) {
      sources += [ "tools/sk_app/DawnWindowContext.cpp" ]
      sources += [ "tools/sk_app/DawnWindowContext.h" ]
      if (is_linux) {
        if (dawn_enable_vulkan) {
          sources += [ "tools/sk_app/unix/DawnVulkanWindowContext_unix.cpp" ]
          defines = [ "VK_USE_PLATFORM_XCB_KHR" ]
          libs += [ "X11-xcb" ]
        }
      } else if (is_win) {
        if (dawn_enable_d3d12) {
          sources += [ "tools/sk_app/win/DawnD3D12WindowContext_win.cpp" ]
        }
      } else if (is_mac) {
        if (dawn_enable_metal) {
          sources += [ "tools/sk_app/mac/DawnMTLWindowContext_mac.mm" ]
        }
      }
    }

    deps = [ ":tool_utils" ]
    if (is_android) {
      deps += [ "//third_party/native_app_glue" ]
    }
    if (skia_use_gl && skia_use_angle) {
      deps += [ "//third_party/angle2" ]
    }
  }

  if (!skia_use_vulkan && (is_mac || is_linux || is_win)) {
    test_app("fiddle_examples") {
      sources = [
        "tools/fiddle/all_examples.cpp",
        "tools/fiddle/examples.cpp",
        "tools/fiddle/examples.h",
      ]
      if (is_win) {
        cflags = [
          "/wd4756",  # Overflow in constant arithmetic
          "/wd4305",  # truncation from 'double' to 'float'
        ]
      }
      deps = [
        ":skia",
        ":skia.h",
        "modules/skottie",
        "modules/skshaper",
      ]
    }
  }

  # sk_app can work without GL but viewer always runs raster through a GL window context.
  if (skia_use_gl) {
    test_app("viewer") {
      is_shared_library = is_android
      sources = [
        "tools/viewer/AnimTimer.h",
        "tools/viewer/BisectSlide.cpp",
        "tools/viewer/GMSlide.cpp",
        "tools/viewer/ImGuiLayer.cpp",
        "tools/viewer/ImageSlide.cpp",
        "tools/viewer/ParticlesSlide.cpp",
        "tools/viewer/SKPSlide.cpp",
        "tools/viewer/SampleSlide.cpp",
        "tools/viewer/SkRiveSlide.cpp",
        "tools/viewer/SkSLSlide.cpp",
        "tools/viewer/SkottieSlide.cpp",
        "tools/viewer/SlideDir.cpp",
        "tools/viewer/StatsLayer.cpp",
        "tools/viewer/SvgSlide.cpp",
        "tools/viewer/TouchGesture.cpp",
        "tools/viewer/TouchGesture.h",
        "tools/viewer/Viewer.cpp",
        "tools/viewer/Viewer.h",
      ]
      libs = []

      deps = [
        ":common_flags_gpu",
        ":experimental_svg_model",
        ":flags",
        ":gm",
        ":gpu_tool_utils",
        ":samples",
        ":sk_app",
        ":skia",
        ":tool_utils",
        ":trace",
        "experimental/skrive",
        "modules/audioplayer",
        "modules/particles",
        "modules/skottie",
        "modules/skottie:utils",
        "modules/sksg:samples",
        "//third_party/imgui",
      ]
      if (skia_use_experimental_xform) {
        deps += [ ":experimental_xform" ]
        sources += [ "gm/xform.cpp" ]
      }
      if (skia_use_vulkan) {
        deps += [
          "//third_party/spirv-tools:spvtools",

          #spvtools depends on this but doesn't deps it in. Looks like upstream bug
          #that we replicated in our third_party/spirv-tools/BUILD.gn
          "//third_party/spirv-tools:spvtools_val",
        ]
      }
    }
  }

  if (skia_use_gl && !skia_use_angle && (is_linux || is_win || is_mac)) {
    test_app("HelloWorld") {
      sources = [ "example/HelloWorld.cpp" ]
      libs = []

      deps = [
        ":flags",
        ":gpu_tool_utils",
        ":sk_app",
        ":skia",
        ":tool_utils",
      ]
    }
  }

  if (skia_use_gl && (is_linux || is_mac || is_ios)) {
    test_app("SkiaSDLExample") {
      sources = [ "example/SkiaSDLExample.cpp" ]
      libs = []
      deps = [
        ":gpu_tool_utils",
        ":skia",
        "//third_party/libsdl",
      ]
    }
  }

  if (skia_qt_path != "" && (is_win || is_linux || is_mac)) {
    action_foreach("generate_mocs") {
      script = "gn/call.py"
      sources = [ "tools/mdbviz/MainWindow.h" ]
      outputs = [ "$target_gen_dir/mdbviz/{{source_name_part}}_moc.cpp" ]
      args = [
        "$skia_qt_path" + "/bin/moc",
        "{{source}}",
        "-o",
        "gen/mdbviz/{{source_name_part}}_moc.cpp",
      ]
    }
    action_foreach("generate_resources") {
      script = "gn/call.py"
      sources = [ "tools/mdbviz/resources.qrc" ]
      outputs = [ "$target_gen_dir/mdbviz/{{source_name_part}}_res.cpp" ]
      args = [
        "$skia_qt_path" + "/bin/rcc",
        "{{source}}",
        "-o",
        "gen/mdbviz/{{source_name_part}}_res.cpp",
      ]
    }
    test_app("mdbviz") {
      if (is_win) {
        # on Windows we need to disable some exception handling warnings due to the Qt headers
        cflags = [ "/Wv:18" ]  # 18 -> VS2013, 19 -> VS2015, 1910 -> VS2017
      }
      sources = [
        "tools/UrlDataManager.cpp",
        "tools/debugger/DebugCanvas.cpp",
        "tools/debugger/DebugLayerManager.cpp",
        "tools/debugger/DrawCommand.cpp",
        "tools/debugger/JsonWriteBuffer.cpp",
        "tools/mdbviz/MainWindow.cpp",
        "tools/mdbviz/Model.cpp",
        "tools/mdbviz/main.cpp",

        # generated files
        "$target_gen_dir/mdbviz/MainWindow_moc.cpp",
        "$target_gen_dir/mdbviz/resources_res.cpp",
      ]
      lib_dirs = [ "$skia_qt_path/lib" ]
      libs = [
        "Qt5Core.lib",
        "Qt5Gui.lib",
        "Qt5Widgets.lib",
      ]
      include_dirs = [
        "$skia_qt_path/include",
        "$skia_qt_path/include/QtCore",
        "$skia_qt_path/include/QtWidgets",
      ]
      deps = [
        ":generate_mocs",
        ":generate_resources",
        ":skia",
      ]
    }
  }

  if (is_android && defined(ndk) && ndk != "") {
    copy("gdbserver") {
      sources = [ "$ndk/$ndk_gdbserver" ]
      outputs = [ "$root_out_dir/gdbserver" ]
    }
  }

  if (skia_use_opencl) {
    test_app("hello-opencl") {
      sources = [ "tools/hello-opencl.cpp" ]
      deps = [ "//third_party/opencl" ]
    }
  }

  executable("cpu_modules") {
    sources = [ "tools/cpu_modules.cpp" ]
    deps = [
      ":skia",
      "modules/particles",
    ]
  }

  if (skia_use_gl && skia_use_icu && skia_use_harfbuzz) {
    test_app("editor") {
      is_shared_library = is_android
      deps = [ "modules/skplaintexteditor:editor_app" ]
    }
  }

  executable("image_diff_metric") {
    sources = [ "tools/image_diff_metric.cpp" ]
    deps = [ ":skia" ]
  }

  group("modules_testonly") {
    testonly = true
    deps = []
    if (target_cpu == "wasm") {
      deps += [ "modules/canvaskit:viewer_wasm" ]
    }
  }
}

if (is_ios && skia_use_metal && !skia_enable_flutter_defines) {
  group("minimal_ios_mtl_skia_app") {
    deps = [ "experimental/minimal_ios_mtl_skia_app" ]
  }
}

if (is_ios && skia_enable_skottie && !skia_enable_flutter_defines) {
  group("skottie_ios") {
    deps = [ "tools/skottie_ios_app" ]
  }
}
