[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 | |
[email protected] | 22fe91d | 2014-08-12 17:07:12 | [diff] [blame] | 5 | import("//build/config/ui.gni") |
qyearsley | db0a3487 | 2017-03-14 03:24:31 | [diff] [blame] | 6 | import("//gpu/vulkan/features.gni") |
xhwang | fb22df1 | 2015-10-13 23:13:46 | [diff] [blame] | 7 | import("//media/media_options.gni") |
kylechar | 47699347 | 2016-09-14 16:03:48 | [diff] [blame] | 8 | import("//ui/ozone/ozone.gni") |
[email protected] | dab154ee | 2014-06-13 23:48:50 | [diff] [blame] | 9 | |
sammc | d06e3fc | 2015-04-28 00:14:54 | [diff] [blame] | 10 | # See //content/BUILD.gn for how this works. |
| 11 | group("gpu") { |
brettw | b78fc9e | 2016-03-25 21:02:51 | [diff] [blame] | 12 | visibility = [ "//content/*" ] # This is an internal content API. |
sammc | d06e3fc | 2015-04-28 00:14:54 | [diff] [blame] | 13 | |
| 14 | if (is_component_build) { |
| 15 | public_deps = [ |
| 16 | "//content", |
| 17 | ] |
| 18 | } else { |
| 19 | public_deps = [ |
| 20 | ":gpu_sources", |
| 21 | ] |
| 22 | } |
| 23 | } |
| 24 | |
brucedawson | 6e53a2e1 | 2016-07-23 19:35:47 | [diff] [blame] | 25 | if (is_component_build) { |
| 26 | link_target_type = "source_set" |
| 27 | } else { |
| 28 | link_target_type = "static_library" |
| 29 | } |
| 30 | target(link_target_type, "gpu_sources") { |
brettw | b78fc9e | 2016-03-25 21:02:51 | [diff] [blame] | 31 | # 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 Wilson | 8f132304 | 2014-09-11 16:58:56 | [diff] [blame] | 33 | visibility = [ "//content/*" ] |
[email protected] | 6294f0d | 2014-08-20 17:43:09 | [diff] [blame] | 34 | |
[email protected] | dab154ee | 2014-06-13 23:48:50 | [diff] [blame] | 35 | sources = [ |
satorux | 7fa9d30 | 2015-02-16 00:44:52 | [diff] [blame] | 36 | "gpu_child_thread.cc", |
| 37 | "gpu_child_thread.h", |
[email protected] | dab154ee | 2014-06-13 23:48:50 | [diff] [blame] | 38 | "gpu_main.cc", |
| 39 | "gpu_process.cc", |
| 40 | "gpu_process.h", |
ben | 507aa81 | 2016-08-10 23:26:19 | [diff] [blame] | 41 | "gpu_service_factory.cc", |
| 42 | "gpu_service_factory.h", |
[email protected] | dab154ee | 2014-06-13 23:48:50 | [diff] [blame] | 43 | "in_process_gpu_thread.cc", |
| 44 | "in_process_gpu_thread.h", |
| 45 | ] |
| 46 | |
ben | 02a3777 | 2015-11-19 04:37:05 | [diff] [blame] | 47 | configs += [ "//content:content_implementation" ] |
[email protected] | dab154ee | 2014-06-13 23:48:50 | [diff] [blame] | 48 | |
| 49 | deps = [ |
| 50 | "//base", |
brettw | b78fc9e | 2016-03-25 21:02:51 | [diff] [blame] | 51 | "//base/third_party/dynamic_annotations", |
| 52 | "//components/tracing", |
Fady Samuel | 279f5f0 | 2017-06-14 23:23:00 | [diff] [blame] | 53 | "//components/viz/service", |
[email protected] | dab154ee | 2014-06-13 23:48:50 | [diff] [blame] | 54 | "//content:export", |
brettw | db08710 | 2016-04-18 21:33:08 | [diff] [blame] | 55 | "//content/child", |
brettw | b78fc9e | 2016-03-25 21:02:51 | [diff] [blame] | 56 | "//content/common", |
chiniforooshan | 701fa21 | 2017-04-06 22:22:49 | [diff] [blame] | 57 | "//content/common:mojo_bindings", |
blundell | 24ab5d36 | 2014-11-21 10:11:19 | [diff] [blame] | 58 | "//content/public/child:child_sources", |
fsamuel | 68efb48 | 2016-03-17 12:15:43 | [diff] [blame] | 59 | "//content/public/common:common_sources", |
markdittmer | cbf36ce | 2016-03-02 16:08:29 | [diff] [blame] | 60 | "//gpu:gpu", |
fsamuel | 19acfae | 2016-03-22 05:38:24 | [diff] [blame] | 61 | "//gpu/ipc/common:command_buffer_traits", |
Zhenyao Mo | 83b895e | 2017-10-18 18:50:54 | [diff] [blame] | 62 | "//gpu/ipc/common:gpu_preferences_util", |
markdittmer | d88b835 | 2016-04-08 15:28:45 | [diff] [blame] | 63 | "//gpu/ipc/service", |
fsamuel | 68efb48 | 2016-03-17 12:15:43 | [diff] [blame] | 64 | "//ipc", |
markdittmer | 6e70beb8 | 2016-05-02 05:40:47 | [diff] [blame] | 65 | "//media/gpu", |
xhwang | db24d60 | 2017-05-20 06:32:24 | [diff] [blame] | 66 | "//media/mojo:features", |
jrummell | 397905b | 2017-03-20 22:36:25 | [diff] [blame] | 67 | |
| 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. |
markdittmer | 6e70beb8 | 2016-05-02 05:40:47 | [diff] [blame] | 71 | "//media/gpu/ipc/service", |
liberato | 441ca70 | 2017-05-13 16:50:38 | [diff] [blame] | 72 | "//media/mojo/clients:clients", |
rockot | 734fb66 | 2016-10-15 16:41:30 | [diff] [blame] | 73 | "//services/service_manager/public/cpp", |
| 74 | "//services/service_manager/public/interfaces", |
mcasas | 73550c04 | 2017-03-17 02:03:37 | [diff] [blame] | 75 | "//services/shape_detection:lib", |
| 76 | "//services/shape_detection/public/interfaces", |
sadrul | 72aae8a | 2017-01-24 04:52:32 | [diff] [blame] | 77 | "//services/ui/gpu", |
sadrul | 6c5aed8c | 2017-01-11 23:11:44 | [diff] [blame] | 78 | "//services/ui/gpu/interfaces", |
[email protected] | dab154ee | 2014-06-13 23:48:50 | [diff] [blame] | 79 | "//skia", |
Tom Sepez | a0950c6 | 2017-10-18 20:39:14 | [diff] [blame^] | 80 | "//third_party/angle:angle_gpu_info_util", |
brettw | b78fc9e | 2016-03-25 21:02:51 | [diff] [blame] | 81 | "//ui/gfx/ipc", |
[email protected] | dab154ee | 2014-06-13 23:48:50 | [diff] [blame] | 82 | "//ui/gl", |
kylechar | 5b9dec1 | 2016-05-16 15:40:57 | [diff] [blame] | 83 | "//ui/gl/init", |
mfomitchev | 3ba450ad | 2017-04-03 18:20:40 | [diff] [blame] | 84 | "//ui/latency/ipc", |
[email protected] | dab154ee | 2014-06-13 23:48:50 | [diff] [blame] | 85 | ] |
| 86 | |
xhwang | ded3b6e | 2016-05-25 05:24:51 | [diff] [blame] | 87 | if (is_android) { |
jrummell | 397905b | 2017-03-20 22:36:25 | [diff] [blame] | 88 | deps += [ "//media" ] |
xhwang | ded3b6e | 2016-05-25 05:24:51 | [diff] [blame] | 89 | } |
| 90 | |
xhwang | be72003 | 2016-02-19 18:45:31 | [diff] [blame] | 91 | if (mojo_media_host == "gpu") { |
xhwang | d3b5d3f | 2016-05-18 03:37:59 | [diff] [blame] | 92 | deps += [ "//media/mojo/services" ] |
xhwang | fb22df1 | 2015-10-13 23:13:46 | [diff] [blame] | 93 | } |
| 94 | |
[email protected] | dab154ee | 2014-06-13 23:48:50 | [diff] [blame] | 95 | if (is_win) { |
| 96 | configs += [ |
| 97 | "//third_party/khronos:khronos_headers", |
| 98 | "//third_party/wtl:wtl_includes", |
| 99 | ] |
| 100 | libs = [ "setupapi.lib" ] |
| 101 | deps += [ |
brettw | b78fc9e | 2016-03-25 21:02:51 | [diff] [blame] | 102 | "//sandbox", |
[email protected] | dab154ee | 2014-06-13 23:48:50 | [diff] [blame] | 103 | "//third_party/angle:libEGL", |
| 104 | "//third_party/angle:libGLESv2", |
| 105 | ] |
| 106 | } |
| 107 | |
[email protected] | 22fe91d | 2014-08-12 17:07:12 | [diff] [blame] | 108 | if (use_x11) { |
| 109 | deps += [ "//ui/events/platform/x11" ] |
| 110 | } |
dyen | 2ce3e05 | 2016-03-09 21:03:49 | [diff] [blame] | 111 | |
brettw | b78fc9e | 2016-03-25 21:02:51 | [diff] [blame] | 112 | if (use_ozone) { |
| 113 | deps += [ "//ui/ozone" ] |
| 114 | } |
| 115 | |
dyen | 2ce3e05 | 2016-03-09 21:03:49 | [diff] [blame] | 116 | if (enable_vulkan) { |
| 117 | deps += [ "//gpu/vulkan" ] |
| 118 | } |
[email protected] | dab154ee | 2014-06-13 23:48:50 | [diff] [blame] | 119 | } |