summaryrefslogtreecommitdiffstats
path: root/mojo/gles2/BUILD.gn
blob: 705a8ebd274341c31279fceae532b5277b86402c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# 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.

config("mojo_use_gles2") {
  defines = [ "MOJO_USE_GLES2_IMPL" ]
}

config("gles2_use_mojo") {
  defines = [ "GLES2_USE_MOJO" ]
}

component("gles2") {
  output_name = "mojo_gles2_impl"
  sources = [
    "command_buffer_client_impl.cc",
    "command_buffer_client_impl.h",
    "gles2_context.cc",
    "gles2_context.h",
    "gles2_impl.cc",
  ]

  defines = [
    "GL_GLEXT_PROTOTYPES",
    "MOJO_GLES2_IMPLEMENTATION",
  ]

  configs += [
    ":gles2_use_mojo",
    ":mojo_use_gles2",
  ]
  public_configs = [
    ":gles2_use_mojo",
    "//third_party/khronos:khronos_headers",
  ]
  all_dependent_configs = [ ":mojo_use_gles2" ]

  public_deps = [
    "//mojo/public/c/gles2",
  ]

  deps = [
    "//base",
    "//base/third_party/dynamic_annotations",
    "//components/mus/gles2:lib",
    "//components/mus/public/interfaces",
    "//gpu/command_buffer/client",
    "//gpu/command_buffer/client:gles2_cmd_helper",
    "//gpu/command_buffer/client:gles2_implementation",
    "//gpu/command_buffer/client:gles2_interface",
    "//gpu/command_buffer/common",
    "//mojo/platform_handle:for_component",
    "//mojo/public/c/system:for_component",
    "//mojo/public/cpp/bindings",
    "//mojo/public/cpp/system",
  ]

  if (!is_component_build) {
    deps += [ "//gpu/command_buffer/service" ]
  }

  include_dirs = [ ".." ]
}