# Copyright (c) 2022 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

import("../../modules/canvaskit/canvaskit.gni")

# Defines the configuration of emscripten for building WASM targets.
import("../skia.gni")
declare_args() {
  # The location of an activated emsdk. We default to the one brought in by
  # DEPS and bin/activate-emsdk.
  skia_emsdk_dir = rebase_path("../../third_party/externals/emsdk")
}

skia_wasm_toolchain = "//gn/toolchain:wasm"
is_wasm = target_os == "wasm"

# Defines a WASM library target.
template("skia_wasm_lib") {
  _vars_to_forward = [
    "cflags",
    "ldflags",
    "defines",
    "deps",
    "includes",
    "sources",
    "include_dirs",
    "public_configs",
    "testonly",
    "visibility",
  ]

  _lib_name = target_name

  executable("${_lib_name}.js") {
    forward_variables_from(invoker, _vars_to_forward)
    output_extension = ""
  }

  group("$_lib_name") {
    deps = [ ":${_lib_name}.js($skia_wasm_toolchain)" ]
  }
}

wasm_defines = [
  "SKNX_NO_SIMD",
  "SK_DISABLE_AAA",
  "SK_FORCE_8_BYTE_ALIGNMENT",
]

if (!is_debug && !skia_canvaskit_force_tracing) {
  wasm_defines += [ "SK_DISABLE_TRACING" ]
}

if (skia_enable_gpu) {
  wasm_defines += [ "SK_DISABLE_LEGACY_SHADERCONTEXT" ]
}

if (!skia_canvaskit_enable_effects_deserialization ||
    !skia_canvaskit_enable_skp_serialization) {
  wasm_defines += [ "SK_DISABLE_EFFECT_DESERIALIZATION" ]
}

if (!skia_canvaskit_enable_alias_font) {
  wasm_defines += [ "CANVASKIT_NO_ALIAS_FONT" ]
}
