# 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/shared_sources.gni")

if (is_fuchsia) {
  import("//build/vulkan/config.gni")
}

if (!defined(is_skia_standalone)) {
  is_skia_standalone = false
}
is_skia_dev_build = is_skia_standalone && !is_official_build

declare_args() {
  skia_use_angle = false
  skia_use_egl = false
  skia_use_expat = true
  skia_use_fontconfig = is_linux
  skia_use_freetype = is_android || is_fuchsia || is_linux
  skia_use_icu = !is_fuchsia && !is_ios && !is_win  # TODO: Windows
  skia_use_libjpeg_turbo = true
  skia_use_libpng = true
  skia_use_libwebp = !is_fuchsia
  skia_use_lua = is_skia_dev_build && !is_ios
  skia_use_piex = !is_win
  skia_use_zlib = true
  skia_use_metal = false
  skia_use_libheif = is_skia_dev_build
  skia_use_skcms = is_skia_dev_build

  skia_android_serial = ""
  skia_enable_discrete_gpu = true
  skia_enable_effects = true
  skia_enable_flutter_defines = false
  skia_enable_fontmgr_empty = false
  skia_enable_gpu = true
  skia_enable_pdf = true
  skia_enable_spirv_validation = is_skia_dev_build && is_debug
  skia_enable_tools = is_skia_dev_build
  skia_enable_vulkan_debug_layers = is_skia_dev_build && is_debug
  skia_vulkan_header = ""
  skia_vulkan_sdk = getenv("VULKAN_SDK")
  skia_qt_path = getenv("QT_PATH")
  skia_compile_processors = false
  skia_lex = false

  skia_jumper_clang = ""
  skia_jumper_objdump = ""
  skia_jumper_ccache = ""

  skia_skqp_enable_driver_correctness_workarounds = false
  skia_skqp_global_error_tolerance = 0
}
declare_args() {
  skia_use_dng_sdk = !is_fuchsia && skia_use_libjpeg_turbo && skia_use_zlib
  skia_use_sfntly = skia_use_icu
  skia_enable_atlas_text = is_skia_dev_build && skia_enable_gpu

  if (is_android) {
    skia_use_vulkan = defined(ndk_api) && ndk_api >= 24
  } else if (is_fuchsia) {
    skia_use_vulkan = fuchsia_use_vulkan
  } else {
    skia_use_vulkan = skia_vulkan_sdk != ""
  }

  if (is_ios) {
    skia_ios_identity = ".*Google.*"
    skia_ios_profile = "Google Development"
  }
}
declare_args() {
  skia_tools_vulkan_header_dir = ""
  if (skia_use_vulkan) {
    # When buliding on Android we get the header via the NDK so no need for any extra path.
    if (is_fuchsia) {
      skia_tools_vulkan_header_dir = "$fuchsia_vulkan_sdk/include"
    } else if (is_linux || is_win) {
      skia_tools_vulkan_header_dir = "$skia_vulkan_sdk/include"
    }
  }
}

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

# Our tools require static linking (they use non-exported symbols).
skia_enable_tools = skia_enable_tools && !is_component_build

fontmgr_android_enabled = skia_use_expat && skia_use_freetype

skia_public_includes = [
  "include/android",
  "include/c",
  "include/codec",
  "include/config",
  "include/core",
  "include/effects",
  "include/encode",
  "include/gpu",
  "include/gpu/gl",
  "include/atlastext",
  "include/pathops",
  "include/ports",
  "include/svg",
  "include/utils",
  "include/utils/mac",
]

if (skia_use_vulkan) {
  skia_public_includes += [ "include/gpu/vk" ]
}
if (skia_enable_atlas_text) {
  skia_public_includes += [ "include/atlastext" ]
}
if (skia_use_metal) {
  skia_public_includes += [ "include/gpu/mtl" ]
}

# Skia public API, generally provided by :skia.
config("skia_public") {
  include_dirs = skia_public_includes
  if (skia_tools_vulkan_header_dir != "") {
    include_dirs += [ skia_tools_vulkan_header_dir ]
  }
  defines = []
  if (is_component_build) {
    defines += [ "SKIA_DLL" ]
  }
  if (is_fuchsia || is_linux) {
    defines += [ "SK_SAMPLES_FOR_X" ]
  }
  if (skia_enable_flutter_defines) {
    defines += flutter_defines
  }
  if (!skia_enable_gpu) {
    defines += [ "SK_SUPPORT_GPU=0" ]
  }
  if (skia_enable_atlas_text) {
    defines += [ "SK_SUPPORT_ATLAS_TEXT=1" ]
  }
}

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

  include_dirs = [
    "include/private",
    "src/c",
    "src/codec",
    "src/core",
    "src/effects",
    "src/fonts",
    "src/image",
    "src/images",
    "src/lazy",
    "src/opts",
    "src/pathops",
    "src/pdf",
    "src/ports",
    "src/sfnt",
    "src/shaders",
    "src/shaders/gradients",
    "src/sksl",
    "src/utils",
    "src/utils/win",
    "src/xml",
    "third_party/gif",
  ]

  defines = [ "SK_GAMMA_APPLY_TO_A8" ]
  if (is_android) {
    defines += [
      "SK_GAMMA_EXPONENT=1.4",
      "SK_GAMMA_CONTRAST=0.0",
    ]
  }
  if (is_official_build || is_android) {
    # TODO(bsalomon): it'd be nice to make Android normal.
    defines += [ "SK_ALLOW_STATIC_GLOBAL_INITIALIZERS=0" ]
  }
  libs = []
  lib_dirs = []
  if (skia_enable_gpu) {
    include_dirs += [ "src/gpu" ]
    if (is_skia_dev_build && skia_use_vulkan) {
      include_dirs += [ "tools/gpu/vk" ]
    }
  }
  if (skia_use_angle) {
    defines += [ "SK_ANGLE" ]
  }
  if (skia_enable_discrete_gpu) {
    defines += [ "SK_ENABLE_DISCRETE_GPU" ]
  }
  if (!is_official_build) {
    defines += [ "GR_TEST_UTILS=1" ]
  }
}

