[email protected] | dab154ee | 2014-06-13 23:48:50 | [diff] [blame] | 1 | # 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 Bratell | b2123d4 | 2017-12-04 11:59:51 | [diff] [blame] | 5 | import("//build/config/jumbo.gni") |
[email protected] | 22fe91d | 2014-08-12 17:07:12 | [diff] [blame] | 6 | import("//build/config/ui.gni") |
qyearsley | db0a3487 | 2017-03-14 03:24:31 | [diff] [blame] | 7 | import("//gpu/vulkan/features.gni") |
xhwang | fb22df1 | 2015-10-13 23:13:46 | [diff] [blame] | 8 | import("//media/media_options.gni") |
kylechar | 47699347 | 2016-09-14 16:03:48 | [diff] [blame] | 9 | import("//ui/ozone/ozone.gni") |
[email protected] | dab154ee | 2014-06-13 23:48:50 | [diff] [blame] | 10 | |
sammc | d06e3fc | 2015-04-28 00:14:54 | [diff] [blame] | 11 | # See //content/BUILD.gn for how this works. |
| 12 | group("gpu") { |
brettw | b78fc9e | 2016-03-25 21:02:51 | [diff] [blame] | 13 | visibility = [ "//content/*" ] # This is an internal content API. |
sammc | d06e3fc | 2015-04-28 00:14:54 | [diff] [blame] | 14 | |
| 15 | if (is_component_build) { |
| 16 | public_deps = [ |
| 17 | "//content", |
| 18 | ] |
| 19 | } else { |
| 20 | public_deps = [ |
| 21 | ":gpu_sources", |
| 22 | ] |
| 23 | } |
| 24 | } |
| 25 | |
brucedawson | 6e53a2e1 | 2016-07-23 19:35:47 | [diff] [blame] | 26 | if (is_component_build) { |
Daniel Bratell | b2123d4 | 2017-12-04 11:59:51 | [diff] [blame] | 27 | link_target_type = "jumbo_source_set" |
brucedawson | 6e53a2e1 | 2016-07-23 19:35:47 | [diff] [blame] | 28 | } else { |
Daniel Bratell | b2123d4 | 2017-12-04 11:59:51 | [diff] [blame] | 29 | link_target_type = "jumbo_static_library" |
brucedawson | 6e53a2e1 | 2016-07-23 19:35:47 | [diff] [blame] | 30 | } |
Tom Sepez | 085507ab | 2017-10-18 22:36:00 | [diff] [blame] | 31 | |
brucedawson | 6e53a2e1 | 2016-07-23 19:35:47 | [diff] [blame] | 32 | target(link_target_type, "gpu_sources") { |
brettw | b78fc9e | 2016-03-25 21:02:51 | [diff] [blame] | 33 | # 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 Wilson | 8f132304 | 2014-09-11 16:58:56 | [diff] [blame] | 35 | visibility = [ "//content/*" ] |
[email protected] | 6294f0d | 2014-08-20 17:43:09 | [diff] [blame] | 36 | |
[email protected] | dab154ee | 2014-06-13 23:48:50 | [diff] [blame] | 37 | sources = [ |
satorux | 7fa9d30 | 2015-02-16 00:44:52 | [diff] [blame] | 38 | "gpu_child_thread.cc", |
| 39 | "gpu_child_thread.h", |
[email protected] | dab154ee | 2014-06-13 23:48:50 | [diff] [blame] | 40 | "gpu_main.cc", |
| 41 | "gpu_process.cc", |
| 42 | "gpu_process.h", |
Tom Sepez | 085507ab | 2017-10-18 22:36:00 | [diff] [blame] | 43 | "gpu_sandbox_hook_linux.cc", |
| 44 | "gpu_sandbox_hook_linux.h", |
ben | 507aa81 | 2016-08-10 23:26:19 | [diff] [blame] | 45 | "gpu_service_factory.cc", |
| 46 | "gpu_service_factory.h", |
[email protected] | dab154ee | 2014-06-13 23:48:50 | [diff] [blame] | 47 | "in_process_gpu_thread.cc", |
| 48 | "in_process_gpu_thread.h", |
| 49 | ] |
| 50 | |
ben | 02a3777 | 2015-11-19 04:37:05 | [diff] [blame] | 51 | configs += [ "//content:content_implementation" ] |
[email protected] | dab154ee | 2014-06-13 23:48:50 | [diff] [blame] | 52 | |
| 53 | deps = [ |
| 54 | "//base", |
brettw | b78fc9e | 2016-03-25 21:02:51 | [diff] [blame] | 55 | "//base/third_party/dynamic_annotations", |
| 56 | "//components/tracing", |
Fady Samuel | 279f5f0 | 2017-06-14 23:23:00 | [diff] [blame] | 57 | "//components/viz/service", |
[email protected] | dab154ee | 2014-06-13 23:48:50 | [diff] [blame] | 58 | "//content:export", |
brettw | db08710 | 2016-04-18 21:33:08 | [diff] [blame] | 59 | "//content/child", |
brettw | b78fc9e | 2016-03-25 21:02:51 | [diff] [blame] | 60 | "//content/common", |
chiniforooshan | 701fa21 | 2017-04-06 22:22:49 | [diff] [blame] | 61 | "//content/common:mojo_bindings", |
blundell | 24ab5d36 | 2014-11-21 10:11:19 | [diff] [blame] | 62 | "//content/public/child:child_sources", |
fsamuel | 68efb48 | 2016-03-17 12:15:43 | [diff] [blame] | 63 | "//content/public/common:common_sources", |
markdittmer | cbf36ce | 2016-03-02 16:08:29 | [diff] [blame] | 64 | "//gpu:gpu", |
fsamuel | 19acfae | 2016-03-22 05:38:24 | [diff] [blame] | 65 | "//gpu/ipc/common:command_buffer_traits", |
Zhenyao Mo | 83b895e | 2017-10-18 18:50:54 | [diff] [blame] | 66 | "//gpu/ipc/common:gpu_preferences_util", |
markdittmer | d88b835 | 2016-04-08 15:28:45 | [diff] [blame] | 67 | "//gpu/ipc/service", |
fsamuel | 68efb48 | 2016-03-17 12:15:43 | [diff] [blame] | 68 | "//ipc", |
Scott Violet | a35f9a4 | 2018-03-22 22:00:44 | [diff] [blame^] | 69 | "//media:media_buildflags", |
markdittmer | 6e70beb8 | 2016-05-02 05:40:47 | [diff] [blame] | 70 | "//media/gpu", |
Scott Violet | a35f9a4 | 2018-03-22 22:00:44 | [diff] [blame^] | 71 | "//media/mojo:buildflags", |
jrummell | 397905b | 2017-03-20 22:36:25 | [diff] [blame] | 72 | |
| 73 | # TODO(jrummell): As //media/gpu/ipc/service is a source_set in a |
| 74 | # component build, determine if it should not be included here. |
| 75 | # http://crbug.com/702833. |
Sadrul Habib Chowdhury | 55fc2f0 | 2017-10-27 02:40:06 | [diff] [blame] | 76 | "//components/viz/service/main", |
markdittmer | 6e70beb8 | 2016-05-02 05:40:47 | [diff] [blame] | 77 | "//media/gpu/ipc/service", |
liberato | 441ca70 | 2017-05-13 16:50:38 | [diff] [blame] | 78 | "//media/mojo/clients:clients", |
rockot | 734fb66 | 2016-10-15 16:41:30 | [diff] [blame] | 79 | "//services/service_manager/public/cpp", |
Ken Rockot | 543f5e3 | 2018-02-04 02:13:50 | [diff] [blame] | 80 | "//services/service_manager/public/mojom", |
mcasas | 73550c04 | 2017-03-17 02:03:37 | [diff] [blame] | 81 | "//services/shape_detection:lib", |
Ken Rockot | d7e999b | 2018-02-11 15:48:21 | [diff] [blame] | 82 | "//services/shape_detection/public/mojom", |
Sadrul Habib Chowdhury | 55fc2f0 | 2017-10-27 02:40:06 | [diff] [blame] | 83 | "//services/viz/privileged/interfaces", |
[email protected] | dab154ee | 2014-06-13 23:48:50 | [diff] [blame] | 84 | "//skia", |
Tom Sepez | a0950c6 | 2017-10-18 20:39:14 | [diff] [blame] | 85 | "//third_party/angle:angle_gpu_info_util", |
brettw | b78fc9e | 2016-03-25 21:02:51 | [diff] [blame] | 86 | "//ui/gfx/ipc", |
[email protected] | dab154ee | 2014-06-13 23:48:50 | [diff] [blame] | 87 | "//ui/gl", |
kylechar | 5b9dec1 | 2016-05-16 15:40:57 | [diff] [blame] | 88 | "//ui/gl/init", |
mfomitchev | 3ba450ad | 2017-04-03 18:20:40 | [diff] [blame] | 89 | "//ui/latency/ipc", |
[email protected] | dab154ee | 2014-06-13 23:48:50 | [diff] [blame] | 90 | ] |
| 91 | |
xhwang | ded3b6e | 2016-05-25 05:24:51 | [diff] [blame] | 92 | if (is_android) { |
jrummell | 397905b | 2017-03-20 22:36:25 | [diff] [blame] | 93 | deps += [ "//media" ] |
xhwang | ded3b6e | 2016-05-25 05:24:51 | [diff] [blame] | 94 | } |
| 95 | |
xhwang | be72003 | 2016-02-19 18:45:31 | [diff] [blame] | 96 | if (mojo_media_host == "gpu") { |
xhwang | d3b5d3f | 2016-05-18 03:37:59 | [diff] [blame] | 97 | deps += [ "//media/mojo/services" ] |
xhwang | fb22df1 | 2015-10-13 23:13:46 | [diff] [blame] | 98 | } |
| 99 | |
[email protected] | dab154ee | 2014-06-13 23:48:50 | [diff] [blame] | 100 | if (is_win) { |
| 101 | configs += [ |
| 102 | "//third_party/khronos:khronos_headers", |
| 103 | "//third_party/wtl:wtl_includes", |
| 104 | ] |
| 105 | libs = [ "setupapi.lib" ] |
Peter Collingbourne | 9e668e5 | 2017-12-14 23:28:09 | [diff] [blame] | 106 | deps += [ "//sandbox" ] |
[email protected] | dab154ee | 2014-06-13 23:48:50 | [diff] [blame] | 107 | } |
| 108 | |
Bill Budge | 2ca3514 | 2018-02-21 23:22:22 | [diff] [blame] | 109 | if (is_linux || is_mac) { |
| 110 | deps += [ "//sandbox" ] |
| 111 | } |
| 112 | |
[email protected] | 22fe91d | 2014-08-12 17:07:12 | [diff] [blame] | 113 | if (use_x11) { |
kylechar | b8d249c | 2017-12-15 00:04:18 | [diff] [blame] | 114 | deps += [ |
| 115 | "//ui/events/platform/x11", |
| 116 | "//ui/gfx/x", |
| 117 | ] |
[email protected] | 22fe91d | 2014-08-12 17:07:12 | [diff] [blame] | 118 | } |
dyen | 2ce3e05 | 2016-03-09 21:03:49 | [diff] [blame] | 119 | |
brettw | b78fc9e | 2016-03-25 21:02:51 | [diff] [blame] | 120 | if (use_ozone) { |
| 121 | deps += [ "//ui/ozone" ] |
| 122 | } |
| 123 | |
dyen | 2ce3e05 | 2016-03-09 21:03:49 | [diff] [blame] | 124 | if (enable_vulkan) { |
| 125 | deps += [ "//gpu/vulkan" ] |
| 126 | } |
Julien Isorce | b662350 | 2017-11-28 12:20:40 | [diff] [blame] | 127 | |
Stephen Lanham | 28a49d5 | 2017-11-30 01:53:37 | [diff] [blame] | 128 | # Use DRI on desktop Linux builds. |
Junliang Yan | 94273ef | 2018-02-05 22:25:24 | [diff] [blame] | 129 | if (current_cpu != "s390x" && current_cpu != "ppc64" && is_desktop_linux && |
Junliang Yan | 15ac173 | 2018-02-02 02:25:44 | [diff] [blame] | 130 | (!is_chromecast || is_cast_desktop_build)) { |
Julien Isorce | b662350 | 2017-11-28 12:20:40 | [diff] [blame] | 131 | configs += [ "//build/config/linux/dri" ] |
| 132 | } |
[email protected] | dab154ee | 2014-06-13 23:48:50 | [diff] [blame] | 133 | } |