blob: 8271eaef4d047e37cb8c8847d4abea9453f69872 [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")
qyearsleydb0a34872017-03-14 03:24:316import("//gpu/vulkan/features.gni")
xhwangfb22df12015-10-13 23:13:467import("//media/media_options.gni")
kylechar476993472016-09-14 16:03:488import("//ui/ozone/ozone.gni")
[email protected]dab154ee2014-06-13 23:48:509
sammcd06e3fc2015-04-28 00:14:5410# See //content/BUILD.gn for how this works.
11group("gpu") {
brettwb78fc9e2016-03-25 21:02:5112 visibility = [ "//content/*" ] # This is an internal content API.
sammcd06e3fc2015-04-28 00:14:5413
14 if (is_component_build) {
15 public_deps = [
16 "//content",
17 ]
18 } else {
19 public_deps = [
20 ":gpu_sources",
21 ]
22 }
23}
24
brucedawson6e53a2e12016-07-23 19:35:4725if (is_component_build) {
26 link_target_type = "source_set"
27} else {
28 link_target_type = "static_library"
29}
30target(link_target_type, "gpu_sources") {
brettwb78fc9e2016-03-25 21:02:5131 # This is an internal content API. Code outside of the content "component"
32 # (like content/test and content/shell) should depend on ":gpu" above.
Brett Wilson8f1323042014-09-11 16:58:5633 visibility = [ "//content/*" ]
[email protected]6294f0d2014-08-20 17:43:0934
[email protected]dab154ee2014-06-13 23:48:5035 sources = [
satorux7fa9d302015-02-16 00:44:5236 "gpu_child_thread.cc",
37 "gpu_child_thread.h",
[email protected]dab154ee2014-06-13 23:48:5038 "gpu_main.cc",
39 "gpu_process.cc",
40 "gpu_process.h",
ben507aa812016-08-10 23:26:1941 "gpu_service_factory.cc",
42 "gpu_service_factory.h",
[email protected]dab154ee2014-06-13 23:48:5043 "in_process_gpu_thread.cc",
44 "in_process_gpu_thread.h",
45 ]
46
ben02a37772015-11-19 04:37:0547 configs += [ "//content:content_implementation" ]
[email protected]dab154ee2014-06-13 23:48:5048
49 deps = [
50 "//base",
brettwb78fc9e2016-03-25 21:02:5151 "//base/third_party/dynamic_annotations",
52 "//components/tracing",
Fady Samuel279f5f02017-06-14 23:23:0053 "//components/viz/service",
[email protected]dab154ee2014-06-13 23:48:5054 "//content:export",
brettwdb087102016-04-18 21:33:0855 "//content/child",
brettwb78fc9e2016-03-25 21:02:5156 "//content/common",
chiniforooshan701fa212017-04-06 22:22:4957 "//content/common:mojo_bindings",
blundell24ab5d362014-11-21 10:11:1958 "//content/public/child:child_sources",
fsamuel68efb482016-03-17 12:15:4359 "//content/public/common:common_sources",
markdittmercbf36ce2016-03-02 16:08:2960 "//gpu:gpu",
fsamuel19acfae2016-03-22 05:38:2461 "//gpu/ipc/common:command_buffer_traits",
Zhenyao Mo83b895e2017-10-18 18:50:5462 "//gpu/ipc/common:gpu_preferences_util",
markdittmerd88b8352016-04-08 15:28:4563 "//gpu/ipc/service",
fsamuel68efb482016-03-17 12:15:4364 "//ipc",
markdittmer6e70beb82016-05-02 05:40:4765 "//media/gpu",
xhwangdb24d602017-05-20 06:32:2466 "//media/mojo:features",
jrummell397905b2017-03-20 22:36:2567
68 # TODO(jrummell): As //media/gpu/ipc/service is a source_set in a
69 # component build, determine if it should not be included here.
70 # http://crbug.com/702833.
markdittmer6e70beb82016-05-02 05:40:4771 "//media/gpu/ipc/service",
liberato441ca702017-05-13 16:50:3872 "//media/mojo/clients:clients",
rockot734fb662016-10-15 16:41:3073 "//services/service_manager/public/cpp",
74 "//services/service_manager/public/interfaces",
mcasas73550c042017-03-17 02:03:3775 "//services/shape_detection:lib",
76 "//services/shape_detection/public/interfaces",
sadrul72aae8a2017-01-24 04:52:3277 "//services/ui/gpu",
sadrul6c5aed8c2017-01-11 23:11:4478 "//services/ui/gpu/interfaces",
[email protected]dab154ee2014-06-13 23:48:5079 "//skia",
Tom Sepeza0950c62017-10-18 20:39:1480 "//third_party/angle:angle_gpu_info_util",
brettwb78fc9e2016-03-25 21:02:5181 "//ui/gfx/ipc",
[email protected]dab154ee2014-06-13 23:48:5082 "//ui/gl",
kylechar5b9dec12016-05-16 15:40:5783 "//ui/gl/init",
mfomitchev3ba450ad2017-04-03 18:20:4084 "//ui/latency/ipc",
[email protected]dab154ee2014-06-13 23:48:5085 ]
86
xhwangded3b6e2016-05-25 05:24:5187 if (is_android) {
jrummell397905b2017-03-20 22:36:2588 deps += [ "//media" ]
xhwangded3b6e2016-05-25 05:24:5189 }
90
xhwangbe720032016-02-19 18:45:3191 if (mojo_media_host == "gpu") {
xhwangd3b5d3f2016-05-18 03:37:5992 deps += [ "//media/mojo/services" ]
xhwangfb22df12015-10-13 23:13:4693 }
94
[email protected]dab154ee2014-06-13 23:48:5095 if (is_win) {
96 configs += [
97 "//third_party/khronos:khronos_headers",
98 "//third_party/wtl:wtl_includes",
99 ]
100 libs = [ "setupapi.lib" ]
101 deps += [
brettwb78fc9e2016-03-25 21:02:51102 "//sandbox",
[email protected]dab154ee2014-06-13 23:48:50103 "//third_party/angle:libEGL",
104 "//third_party/angle:libGLESv2",
105 ]
106 }
107
[email protected]22fe91d2014-08-12 17:07:12108 if (use_x11) {
109 deps += [ "//ui/events/platform/x11" ]
110 }
dyen2ce3e052016-03-09 21:03:49111
brettwb78fc9e2016-03-25 21:02:51112 if (use_ozone) {
113 deps += [ "//ui/ozone" ]
114 }
115
dyen2ce3e052016-03-09 21:03:49116 if (enable_vulkan) {
117 deps += [ "//gpu/vulkan" ]
118 }
[email protected]dab154ee2014-06-13 23:48:50119}