# 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") {
  if (invoker.enabled) {
    source_set(target_name) {
      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) {
      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_clang && is_win) {
    cflags = [ "/arch:AVX" ]
  } else {
    cflags = [ "-mavx" ]
  }
}

# Any feature of Skia that requires third-party code should be optional and use this template.
template("optional") {
  if (invoker.enabled) {
    config(target_name + "_public") {
      if (defined(invoker.public_defines)) {
        defines = invoker.public_defines
      }
    }
    source_set(target_name) {
      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_defines",
                               "deps",
                               "libs",
                               "sources",
                               "sources_when_disabled",
                               "configs_to_remove",
                             ])
      if (defined(invoker.sources_when_disabled)) {
        sources = invoker.sources_when_disabled
      }
      configs += skia_library_configs
    }
  }
}

optional("effects") {
  enabled = skia_enable_effects
  deps = [
    ":compile_processors",
  ]
  sources =
      skia_effects_sources + [ "src/ports/SkGlobalInitialization_default.cpp" ]
  sources_when_disabled = [ "src/ports/SkGlobalInitialization_none.cpp" ]
}

optional("fontmgr_android") {
  enabled = fontmgr_android_enabled

  deps = [
    ":typeface_freetype",
    "//third_party/expat",
  ]
  sources = [
    "src/ports/SkFontMgr_android.cpp",
    "src/ports/SkFontMgr_android_factory.cpp",
    "src/ports/SkFontMgr_android_parser.cpp",
  ]
}

optional("fontmgr_custom") {
  enabled = is_linux && skia_use_freetype && !skia_use_fontconfig

  deps = [
    ":typeface_freetype",
  ]
  sources = [
    "src/ports/SkFontMgr_custom.cpp",
    "src/ports/SkFontMgr_custom.h",
    "src/ports/SkFontMgr_custom_directory.cpp",
    "src/ports/SkFontMgr_custom_directory_factory.cpp",
    "src/ports/SkFontMgr_custom_embedded.cpp",
    "src/ports/SkFontMgr_custom_empty.cpp",
  ]
}

optional("fontmgr_empty") {
  enabled = skia_enable_fontmgr_empty
  sources = [
    "src/ports/SkFontMgr_empty_factory.cpp",
  ]
}

optional("fontmgr_fontconfig") {
  enabled = skia_use_freetype && skia_use_fontconfig

  deps = [
    ":typeface_freetype",
    "//third_party:fontconfig",
  ]
  sources = [
    "src/ports/SkFontConfigInterface.cpp",
    "src/ports/SkFontConfigInterface_direct.cpp",
    "src/ports/SkFontConfigInterface_direct_factory.cpp",
    "src/ports/SkFontMgr_FontConfigInterface.cpp",
    "src/ports/SkFontMgr_fontconfig.cpp",
    "src/ports/SkFontMgr_fontconfig_factory.cpp",
  ]
}

optional("fontmgr_fuchsia") {
  enabled = is_fuchsia && skia_use_freetype

  deps = [
    ":typeface_freetype",
  ]
  sources = [
    "src/ports/SkFontMgr_custom.cpp",
    "src/ports/SkFontMgr_custom_empty.cpp",
    "src/ports/SkFontMgr_custom_empty_factory.cpp",
  ]
}

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 = [ "src/sksl/lex" ]
  }

  action("run_sksllex") {
    script = "gn/run_sksllex.py"
    deps = [
      ":sksllex(//gn/toolchain:$host_toolchain)",
    ]
    sources = [
      "src/sksl/lex/layout.lex",
      "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("src"),
    ]
  }
} else {
  group("run_sksllex") {
  }
}

if (skia_compile_processors) {
  executable("skslc") {
    defines = [ "SKSL_STANDALONE" ]
    sources = [
      "src/sksl/SkSLMain.cpp",
    ]
    sources += skia_sksl_sources
    include_dirs = [
      "src/gpu",
      "src/sksl",
    ]
    deps = [
      ":run_sksllex",
      "//third_party/spirv-tools",
    ]
  }

  skia_gpu_processor_outputs = []
  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/$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("create_sksl_enums") {
    script = "gn/create_sksl_enums.py"
    sources = [
      "include/private/GrSharedEnums.h",
    ]
    outputs = [
      "$target_out_dir/" +
          rebase_path("src/sksl/sksl_enums.inc", target_out_dir),
    ]
    args = [
      rebase_path(sources[0]),
      rebase_path(outputs[0]),
    ]
  }

  action("compile_processors") {
    script = "gn/compile_processors.py"
    deps = [
      ":create_sksl_enums",
      ":skslc(//gn/toolchain:$host_toolchain)",
    ]
    sources = skia_gpu_processor_sources
    outputs = skia_gpu_processor_outputs
    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"
    }
    args = [
      rebase_path(skslc_path),
      rebase_path("bin/clang-format"),
    ]
    args += rebase_path(skia_gpu_processor_sources)
  }
} else {
  skia_gpu_processor_outputs = []
  group("compile_processors") {
  }
}

