# Copyright 2018 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

import("//arkweb/build/features/features.gni")
import("//build/config/ui.gni")
import("//gpu/vulkan/features.gni")

assert(enable_vulkan)

component("init") {
  output_name = "vulkan_init"

  sources = [
    "vulkan_factory.cc",
    "vulkan_factory.h",
  ]

  defines = [ "IS_VULKAN_INIT_IMPL" ]

  configs += [ "//build/config/compiler:wexit_time_destructors" ]

  public_deps = [
    "//base",
    "//gpu/vulkan",
  ]

  deps = []
  if (is_android) {
    deps += [ "//gpu/vulkan/android" ]
  }
  if (use_ozone) {
    deps += [
      "//ui/base:features",
      "//ui/ozone",
    ]
  }
  if (is_win) {
    deps += [ "//gpu/vulkan/win32" ]
  }
  if (is_apple) {
    deps += [ "//gpu/vulkan/mac" ]
  }
  if (arkweb_vulkan) {
    deps += [ "//arkweb/chromium_ext/gpu/vulkan/ohos" ]
  }
}