blob: 47088030448775117b346d8d899c97285702fa05 [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
Daniel Bratellb2123d42017-12-04 11:59:515import("//build/config/jumbo.gni")
[email protected]22fe91d2014-08-12 17:07:126import("//build/config/ui.gni")
qyearsleydb0a34872017-03-14 03:24:317import("//gpu/vulkan/features.gni")
xhwangfb22df12015-10-13 23:13:468import("//media/media_options.gni")
kylechar476993472016-09-14 16:03:489import("//ui/ozone/ozone.gni")
[email protected]dab154ee2014-06-13 23:48:5010
sammcd06e3fc2015-04-28 00:14:5411# See //content/BUILD.gn for how this works.
12group("gpu") {
brettwb78fc9e2016-03-25 21:02:5113 visibility = [ "//content/*" ] # This is an internal content API.
sammcd06e3fc2015-04-28 00:14:5414
15 if (is_component_build) {
16 public_deps = [
17 "//content",
18 ]
19 } else {
20 public_deps = [
21 ":gpu_sources",
22 ]
23 }
24}
25
brucedawson6e53a2e12016-07-23 19:35:4726if (is_component_build) {
Daniel Bratellb2123d42017-12-04 11:59:5127 link_target_type = "jumbo_source_set"
brucedawson6e53a2e12016-07-23 19:35:4728} else {
Daniel Bratellb2123d42017-12-04 11:59:5129 link_target_type = "jumbo_static_library"
brucedawson6e53a2e12016-07-23 19:35:4730}
Tom Sepez085507ab2017-10-18 22:36:0031
brucedawson6e53a2e12016-07-23 19:35:4732target(link_target_type, "gpu_sources") {
brettwb78fc9e2016-03-25 21:02:5133 # This is an internal content API. Code outside of the content "component"
34 # (like content/test and content/shell) should depend on ":gpu" above.
Brett Wilson8f1323042014-09-11 16:58:5635 visibility = [ "//content/*" ]
[email protected]6294f0d2014-08-20 17:43:0936
[email protected]dab154ee2014-06-13 23:48:5037 sources = [
Ken Rockot6d9ed95032019-11-13 17:20:4738 "browser_exposed_gpu_interfaces.cc",
39 "browser_exposed_gpu_interfaces.h",
satorux7fa9d302015-02-16 00:44:5240 "gpu_child_thread.cc",
41 "gpu_child_thread.h",
Robert Sesek4fed6f1e2019-10-15 23:31:0142 "gpu_child_thread_receiver_bindings.cc",
[email protected]dab154ee2014-06-13 23:48:5043 "gpu_main.cc",
44 "gpu_process.cc",
45 "gpu_process.h",
Tom Sepez085507ab2017-10-18 22:36:0046 "gpu_sandbox_hook_linux.cc",
47 "gpu_sandbox_hook_linux.h",
ben507aa812016-08-10 23:26:1948 "gpu_service_factory.cc",
49 "gpu_service_factory.h",
[email protected]dab154ee2014-06-13 23:48:5050 "in_process_gpu_thread.cc",
51 "in_process_gpu_thread.h",
52 ]
53
ben02a37772015-11-19 04:37:0554 configs += [ "//content:content_implementation" ]
[email protected]dab154ee2014-06-13 23:48:5055
56 deps = [
57 "//base",
brettwb78fc9e2016-03-25 21:02:5158 "//base/third_party/dynamic_annotations",
59 "//components/tracing",
Fady Samuel279f5f02017-06-14 23:23:0060 "//components/viz/service",
[email protected]dab154ee2014-06-13 23:48:5061 "//content:export",
brettwdb087102016-04-18 21:33:0862 "//content/child",
brettwb78fc9e2016-03-25 21:02:5163 "//content/common",
chiniforooshan701fa212017-04-06 22:22:4964 "//content/common:mojo_bindings",
blundell24ab5d362014-11-21 10:11:1965 "//content/public/child:child_sources",
fsamuel68efb482016-03-17 12:15:4366 "//content/public/common:common_sources",
markdittmercbf36ce2016-03-02 16:08:2967 "//gpu:gpu",
fsamuel19acfae2016-03-22 05:38:2468 "//gpu/ipc/common:command_buffer_traits",
markdittmerd88b8352016-04-08 15:28:4569 "//gpu/ipc/service",
fsamuel68efb482016-03-17 12:15:4370 "//ipc",
Scott Violeta35f9a42018-03-22 22:00:4471 "//media:media_buildflags",
markdittmer6e70beb82016-05-02 05:40:4772 "//media/gpu",
Scott Violeta35f9a42018-03-22 22:00:4473 "//media/mojo:buildflags",
jrummell397905b2017-03-20 22:36:2574
75 # TODO(jrummell): As //media/gpu/ipc/service is a source_set in a
76 # component build, determine if it should not be included here.
77 # http://crbug.com/702833.
Sadrul Habib Chowdhury55fc2f02017-10-27 02:40:0678 "//components/viz/service/main",
markdittmer6e70beb82016-05-02 05:40:4779 "//media/gpu/ipc/service",
liberato441ca702017-05-13 16:50:3880 "//media/mojo/clients:clients",
Miyoung Shin25bb8c092019-08-03 00:56:5781 "//media/mojo/mojom:constants",
Ken Rockot99973112018-10-16 00:42:3682 "//services/service_manager/embedder",
rockot734fb662016-10-15 16:41:3083 "//services/service_manager/public/cpp",
Ken Rockot543f5e32018-02-04 02:13:5084 "//services/service_manager/public/mojom",
Daniel Nicoarabd9422042018-08-30 14:35:2985 "//services/service_manager/sandbox:chromecast_sandbox_whitelist_buildflags",
mcasas73550c042017-03-17 02:03:3786 "//services/shape_detection:lib",
Ken Rockotd7e999b2018-02-11 15:48:2187 "//services/shape_detection/public/mojom",
Oystein Eftevaag424fd372019-06-07 17:51:0388 "//services/tracing/public/cpp",
Miyoung Shin2be27f52019-07-27 15:35:3989 "//services/viz/privileged/mojom",
[email protected]dab154ee2014-06-13 23:48:5090 "//skia",
Tom Sepeza0950c62017-10-18 20:39:1491 "//third_party/angle:angle_gpu_info_util",
brettwb78fc9e2016-03-25 21:02:5192 "//ui/gfx/ipc",
[email protected]dab154ee2014-06-13 23:48:5093 "//ui/gl",
kylechar5b9dec12016-05-16 15:40:5794 "//ui/gl/init",
mfomitchev3ba450ad2017-04-03 18:20:4095 "//ui/latency/ipc",
[email protected]dab154ee2014-06-13 23:48:5096 ]
97
xhwangded3b6e2016-05-25 05:24:5198 if (is_android) {
jrummell397905b2017-03-20 22:36:2599 deps += [ "//media" ]
xhwangded3b6e2016-05-25 05:24:51100 }
101
Jay Civelli668c097f2018-05-16 20:44:13102 if (is_linux) {
103 deps += [ "//services/service_manager/zygote" ]
104 }
105
xhwangbe720032016-02-19 18:45:31106 if (mojo_media_host == "gpu") {
xhwangd3b5d3f2016-05-18 03:37:59107 deps += [ "//media/mojo/services" ]
xhwangfb22df12015-10-13 23:13:46108 }
109
Sunny Sachanandani83b3e44d2019-03-12 23:58:23110 if (is_linux || is_mac || is_win) {
Bill Budge2ca35142018-02-21 23:22:22111 deps += [ "//sandbox" ]
112 }
113
Christopher Cameron21c4abc2019-11-15 04:06:15114 if (is_mac) {
115 deps += [ "//components/metal_util" ]
116 }
117
[email protected]22fe91d2014-08-12 17:07:12118 if (use_x11) {
kylecharb8d249c2017-12-15 00:04:18119 deps += [
120 "//ui/events/platform/x11",
121 "//ui/gfx/x",
122 ]
[email protected]22fe91d2014-08-12 17:07:12123 }
dyen2ce3e052016-03-09 21:03:49124
brettwb78fc9e2016-03-25 21:02:51125 if (use_ozone) {
126 deps += [ "//ui/ozone" ]
127 }
128
dyen2ce3e052016-03-09 21:03:49129 if (enable_vulkan) {
130 deps += [ "//gpu/vulkan" ]
131 }
Julien Isorceb6623502017-11-28 12:20:40132
Stephen Lanham28a49d52017-11-30 01:53:37133 # Use DRI on desktop Linux builds.
Junliang Yan94273ef2018-02-05 22:25:24134 if (current_cpu != "s390x" && current_cpu != "ppc64" && is_desktop_linux &&
Junliang Yan15ac1732018-02-02 02:25:44135 (!is_chromecast || is_cast_desktop_build)) {
Julien Isorceb6623502017-11-28 12:20:40136 configs += [ "//build/config/linux/dri" ]
137 }
[email protected]dab154ee2014-06-13 23:48:50138}