optional("gpu") {
  enabled = skia_enable_gpu
  deps = [
    ":compile_processors",
    ":run_sksllex",
  ]
  public_defines = []

  sources = skia_gpu_sources + skia_sksl_sources + skia_gpu_processor_outputs

  # These paths need to be absolute to match the ones produced by shared_sources.gni.
  sources -= get_path_info([ "src/gpu/gl/GrGLMakeNativeInterface_none.cpp" ],
                           "abspath")
  libs = []
  if (is_android) {
    sources += [ "src/gpu/gl/android/GrGLMakeNativeInterface_android.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 (is_linux) {
    sources += [ "src/gpu/gl/glx/GrGLMakeNativeInterface_glx.cpp" ]
    libs += [
      "GL",
      "GLU",
    ]
  } 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" ]
    libs += [ "OpenGL32.lib" ]
  } else {
    sources += [ "src/gpu/gl/GrGLMakeNativeInterface_none.cpp" ]
  }

  if (skia_use_vulkan) {
    public_defines += [ "SK_VULKAN" ]
    sources += skia_vk_sources
    if (skia_enable_vulkan_debug_layers) {
      public_defines += [ "SK_ENABLE_VK_LAYERS" ]
    }
    if (skia_vulkan_header != "") {
      public_defines += [ "SK_VULKAN_HEADER=\"$skia_vulkan_header\"" ]
    } else {
      if (is_skia_dev_build) {
        public_defines += [ "SK_VULKAN_HEADER=\"GrVulkanDefines.h\"" ]
      }
    }
  }
  if (skia_enable_spirv_validation) {
    deps += [ "//third_party/spirv-tools" ]
    public_defines += [ "SK_ENABLE_SPIRV_VALIDATION" ]
  }

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

  if (skia_enable_atlas_text) {
    sources += skia_atlas_text_sources
  }
}

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

  deps = []

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

optional("jpeg") {
  enabled = skia_use_libjpeg_turbo
  public_defines = [ "SK_HAS_JPEG_LIBRARY" ]

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

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

  deps = [
    "//third_party/zlib",
  ]
  sources = skia_pdf_sources
  sources_when_disabled = [ "src/pdf/SkDocument_PDF_None.cpp" ]

  if (skia_use_sfntly) {
    deps += [ "//third_party/sfntly" ]
    public_defines += [ "SK_PDF_USE_SFNTLY" ]
  }
}

optional("png") {
  enabled = skia_use_libpng
  public_defines = [ "SK_HAS_PNG_LIBRARY" ]

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

optional("raw") {
  enabled = skia_use_dng_sdk && skia_use_libjpeg_turbo && 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/SkRawAdapterCodec.cpp",
    "src/codec/SkRawCodec.cpp",
  ]
}

optional("skcms") {
  enabled = skia_use_skcms

  deps = [
    "//third_party/skcms",
  ]
  sources = [
    # TODO
  ]
}

