blob: 50ebf1507ba16e7d14c51508812c335e9cdf3976 [file] [log] [blame]
[email protected]dab154ee2014-06-13 23:48:501# Copyright 2014 The Chromium Authors. All rights reserved.
2# Use of this source code is governed by a BSD-style license that can be
3# found in the LICENSE file.
4
[email protected]22fe91d2014-08-12 17:07:125import("//build/config/ui.gni")
xhwangfb22df12015-10-13 23:13:466import("//media/media_options.gni")
kylechar476993472016-09-14 16:03:487import("//ui/ozone/ozone.gni")
[email protected]dab154ee2014-06-13 23:48:508
sammcd06e3fc2015-04-28 00:14:549# See //content/BUILD.gn for how this works.
10group("gpu") {
brettwb78fc9e2016-03-25 21:02:5111 visibility = [ "//content/*" ] # This is an internal content API.
sammcd06e3fc2015-04-28 00:14:5412
13 if (is_component_build) {
14 public_deps = [
15 "//content",
16 ]
17 } else {
18 public_deps = [
19 ":gpu_sources",
20 ]
21 }
22}
23
brucedawson6e53a2e12016-07-23 19:35:4724if (is_component_build) {
25 link_target_type = "source_set"
26} else {
27 link_target_type = "static_library"
28}
29target(link_target_type, "gpu_sources") {
brettwb78fc9e2016-03-25 21:02:5130 # This is an internal content API. Code outside of the content "component"
31 # (like content/test and content/shell) should depend on ":gpu" above.
Brett Wilson8f1323042014-09-11 16:58:5632 visibility = [ "//content/*" ]
[email protected]6294f0d2014-08-20 17:43:0933
[email protected]dab154ee2014-06-13 23:48:5034 sources = [
satorux7fa9d302015-02-16 00:44:5235 "gpu_child_thread.cc",
36 "gpu_child_thread.h",
[email protected]dab154ee2014-06-13 23:48:5037 "gpu_main.cc",
38 "gpu_process.cc",
39 "gpu_process.h",
ben507aa812016-08-10 23:26:1940 "gpu_service_factory.cc",
41 "gpu_service_factory.h",
[email protected]dab154ee2014-06-13 23:48:5042 "in_process_gpu_thread.cc",
43 "in_process_gpu_thread.h",
44 ]
45
ben02a37772015-11-19 04:37:0546 configs += [ "//content:content_implementation" ]
[email protected]dab154ee2014-06-13 23:48:5047
48 deps = [
49 "//base",
brettwb78fc9e2016-03-25 21:02:5150 "//base/third_party/dynamic_annotations",
51 "//components/tracing",
[email protected]dab154ee2014-06-13 23:48:5052 "//content:export",
brettwdb087102016-04-18 21:33:0853 "//content/child",
brettwb78fc9e2016-03-25 21:02:5154 "//content/common",
blundell24ab5d362014-11-21 10:11:1955 "//content/public/child:child_sources",
fsamuel68efb482016-03-17 12:15:4356 "//content/public/common:common_sources",
markdittmercbf36ce2016-03-02 16:08:2957 "//gpu:gpu",
fsamuel19acfae2016-03-22 05:38:2458 "//gpu/ipc/common:command_buffer_traits",
markdittmerd88b8352016-04-08 15:28:4559 "//gpu/ipc/service",
fsamuel68efb482016-03-17 12:15:4360 "//ipc",
markdittmer6e70beb82016-05-02 05:40:4761 "//media/gpu",
62 "//media/gpu/ipc/service",
rockot734fb662016-10-15 16:41:3063 "//services/service_manager/public/cpp",
64 "//services/service_manager/public/interfaces",
sadrul72aae8a2017-01-24 04:52:3265 "//services/ui/gpu",
sadrul6c5aed8c2017-01-11 23:11:4466 "//services/ui/gpu/interfaces",
[email protected]dab154ee2014-06-13 23:48:5067 "//skia",
Nico Weber9d6e12942016-04-19 18:51:0968 "//ui/events/ipc",
brettwb78fc9e2016-03-25 21:02:5169 "//ui/gfx/ipc",
[email protected]dab154ee2014-06-13 23:48:5070 "//ui/gl",
kylechar5b9dec12016-05-16 15:40:5771 "//ui/gl/init",
[email protected]dab154ee2014-06-13 23:48:5072 ]
73
xhwangded3b6e2016-05-25 05:24:5174 if (is_android) {
75 deps += [ "//media/base/android" ]
76 }
77
xhwangbe720032016-02-19 18:45:3178 if (mojo_media_host == "gpu") {
xhwangd3b5d3f2016-05-18 03:37:5979 deps += [ "//media/mojo/services" ]
xhwangfb22df12015-10-13 23:13:4680 }
81
[email protected]dab154ee2014-06-13 23:48:5082 if (is_win) {
83 configs += [
84 "//third_party/khronos:khronos_headers",
85 "//third_party/wtl:wtl_includes",
86 ]
87 libs = [ "setupapi.lib" ]
88 deps += [
brettwb78fc9e2016-03-25 21:02:5189 "//sandbox",
[email protected]dab154ee2014-06-13 23:48:5090 "//third_party/angle:libEGL",
91 "//third_party/angle:libGLESv2",
92 ]
93 }
94
dpranke43276212015-02-20 02:55:1995 if (is_chromeos && current_cpu != "arm") {
cmasone418e04c2014-09-09 17:51:5296 configs += [ "//third_party/libva:libva_config" ]
[email protected]dab154ee2014-06-13 23:48:5097 }
[email protected]22fe91d2014-08-12 17:07:1298
99 if (use_x11) {
100 deps += [ "//ui/events/platform/x11" ]
101 }
dyen2ce3e052016-03-09 21:03:49102
brettwb78fc9e2016-03-25 21:02:51103 if (use_ozone) {
104 deps += [ "//ui/ozone" ]
105 }
106
dyen2ce3e052016-03-09 21:03:49107 if (enable_vulkan) {
108 deps += [ "//gpu/vulkan" ]
109 }
[email protected]dab154ee2014-06-13 23:48:50110}