# Copyright 2014 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("//build/config/ui.gni")

# This is the public target. It contains only the public headers. The
# implementation (and private headers) are in 'internal'.
source_set("cpp") {
  sources = [
    "property_type_converters.h",
    "raster_thread_helper.h",
  ]

  public_deps = [
    "//base",
    "//cc",
    "//components/viz/common",
    "//mojo/public/cpp/bindings",
    "//services/service_manager/public/mojom",
    "//services/ui/common:mus_common",
    "//services/ui/public/cpp/gpu",
    "//services/ui/public/interfaces",
  ]

  deps = [
    ":internal",
    "//gpu/command_buffer/client:gles2_cmd_helper",
    "//gpu/command_buffer/client:gles2_interface",
    "//services/service_manager/public/cpp",
    "//services/ui/public/interfaces",
    "//ui/display",
    "//ui/events",
    "//ui/gfx/geometry",
  ]

  defines = [ "GL_GLEXT_PROTOTYPES" ]

  allow_circular_includes_from = [ ":internal" ]
}

source_set("internal") {
  # This target is an implementation detail and is intended only to be used by
  # the 'cpp' target.
  visibility = [ ":cpp" ]

  sources = [
    "property_type_converters.cc",
    "raster_thread_helper.cc",
  ]

  deps = [
    "//base",
    "//cc",
    "//components/viz/common",
    "//mojo/public/cpp/bindings",
    "//services/service_manager/public/cpp",
    "//services/service_manager/public/mojom",
    "//services/ui/common:mus_common",
    "//services/ui/public/cpp/gpu",
    "//services/ui/public/interfaces",
    "//skia/public/interfaces",
    "//ui/display",
    "//ui/events",
    "//ui/gfx/geometry",
  ]

  defines = [ "GL_GLEXT_PROTOTYPES" ]

  if (use_ozone) {
    deps += [ "//ui/ozone" ]
  }
}