optional("typeface_freetype") {
  enabled = skia_use_freetype

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

optional("webp") {
  enabled = skia_use_libwebp
  public_defines = [ "SK_HAS_WEBP_LIBRARY" ]

  deps = [
    "//third_party/libwebp",
  ]
  sources = [
    "src/codec/SkWebpAdapterCodec.cpp",
    "src/codec/SkWebpCodec.cpp",
    "src/images/SkWebpEncoder.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",
  ]
}

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

  deps = [
    ":arm64",
    ":armv7",
    ":avx",
    ":crc32",
    ":effects",
    ":fontmgr_android",
    ":fontmgr_custom",
    ":fontmgr_empty",
    ":fontmgr_fontconfig",
    ":fontmgr_fuchsia",
    ":gpu",
    ":heif",
    ":jpeg",
    ":none",
    ":pdf",
    ":png",
    ":raw",
    ":skcms",
    ":sse2",
    ":sse41",
    ":sse42",
    ":ssse3",
    ":webp",
    ":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([])

  sources = []
  sources += skia_core_sources
  sources += skia_utils_sources
  sources += skia_xps_sources
  sources += [
    "src/android/SkAndroidFrameworkUtils.cpp",
    "src/android/SkAnimatedImage.cpp",
    "src/android/SkBitmapRegionCodec.cpp",
    "src/android/SkBitmapRegionDecoder.cpp",
    "src/codec/SkAndroidCodec.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/SkGifCodec.cpp",
    "src/codec/SkMaskSwizzler.cpp",
    "src/codec/SkMasks.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/SkImageGenerator_skia.cpp",
    "src/ports/SkMemory_malloc.cpp",
    "src/ports/SkOSFile_stdio.cpp",
    "src/sfnt/SkOTTable_name.cpp",
    "src/sfnt/SkOTUtils.cpp",
    "src/utils/mac/SkStream_mac.cpp",
    "third_party/gif/SkGifImageReader.cpp",
  ]

  libs = []

  if (is_win) {
    sources += [
      "src/fonts/SkFontMgr_indirect.cpp",
      "src/ports/SkDebug_win.cpp",
      "src/ports/SkFontHost_win.cpp",
      "src/ports/SkFontMgr_win_dw.cpp",
      "src/ports/SkFontMgr_win_dw_factory.cpp",
      "src/ports/SkImageEncoder_WIC.cpp",
      "src/ports/SkImageGeneratorWIC.cpp",
      "src/ports/SkOSFile_win.cpp",
      "src/ports/SkOSLibrary_win.cpp",
      "src/ports/SkScalerContext_win_dw.cpp",
      "src/ports/SkTLS_win.cpp",
      "src/ports/SkTypeface_win_dw.cpp",
    ]
    libs += [
      "FontSub.lib",
      "Gdi32.lib",
      "Ole32.lib",
      "OleAut32.lib",
      "User32.lib",
      "Usp10.lib",
    ]
  } else {
    sources += [
      "src/ports/SkOSFile_posix.cpp",
      "src/ports/SkOSLibrary_posix.cpp",
      "src/ports/SkTLS_pthread.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) {
    sources += [ "src/ports/SkDebug_stdio.cpp" ]
  }

  if (is_mac) {
    sources += [
      "src/ports/SkDebug_stdio.cpp",
      "src/ports/SkFontHost_mac.cpp",
      "src/ports/SkImageEncoder_CG.cpp",
      "src/ports/SkImageGeneratorCG.cpp",
    ]
    libs += [
      # AppKit symbols NSFontWeightXXX may be dlsym'ed.
      "AppKit.framework",
      "ApplicationServices.framework",
      "OpenGL.framework",
    ]
  }

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

      # UIKit symbols UIFontWeightXXX may be dlsym'ed.
      "UIKit.framework",
    ]
  }

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

# Targets guarded by skia_enable_tools may use //third_party freely.
if (skia_enable_tools) {
  # Used by gn_to_bp.py to list our public include dirs.
  source_set("public") {
    configs += [ ":skia_public" ]
  }

  config("skia.h_config") {
    include_dirs = [ "$target_gen_dir" ]
    if (skia_use_vulkan) {
      # So we can get the header which includes vulkan
      include_dirs += [ "tools/gpu/vk" ]
    }
  }
  action("skia.h") {
    public_configs = [ ":skia.h_config" ]
    skia_h = "$target_gen_dir/skia.h"
    script = "gn/find_headers.py"
    args = [ rebase_path(skia_h, root_build_dir) ] +
           rebase_path(skia_public_includes)
    depfile = "$skia_h.deps"
    outputs = [
      skia_h,
    ]
  }

  if (skia_enable_gpu && target_cpu == "x64") {
    executable("fiddle") {
      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",
      ]
    }
  }

  if (skia_enable_gpu) {
    source_set("public_headers_warnings_check") {
      sources = [
        "tools/public_headers_warnings_check.cpp",
      ]
      configs -= [ "//gn:warnings_except_public_headers" ]
      deps = [
        ":skia",
        ":skia.h",
      ]
    }
  }

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

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

  template("test_app") {
    if (is_ios) {
      app_name = target_name
      gen_path = target_gen_dir

      action("${app_name}_generate_info_plist") {
        script = "//gn/gen_plist_ios.py"
        outputs = [
          "$gen_path/${app_name}_Info.plist",
        ]
        args = [ rebase_path("$gen_path/$app_name", root_build_dir) ]
      }

      bundle_data("${app_name}_bundle_info_plist") {
        public_deps = [
          ":${app_name}_generate_info_plist",
        ]
        sources = [
          "$gen_path/${app_name}_Info.plist",
        ]
        outputs = [
          "{{bundle_root_dir}}/Info.plist",
        ]
      }

      bundle_ios_data =
          defined(invoker.bundle_ios_data) && invoker.bundle_ios_data

      if (bundle_ios_data) {
        has_skps =
            "True" == exec_script("//gn/checkdir.py",
                                  [ rebase_path("skps", root_build_dir) ],
                                  "trim string")
        bundle_data("${app_name}_bundle_resources") {
          sources = [
            "resources",
          ]
          outputs = [
            # iOS reserves the folders 'Resources' and 'resources' so store one level deeper
            "{{bundle_resources_dir}}/data/resources",
          ]
        }

        if (has_skps) {
          bundle_data("${app_name}_bundle_skps") {
            sources = [
              "skps",
            ]
            outputs = [
              # Store in same folder as resources
              "{{bundle_resources_dir}}/data/skps",
            ]
          }
        }
      }

      executable("${app_name}_generate_executable") {
        forward_variables_from(invoker,
                               "*",
                               [
                                 "output_name",
                                 "visibility",
                                 "is_shared_library",
                               ])
        configs += [ ":skia_private" ]
        testonly = true
        output_name = rebase_path("$gen_path/$app_name", root_build_dir)
      }

      bundle_data("${app_name}_bundle_executable") {
        public_deps = [
          ":${app_name}_generate_executable",
        ]
        sources = [
          "$gen_path/$app_name",
        ]
        outputs = [
          "{{bundle_executable_dir}}/$app_name",
        ]
        testonly = true
      }

      create_bundle("$app_name") {
        product_type = "com.apple.product-type.application"
        testonly = true

        bundle_root_dir = "${root_build_dir}/${target_name}.app"
        bundle_resources_dir = bundle_root_dir
        bundle_executable_dir = bundle_root_dir
        bundle_plugins_dir = bundle_root_dir + "/Plugins"

        deps = [
          ":${app_name}_bundle_executable",
          ":${app_name}_bundle_info_plist",
        ]
        if (bundle_ios_data) {
          deps += [ ":${app_name}_bundle_resources" ]
          if (has_skps) {
            deps += [ ":${app_name}_bundle_skps" ]
          }
        }

        # should only code sign when running on a device, not the simulator
        if (target_cpu != "x64") {
          code_signing_script = "//gn/codesign_ios.py"
          code_signing_sources = [ "$target_gen_dir/$app_name" ]
          code_signing_outputs = [
            "$bundle_root_dir/_CodeSignature/CodeResources",
            "$bundle_root_dir/embedded.mobileprovision",
          ]
          code_signing_args = [
            rebase_path("$bundle_root_dir", root_build_dir),
            skia_ios_identity,
            skia_ios_profile,
          ]
        }
      }
    } else {
      # !is_ios

      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) {
          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_include_dirs = []
    if (skia_enable_gpu) {
      public_defines = []
      public_include_dirs += [ "tools/gpu" ]

      deps = []
      sources = [
        "tools/gpu/GrContextFactory.cpp",
        "tools/gpu/GrTest.cpp",
        "tools/gpu/TestContext.cpp",
        "tools/gpu/atlastext/GLTestAtlasTextRenderer.cpp",
        "tools/gpu/gl/GLTestContext.cpp",
        "tools/gpu/gl/command_buffer/GLTestContext_command_buffer.cpp",
        "tools/gpu/gl/debug/DebugGLTestContext.cpp",
        "tools/gpu/gl/debug/GrBufferObj.cpp",
        "tools/gpu/gl/debug/GrFrameBufferObj.cpp",
        "tools/gpu/gl/debug/GrProgramObj.cpp",
        "tools/gpu/gl/debug/GrShaderObj.cpp",
        "tools/gpu/gl/debug/GrTextureObj.cpp",
        "tools/gpu/gl/debug/GrTextureUnitObj.cpp",
        "tools/gpu/gl/null/NullGLTestContext.cpp",
        "tools/gpu/mock/MockTestContext.cpp",
      ]
      libs = []

      if (is_android || skia_use_egl) {
        sources += [ "tools/gpu/gl/egl/CreatePlatformGLTestContext_egl.cpp" ]
      } else if (is_ios) {
        sources += [ "tools/gpu/gl/iOS/CreatePlatformGLTestContext_iOS.mm" ]
        libs += [ "OpenGLES.framework" ]
      } else if (is_linux) {
        sources += [ "tools/gpu/gl/glx/CreatePlatformGLTestContext_glx.cpp" ]
        libs += [ "X11" ]
      } else if (is_mac) {
        sources += [ "tools/gpu/gl/mac/CreatePlatformGLTestContext_mac.cpp" ]
      } else if (is_win) {
        sources += [ "tools/gpu/gl/win/CreatePlatformGLTestContext_win.cpp" ]
        libs += [
          "Gdi32.lib",
          "OpenGL32.lib",
        ]
      }

      cflags_objcc = [ "-fobjc-arc" ]

      if (skia_use_angle) {
        deps += [ "//third_party/angle2" ]
        sources += [ "tools/gpu/gl/angle/GLTestContext_angle.cpp" ]
      }
      if (skia_use_vulkan) {
        sources += [ "tools/gpu/vk/VkTestContext.cpp" ]
        sources += [ "tools/gpu/vk/VkTestUtils.cpp" ]
      }
      if (skia_use_metal) {
        sources += [ "tools/gpu/mtl/MtlTestContext.mm" ]
      }
    }
  }

  test_lib("flags") {
    public_include_dirs = [ "tools/flags" ]
    sources = [
      "tools/flags/SkCommandLineFlags.cpp",
    ]
  }
  test_lib("common_flags") {
    public_include_dirs = [ "tools/flags" ]
    sources = [
      "tools/flags/SkCommonFlags.cpp",
      "tools/flags/SkCommonFlagsConfig.cpp",
    ]
    deps = [
      ":flags",
      ":gpu_tool_utils",
    ]
  }

  test_lib("tool_utils") {
    public_include_dirs = [
      "tools",
      "tools/debugger",
      "tools/fonts",
      "tools/timer",
      "tools/trace",
    ]
    sources = [
      "tools/AndroidSkDebugToStdOut.cpp",
      "tools/CrashHandler.cpp",
      "tools/LsanSuppressions.cpp",
      "tools/ProcStats.cpp",
      "tools/Resources.cpp",
      "tools/UrlDataManager.cpp",
      "tools/debugger/SkDebugCanvas.cpp",
      "tools/debugger/SkDrawCommand.cpp",
      "tools/debugger/SkJsonWriteBuffer.cpp",
      "tools/debugger/SkObjectParser.cpp",
      "tools/picture_utils.cpp",
      "tools/random_parse_path.cpp",
      "tools/sk_tool_utils.cpp",
      "tools/fonts/sk_tool_utils_font.cpp",
      "tools/fonts/SkRandomScalerContext.cpp",
      "tools/fonts/SkTestScalerContext.cpp",
      "tools/fonts/SkTestFontMgr.cpp",
      "tools/timer/Timer.cpp",
      "tools/trace/SkChromeTracingTracer.cpp",
      "tools/trace/SkChromeTracingTracer.h",
      "tools/trace/SkDebugfTracer.cpp",
      "tools/trace/SkDebugfTracer.h",
      "tools/trace/SkEventTracingPriv.cpp",
      "tools/trace/SkEventTracingPriv.h",
    ]
    libs = []
    if (is_ios) {
      sources += [ "tools/ios_utils.m" ]
      libs += [ "Foundation.framework" ]
    }
    deps = [
      ":common_flags",
      ":flags",
      "//third_party/libpng",
    ]
    public_deps = [
      "//third_party/jsoncpp",
    ]
  }

  import("gn/gm.gni")
  test_lib("gm") {
    public_include_dirs = [ "gm" ]
    sources = gm_sources
    deps = [
      ":experimental_sksg",
      ":flags",
      ":gpu_tool_utils",
      ":skia",
      ":tool_utils",
    ]
  }

  import("gn/tests.gni")
  test_lib("tests") {
    public_include_dirs = [ "tests" ]
    sources = tests_sources + pathops_tests_sources
    if (!fontmgr_android_enabled) {
      sources -= [ "//tests/FontMgrAndroidParserTest.cpp" ]
    }
    deps = [
      ":experimental_sksg",
      ":flags",
      ":skia",
      ":tool_utils",
      "//third_party/libpng",
      "//third_party/zlib",
    ]
    if (skia_use_expat) {
      deps += [ ":experimental_svg_model" ]
    }
    public_deps = [
      ":gpu_tool_utils",  # Test.h #includes headers from this target.
    ]
  }

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

  test_lib("experimental_skottie") {
    public_include_dirs = [ "experimental/skottie" ]
    include_dirs = [ "tools" ]
    sources = [
      "experimental/skottie/Skottie.cpp",
      "experimental/skottie/SkottieAnimator.cpp",
      "experimental/skottie/SkottieParser.cpp",
      "experimental/skottie/SkottieProperties.cpp",
    ]
    deps = [
      ":experimental_sksg",
      ":skia",
      "//third_party/jsoncpp",
    ]
  }

  test_lib("experimental_svg_model") {
    public_include_dirs = [ "experimental/svg/model" ]
    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/SkSVGTransformableNode.cpp",
      "experimental/svg/model/SkSVGUse.cpp",
      "experimental/svg/model/SkSVGValue.cpp",
    ]
    deps = [
      ":skia",
    ]
  }

  test_lib("experimental_sksg") {
    public_include_dirs = [
      "experimental/sksg",
      "experimental/sksg/effects",
      "experimental/sksg/geometry",
      "experimental/sksg/paint",
    ]
    sources = [
      "experimental/sksg/SkSGDraw.cpp",
      "experimental/sksg/SkSGEffectNode.cpp",
      "experimental/sksg/SkSGGeometryNode.cpp",
      "experimental/sksg/SkSGGroup.cpp",
      "experimental/sksg/SkSGImage.cpp",
      "experimental/sksg/SkSGInvalidationController.cpp",
      "experimental/sksg/SkSGNode.cpp",
      "experimental/sksg/SkSGPaintNode.cpp",
      "experimental/sksg/SkSGRenderNode.cpp",
      "experimental/sksg/SkSGScene.cpp",
      "experimental/sksg/effects/SkSGClipEffect.cpp",
      "experimental/sksg/effects/SkSGMaskEffect.cpp",
      "experimental/sksg/effects/SkSGOpacityEffect.cpp",
      "experimental/sksg/effects/SkSGTransform.cpp",
      "experimental/sksg/geometry/SkSGGeometryTransform.cpp",
      "experimental/sksg/geometry/SkSGMerge.cpp",
      "experimental/sksg/geometry/SkSGPath.cpp",
      "experimental/sksg/geometry/SkSGPlane.cpp",
      "experimental/sksg/geometry/SkSGRect.cpp",
      "experimental/sksg/geometry/SkSGText.cpp",
      "experimental/sksg/geometry/SkSGTrimEffect.cpp",
      "experimental/sksg/paint/SkSGColor.cpp",
      "experimental/sksg/paint/SkSGGradient.cpp",
    ]
    deps = [
      ":skia",
    ]
  }

  if (target_cpu != "wasm") {
    test_lib("views") {
      public_include_dirs = [ "include/views" ]
      sources = [
        "src/views/SkEvent.cpp",
        "src/views/SkEventSink.cpp",
        "src/views/SkTouchGesture.cpp",
        "src/views/SkView.cpp",
      ]
    }
  }

  if (skia_use_lua) {
    test_lib("lua") {
      public_include_dirs = []
      sources = [
        "src/utils/SkLua.cpp",
        "src/utils/SkLuaCanvas.cpp",
      ]
      deps = [
        "//third_party/lua",
      ]
    }

    test_app("lua_app") {
      sources = [
        "tools/lua/lua_app.cpp",
      ]
      deps = [
        ":lua",
        ":skia",
        "//third_party/lua",
      ]
    }

    test_app("lua_pictures") {
      sources = [
        "tools/lua/lua_pictures.cpp",
      ]
      deps = [
        ":flags",
        ":lua",
        ":skia",
        ":tool_utils",
        "//third_party/lua",
      ]
    }
  }

  test_app("bookmaker") {
    sources = [
      "tools/bookmaker/bookmaker.cpp",
      "tools/bookmaker/cataloger.cpp",
      "tools/bookmaker/definition.cpp",
      "tools/bookmaker/fiddleParser.cpp",
      "tools/bookmaker/includeParser.cpp",
      "tools/bookmaker/includeWriter.cpp",
      "tools/bookmaker/mdOut.cpp",
      "tools/bookmaker/parserCommon.cpp",
      "tools/bookmaker/selfCheck.cpp",
      "tools/bookmaker/spellCheck.cpp",
    ]
    deps = [
      ":flags",
      ":skia",
      ":tool_utils",
      "//third_party/jsoncpp",
    ]
  }

  if (target_cpu != "wasm") {
    import("gn/samples.gni")
    test_lib("samples") {
      public_include_dirs = [ "samplecode" ]
      include_dirs = [ "experimental" ]
      sources = samples_sources
      deps = [
        ":experimental_sksg",
        ":experimental_svg_model",
        ":flags",
        ":gm",
        ":skshaper",
        ":tool_utils",
        ":views",
        ":xml",
      ]

      if (skia_use_lua) {
        sources += [ "samplecode/SampleLua.cpp" ]
        deps += [
          ":lua",
          "//third_party/lua",
        ]
      }
    }
    test_app("dm") {
      sources = [
        "dm/DM.cpp",
        "dm/DMGpuTestProcs.cpp",
        "dm/DMJsonWriter.cpp",
        "dm/DMSrcSink.cpp",
      ]
      include_dirs = [ "tests" ]
      deps = [
        ":common_flags",
        ":experimental_skottie",
        ":experimental_sksg",
        ":experimental_svg_model",
        ":flags",
        ":gm",
        ":gpu_tool_utils",
        ":skia",
        ":tests",
        ":tool_utils",
        "//third_party/jsoncpp",
        "//third_party/libpng",
      ]
    }
  }

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

  test_app("nanobench") {
    sources = [
      "bench/nanobench.cpp",
    ]
    deps = [
      ":bench",
      ":common_flags",
      ":experimental_sksg",
      ":experimental_svg_model",
      ":flags",
      ":gm",
      ":gpu_tool_utils",
      ":skia",
      ":tool_utils",
      "//third_party/jsoncpp",
    ]
  }

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

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

  test_lib("skshaper") {
    public_include_dirs = [ "tools/shape" ]
    deps = [
      ":skia",
    ]

    if (target_cpu == "wasm") {
      sources = [
        "tools/shape/SkShaper_primitive.cpp",
      ]
    } else {
      sources = [
        "tools/shape/SkShaper_harfbuzz.cpp",
      ]
      deps += [
        "//third_party/harfbuzz",
        "//third_party/icu",
      ]
    }
  }
  test_app("sktexttopdf") {
    sources = [
      "tools/shape/using_skia_and_harfbuzz.cpp",
    ]
    deps = [
      ":skia",
      ":skshaper",
    ]
  }

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

  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",
    ]
  }

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

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

  if (!is_ios && target_cpu != "wasm") {
    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/jsoncpp",
        "//third_party/libmicrohttpd",
        "//third_party/libpng",
      ]
    }
  }

  test_app("fuzz") {
    include_dirs = [
      "tools",
      "tools/debugger",
    ]
    sources = [
      "fuzz/FuzzCanvas.cpp",
      "fuzz/FuzzDrawFunctions.cpp",
      "fuzz/FuzzGradients.cpp",
      "fuzz/FuzzParsePath.cpp",
      "fuzz/FuzzPathop.cpp",
      "fuzz/FuzzScaleToSides.cpp",
      "fuzz/fuzz.cpp",
      "fuzz/oss_fuzz/FuzzAnimatedImage.cpp",
      "fuzz/oss_fuzz/FuzzImage.cpp",
      "fuzz/oss_fuzz/FuzzImageFilterDeserialize.cpp",
      "fuzz/oss_fuzz/FuzzPathDeserialize.cpp",
      "fuzz/oss_fuzz/FuzzRegionDeserialize.cpp",
      "fuzz/oss_fuzz/FuzzRegionSetPath.cpp",
      "fuzz/oss_fuzz/FuzzTextBlobDeserialize.cpp",
      "tools/UrlDataManager.cpp",
      "tools/debugger/SkDebugCanvas.cpp",
      "tools/debugger/SkDrawCommand.cpp",
      "tools/debugger/SkJsonWriteBuffer.cpp",
      "tools/debugger/SkObjectParser.cpp",
      "tools/picture_utils.cpp",
    ]
    deps = [
      ":flags",
      ":gpu_tool_utils",
      ":skia",
      "//third_party/jsoncpp",
      "//third_party/libpng",
    ]
  }

  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/DumpRecord.cpp",
      "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",
      "//third_party/jsoncpp",
    ]
  }

  if (!is_win && skia_enable_gpu) {
    test_lib("skqp_lib") {
      public_include_dirs = [ "tools/skqp" ]
      defines =
          [ "SK_SKQP_GLOBAL_ERROR_TOLERANCE=$skia_skqp_global_error_tolerance" ]
      if (skia_skqp_enable_driver_correctness_workarounds) {
        defines += [ "SK_SKQP_ENABLE_DRIVER_CORRECTNESS_WORKAROUNDS" ]
      }
      sources = [
        "dm/DMGpuTestProcs.cpp",
        "tools/skqp/gm_knowledge.cpp",
        "tools/skqp/gm_runner.cpp",
      ]
      deps = [
        ":gm",
        ":gpu_tool_utils",
        ":skia",
        ":tests",
        ":tool_utils",
      ]
    }
    test_app("skqp") {
      sources = [
        "tools/skqp/skqp.cpp",
      ]
      deps = [
        ":skia",
        ":skqp_lib",
        ":tool_utils",
        "//third_party/googletest",
      ]
    }
  }
  if (is_android && skia_enable_gpu) {
    test_app("skqp_app") {
      is_shared_library = true
      sources = [
        "tools/skqp/jni/org_skia_skqp_SkQPRunner.cpp",
      ]
      deps = [
        ":skia",
        ":skqp_lib",
        ":tool_utils",
      ]
      libs = [ "android" ]
    }
  }

  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",
    ]
  }

  if (skia_enable_gpu) {
    test_lib("sk_app") {
      public_include_dirs = [ "tools/sk_app" ]
      sources = [
        "tools/sk_app/CommandSet.cpp",
        "tools/sk_app/GLWindowContext.cpp",
        "tools/sk_app/Window.cpp",
      ]
      libs = []

      if (is_android) {
        sources += [
          "tools/sk_app/android/GLWindowContext_android.cpp",
          "tools/sk_app/android/RasterWindowContext_android.cpp",
          "tools/sk_app/android/Window_android.cpp",
          "tools/sk_app/android/main_android.cpp",
          "tools/sk_app/android/surface_glue_android.cpp",
        ]
        libs += [ "android" ]
      } else if (is_linux) {
        sources += [
          "tools/sk_app/unix/GLWindowContext_unix.cpp",
          "tools/sk_app/unix/RasterWindowContext_unix.cpp",
          "tools/sk_app/unix/Window_unix.cpp",
          "tools/sk_app/unix/keysym2ucs.c",
          "tools/sk_app/unix/main_unix.cpp",
        ]
        libs += [
          "GL",
          "X11",
        ]
      } else if (is_win) {
        sources += [
          "tools/sk_app/win/GLWindowContext_win.cpp",
          "tools/sk_app/win/RasterWindowContext_win.cpp",
          "tools/sk_app/win/Window_win.cpp",
          "tools/sk_app/win/main_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.cpp",
          "tools/sk_app/mac/RasterWindowContext_mac.cpp",
          "tools/sk_app/mac/Window_mac.cpp",
          "tools/sk_app/mac/main_mac.cpp",
        ]
        libs += [
          "QuartzCore.framework",
          "Cocoa.framework",
          "Foundation.framework",
        ]
      } else if (is_ios) {
        sources += [
          "tools/sk_app/ios/GLWindowContext_ios.cpp",
          "tools/sk_app/ios/RasterWindowContext_ios.cpp",
          "tools/sk_app/ios/Window_ios.cpp",
          "tools/sk_app/ios/main_ios.cpp",
        ]
      }

      if (skia_use_vulkan) {
        sources += [ "tools/sk_app/VulkanWindowContext.cpp" ]
        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" ]
        }
      }

      deps = [
        ":gpu_tool_utils",
        ":skia",
        ":tool_utils",
        ":views",
      ]
      if (is_android) {
        deps += [ "//third_party/native_app_glue" ]
      } else if (is_mac || is_ios) {
        deps += [ "//third_party/libsdl" ]
      }
      if (skia_use_angle) {
        deps += [ "//third_party/angle2" ]
      }
    }
  }

  if (skia_enable_gpu) {
    test_app("viewer") {
      is_shared_library = is_android
      if (is_ios) {
        bundle_ios_data = true
      }
      sources = [
        "tools/viewer/BisectSlide.cpp",
        "tools/viewer/GMSlide.cpp",
        "tools/viewer/ImGuiLayer.cpp",
        "tools/viewer/ImageSlide.cpp",
        "tools/viewer/SKPSlide.cpp",
        "tools/viewer/SampleSlide.cpp",
        "tools/viewer/SkottieSlide.cpp",
        "tools/viewer/SlideDir.cpp",
        "tools/viewer/StatsLayer.cpp",
        "tools/viewer/Viewer.cpp",
      ]
      libs = []

      include_dirs = []
      deps = [
        ":experimental_skottie",
        ":experimental_sksg",
        ":flags",
        ":gm",
        ":gpu_tool_utils",
        ":samples",
        ":sk_app",
        ":skia",
        ":tool_utils",
        ":views",
        "//third_party/imgui",
        "//third_party/jsoncpp",
      ]
    }
  }

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

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

  if (skia_enable_gpu && (is_linux || is_mac || is_ios)) {
    test_app("SkiaSDLExample") {
      sources = [
        "example/SkiaSDLExample.cpp",
      ]
      libs = []
      include_dirs = []
      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/SkDebugCanvas.cpp",
        "tools/debugger/SkDrawCommand.cpp",
        "tools/debugger/SkJsonWriteBuffer.cpp",
        "tools/debugger/SkObjectParser.cpp",
        "tools/mdbviz/MainWindow.cpp",
        "tools/mdbviz/Model.cpp",
        "tools/mdbviz/main.cpp",
        "tools/picture_utils.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",
        "tools",
        "tools/debugger",
      ]
      deps = [
        ":generate_mocs",
        ":generate_resources",
        ":skia",
        "//third_party/jsoncpp",
        "//third_party/libpng",
      ]
    }
  }

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

if (skia_jumper_clang != "") {
  action("regen_jumper") {
    script = "src/jumper/build_stages.py"

    inputs = [
      "src/jumper/SkJumper_stages.cpp",
      "src/jumper/SkJumper_stages_lowp.cpp",
    ]

    # GN insists its outputs should go somewhere underneath target_out_dir, so we trick it.
    outputs = [
      "$target_out_dir/" +
          rebase_path("src/jumper/SkJumper_generated.S", target_out_dir),
      "$target_out_dir/" +
          rebase_path("src/jumper/SkJumper_generated_win.S", target_out_dir),
    ]

    args = [
             skia_jumper_clang,
             skia_jumper_objdump,
             skia_jumper_ccache,
           ] + rebase_path(inputs) + rebase_path(outputs)
  }
}
