[email protected] | df3ecfde | 2014-05-20 21:52:34 | [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] | 7e4c3314 | 2014-05-21 22:01:32 | [diff] [blame] | 5 | import("//build/config/features.gni") |
| 6 | import("//build/config/ui.gni") |
[email protected] | df3ecfde | 2014-05-20 21:52:34 | [diff] [blame] | 7 | import("//content/common/common.gni") |
xhwang | 13eab74 | 2015-11-18 20:29:37 | [diff] [blame] | 8 | import("//media/media_options.gni") |
rockot | 85dce086 | 2015-11-13 01:33:59 | [diff] [blame] | 9 | import("//mojo/public/tools/bindings/mojom.gni") |
dpranke | 517335e | 2015-08-01 02:41:14 | [diff] [blame] | 10 | if (is_mac) { |
| 11 | import("//build/config/mac/mac_sdk.gni") |
| 12 | } |
[email protected] | df3ecfde | 2014-05-20 21:52:34 | [diff] [blame] | 13 | |
dpranke | 4327621 | 2015-02-20 02:55:19 | [diff] [blame] | 14 | if (is_chromeos && current_cpu != "arm") { |
mukai | f7571f3 | 2014-09-30 19:19:10 | [diff] [blame] | 15 | action("libva_generate_stubs") { |
| 16 | extra_header = "gpu/media/va_stub_header.fragment" |
| 17 | |
| 18 | script = "../../tools/generate_stubs/generate_stubs.py" |
scottmg | 7afc409 | 2014-12-03 19:22:42 | [diff] [blame] | 19 | sources = [ |
| 20 | "gpu/media/va.sigs", |
| 21 | ] |
| 22 | inputs = [ |
| 23 | extra_header, |
| 24 | ] |
lionel.g.landwerlin | 2c653de3 | 2014-12-25 19:05:02 | [diff] [blame] | 25 | if (use_x11) { |
| 26 | sources += [ "gpu/media/va_x11.sigs" ] |
| 27 | } |
lionel.g.landwerlin | b056abc | 2015-01-02 23:50:52 | [diff] [blame] | 28 | if (use_ozone) { |
| 29 | sources += [ "gpu/media/va_drm.sigs" ] |
| 30 | } |
mukai | f7571f3 | 2014-09-30 19:19:10 | [diff] [blame] | 31 | stubs_filename_root = "va_stubs" |
| 32 | |
| 33 | outputs = [ |
| 34 | "$target_gen_dir/gpu/media/$stubs_filename_root.cc", |
| 35 | "$target_gen_dir/gpu/media/$stubs_filename_root.h", |
| 36 | ] |
| 37 | args = [ |
scottmg | 7afc409 | 2014-12-03 19:22:42 | [diff] [blame] | 38 | "-i", |
| 39 | rebase_path("$target_gen_dir/gpu/media", root_build_dir), |
| 40 | "-o", |
| 41 | rebase_path("$target_gen_dir/gpu/media", root_build_dir), |
| 42 | "-t", |
| 43 | "posix_stubs", |
| 44 | "-e", |
| 45 | rebase_path(extra_header, root_build_dir), |
| 46 | "-s", |
| 47 | stubs_filename_root, |
| 48 | "-p", |
| 49 | "content/common/gpu/media", |
mukai | f7571f3 | 2014-09-30 19:19:10 | [diff] [blame] | 50 | ] |
| 51 | |
| 52 | args += rebase_path(sources, root_build_dir) |
| 53 | } |
| 54 | } |
| 55 | |
henryhsu | 5159267 | 2015-02-08 05:01:00 | [diff] [blame] | 56 | if (is_chromeos && use_v4lplugin) { |
| 57 | action("libv4l2_generate_stubs") { |
| 58 | extra_header = "gpu/media/v4l2_stub_header.fragment" |
| 59 | |
| 60 | script = "../../tools/generate_stubs/generate_stubs.py" |
| 61 | sources = [ |
| 62 | "gpu/media/v4l2.sig", |
| 63 | ] |
| 64 | inputs = [ |
| 65 | extra_header, |
| 66 | ] |
| 67 | stubs_filename_root = "v4l2_stubs" |
| 68 | |
| 69 | outputs = [ |
| 70 | "$target_gen_dir/gpu/media/$stubs_filename_root.cc", |
| 71 | "$target_gen_dir/gpu/media/$stubs_filename_root.h", |
| 72 | ] |
| 73 | args = [ |
| 74 | "-i", |
| 75 | rebase_path("$target_gen_dir/gpu/media", root_build_dir), |
| 76 | "-o", |
| 77 | rebase_path("$target_gen_dir/gpu/media", root_build_dir), |
| 78 | "-t", |
| 79 | "posix_stubs", |
| 80 | "-e", |
| 81 | rebase_path(extra_header, root_build_dir), |
| 82 | "-s", |
| 83 | stubs_filename_root, |
| 84 | "-p", |
| 85 | "content/common/gpu/media", |
| 86 | ] |
| 87 | |
| 88 | args += rebase_path(sources, root_build_dir) |
| 89 | } |
| 90 | } |
| 91 | |
dpranke | 380390f | 2014-11-21 06:08:53 | [diff] [blame] | 92 | if (is_mac) { |
| 93 | action("libvt_generate_stubs") { |
| 94 | extra_header = "gpu/media/vt_stubs_header.fragment" |
| 95 | |
| 96 | script = "../../tools/generate_stubs/generate_stubs.py" |
scottmg | 7afc409 | 2014-12-03 19:22:42 | [diff] [blame] | 97 | sources = [ |
| 98 | "gpu/media/vt.sig", |
| 99 | ] |
| 100 | inputs = [ |
| 101 | extra_header, |
| 102 | ] |
dpranke | 380390f | 2014-11-21 06:08:53 | [diff] [blame] | 103 | stubs_filename_root = "vt_stubs" |
| 104 | |
| 105 | outputs = [ |
| 106 | "$target_gen_dir/gpu/media/$stubs_filename_root.cc", |
| 107 | "$target_gen_dir/gpu/media/$stubs_filename_root.h", |
| 108 | ] |
| 109 | args = [ |
scottmg | 7afc409 | 2014-12-03 19:22:42 | [diff] [blame] | 110 | "-i", |
| 111 | rebase_path("$target_gen_dir/gpu/media", root_build_dir), |
| 112 | "-o", |
| 113 | rebase_path("$target_gen_dir/gpu/media", root_build_dir), |
| 114 | "-t", |
| 115 | "posix_stubs", |
| 116 | "-e", |
| 117 | rebase_path(extra_header, root_build_dir), |
| 118 | "-s", |
| 119 | stubs_filename_root, |
| 120 | "-p", |
| 121 | "content/common/gpu/media", |
dpranke | 380390f | 2014-11-21 06:08:53 | [diff] [blame] | 122 | ] |
| 123 | |
| 124 | args += rebase_path(sources, root_build_dir) |
| 125 | } |
| 126 | } |
| 127 | |
[email protected] | df3ecfde | 2014-05-20 21:52:34 | [diff] [blame] | 128 | source_set("common") { |
Brett Wilson | 8f132304 | 2014-09-11 16:58:56 | [diff] [blame] | 129 | # Only the public target should depend on this. All other targets (even |
| 130 | # internal content ones) should depend on the public one. |
| 131 | visibility = [ "//content/public/common:common_sources" ] |
[email protected] | df3ecfde | 2014-05-20 21:52:34 | [diff] [blame] | 132 | |
| 133 | sources = rebase_path(content_common_gypi_values.private_common_sources, |
scottmg | 7afc409 | 2014-12-03 19:22:42 | [diff] [blame] | 134 | ".", |
| 135 | "//content") |
[email protected] | df3ecfde | 2014-05-20 21:52:34 | [diff] [blame] | 136 | |
ben | 03b7b9d | 2015-11-15 12:13:09 | [diff] [blame] | 137 | # These files are only built in a GN build because they bring in |
| 138 | # dependencies that don't build with GYP. |
| 139 | sources += [ |
| 140 | "mojo/mojo_shell_connection_impl.cc", |
| 141 | "mojo/mojo_shell_connection_impl.h", |
| 142 | ] |
| 143 | |
brettw | 1deb76bc | 2015-02-18 19:28:20 | [diff] [blame] | 144 | configs += [ |
| 145 | "//content:content_implementation", |
brettw | bc8b2a2 | 2015-07-28 18:24:42 | [diff] [blame] | 146 | "//build/config:precompiled_headers", |
brettw | 1deb76bc | 2015-02-18 19:28:20 | [diff] [blame] | 147 | "//build/config/compiler:no_size_t_to_int_warning", |
| 148 | ] |
[email protected] | df3ecfde | 2014-05-20 21:52:34 | [diff] [blame] | 149 | |
Brett Wilson | e5389527 | 2014-09-23 23:41:46 | [diff] [blame] | 150 | public_deps = [ |
| 151 | "//gpu/command_buffer/common", |
agrieve | e786dac | 2015-12-02 14:45:22 | [diff] [blame^] | 152 | "//ipc", |
Brett Wilson | e5389527 | 2014-09-23 23:41:46 | [diff] [blame] | 153 | "//third_party/WebKit/public:blink_headers", |
| 154 | ] |
[email protected] | df3ecfde | 2014-05-20 21:52:34 | [diff] [blame] | 155 | deps = [ |
| 156 | "//base", |
[email protected] | 7e4c3314 | 2014-05-21 22:01:32 | [diff] [blame] | 157 | "//build/util:webkit_version", |
ben | 03b7b9d | 2015-11-15 12:13:09 | [diff] [blame] | 158 | "//components/mus/public/interfaces", |
[email protected] | df3ecfde | 2014-05-20 21:52:34 | [diff] [blame] | 159 | "//components/tracing", |
zhenw | 062a9452 | 2015-06-22 20:55:28 | [diff] [blame] | 160 | "//components/tracing:startup_tracing", |
jbroman | cba3d2fe | 2014-09-16 01:04:24 | [diff] [blame] | 161 | "//gpu/command_buffer/client:gles2_interface", |
brettw | 542f753 | 2015-04-06 22:35:45 | [diff] [blame] | 162 | "//gpu/command_buffer/common:gles2_utils", |
ben | 03b7b9d | 2015-11-15 12:13:09 | [diff] [blame] | 163 | "//mojo/application/public/cpp", |
| 164 | "//mojo/converters/network", |
| 165 | "//mojo/runner/child:lib", |
[email protected] | df3ecfde | 2014-05-20 21:52:34 | [diff] [blame] | 166 | "//net", |
| 167 | "//skia", |
| 168 | "//third_party/icu", |
rockot | ac2a36e | 2015-11-20 17:56:54 | [diff] [blame] | 169 | "//third_party/libjingle", |
[email protected] | df3ecfde | 2014-05-20 21:52:34 | [diff] [blame] | 170 | "//ui/accessibility", |
[email protected] | 52140d88 | 2014-05-30 19:22:40 | [diff] [blame] | 171 | "//ui/base", |
spang | 1c36fac | 2015-02-05 19:55:12 | [diff] [blame] | 172 | "//ui/base/ime", |
miletus | 45effdc4 | 2015-08-05 00:29:18 | [diff] [blame] | 173 | "//ui/events/ipc:events_ipc", |
[email protected] | df3ecfde | 2014-05-20 21:52:34 | [diff] [blame] | 174 | "//ui/gfx", |
| 175 | "//ui/gfx/geometry", |
[email protected] | d7e69fa | 2014-07-24 21:19:28 | [diff] [blame] | 176 | "//ui/gfx/ipc", |
[email protected] | a1d7d4f | 2014-07-16 21:33:36 | [diff] [blame] | 177 | "//ui/shell_dialogs", |
[email protected] | df3ecfde | 2014-05-20 21:52:34 | [diff] [blame] | 178 | "//url", |
[email protected] | df3ecfde | 2014-05-20 21:52:34 | [diff] [blame] | 179 | ] |
[email protected] | 7e4c3314 | 2014-05-21 22:01:32 | [diff] [blame] | 180 | |
| 181 | if (!is_ios) { |
rockot | ac2a36e | 2015-11-20 17:56:54 | [diff] [blame] | 182 | public_deps += [ ":mojo_bindings" ] |
| 183 | |
[email protected] | 7e4c3314 | 2014-05-21 22:01:32 | [diff] [blame] | 184 | deps += [ |
[email protected] | 82428884 | 2014-06-20 05:26:59 | [diff] [blame] | 185 | "//cc", |
jyasskin | 710d15dfc | 2015-07-22 16:25:20 | [diff] [blame] | 186 | "//device/bluetooth", |
[email protected] | 7e4c3314 | 2014-05-21 22:01:32 | [diff] [blame] | 187 | "//ipc", |
[email protected] | 6486088 | 2014-08-04 23:44:17 | [diff] [blame] | 188 | "//ipc/mojo", |
scottmg | 7afc409 | 2014-12-03 19:22:42 | [diff] [blame] | 189 | |
[email protected] | 7e4c3314 | 2014-05-21 22:01:32 | [diff] [blame] | 190 | # TODO: the dependency on gl_in_process_context should be decoupled from |
| 191 | # content and moved to android_webview. See crbug.com/365797. |
tfarina | 13f5f5e5 | 2014-12-20 05:42:04 | [diff] [blame] | 192 | "//gpu/blink", |
[email protected] | 82428884 | 2014-06-20 05:26:59 | [diff] [blame] | 193 | "//gpu/command_buffer/client:gl_in_process_context", |
| 194 | "//gpu/command_buffer/client:gles2_c_lib", |
Brett Wilson | 8f132304 | 2014-09-11 16:58:56 | [diff] [blame] | 195 | "//gpu/command_buffer/client:gles2_cmd_helper", |
[email protected] | 82428884 | 2014-06-20 05:26:59 | [diff] [blame] | 196 | "//gpu/command_buffer/client:gles2_implementation", |
| 197 | "//gpu/command_buffer/service", |
| 198 | "//gpu/ipc", |
[email protected] | d7e69fa | 2014-07-24 21:19:28 | [diff] [blame] | 199 | "//gpu/skia_bindings", |
| 200 | "//media", |
| 201 | "//media:shared_memory_support", |
rockot | ac2a36e | 2015-11-20 17:56:54 | [diff] [blame] | 202 | "//media/midi", |
jam | 05a3de4 | 2015-05-14 22:56:10 | [diff] [blame] | 203 | "//mojo/application/public/interfaces", |
lionel.g.landwerlin | 57ba512 | 2015-08-14 16:26:32 | [diff] [blame] | 204 | "//mojo/common:common_base", |
[email protected] | 22fe91d | 2014-08-12 17:07:12 | [diff] [blame] | 205 | "//mojo/environment:chromium", |
[email protected] | 22fe91d | 2014-08-12 17:07:12 | [diff] [blame] | 206 | "//sandbox", |
pilgrim | 4af8c21 | 2014-09-05 17:30:15 | [diff] [blame] | 207 | "//storage/common", |
[email protected] | d7e69fa | 2014-07-24 21:19:28 | [diff] [blame] | 208 | "//third_party/WebKit/public:blink", |
blundell | 70fb54767 | 2015-01-19 17:18:33 | [diff] [blame] | 209 | "//third_party/mojo/src/mojo/edk/system", |
[email protected] | 82428884 | 2014-06-20 05:26:59 | [diff] [blame] | 210 | "//ui/gl", |
[email protected] | 7e4c3314 | 2014-05-21 22:01:32 | [diff] [blame] | 211 | ] |
| 212 | } |
| 213 | |
ben | 3f5f999 | 2015-11-19 10:38:30 | [diff] [blame] | 214 | defines = [] |
[email protected] | 7e4c3314 | 2014-05-21 22:01:32 | [diff] [blame] | 215 | include_dirs = [] |
[email protected] | 7e4c3314 | 2014-05-21 22:01:32 | [diff] [blame] | 216 | libs = [] |
| 217 | ldflags = [] |
| 218 | |
| 219 | if (is_android && use_seccomp_bpf) { |
| 220 | set_sources_assignment_filter([]) |
| 221 | sources += [ |
| 222 | "sandbox_linux/sandbox_bpf_base_policy_linux.cc", |
| 223 | "sandbox_linux/sandbox_bpf_base_policy_linux.h", |
| 224 | ] |
| 225 | set_sources_assignment_filter(sources_assignment_filter) |
| 226 | } |
| 227 | |
| 228 | if (is_mac) { |
| 229 | sources += [ |
scottmg | 7afc409 | 2014-12-03 19:22:42 | [diff] [blame] | 230 | "gpu/client/gpu_memory_buffer_impl_io_surface.cc", |
| 231 | "gpu/client/gpu_memory_buffer_impl_io_surface.h", |
jiangj | 2bd42fd | 2015-04-18 13:29:06 | [diff] [blame] | 232 | "gpu/gpu_memory_buffer_factory_io_surface.cc", |
| 233 | "gpu/gpu_memory_buffer_factory_io_surface.h", |
| 234 | "gpu/media/vt.h", |
| 235 | "gpu/media/vt_video_decode_accelerator.cc", |
| 236 | "gpu/media/vt_video_decode_accelerator.h", |
scottmg | 7afc409 | 2014-12-03 19:22:42 | [diff] [blame] | 237 | ] + get_target_outputs(":libvt_generate_stubs") |
dpranke | 380390f | 2014-11-21 06:08:53 | [diff] [blame] | 238 | |
scottmg | 7afc409 | 2014-12-03 19:22:42 | [diff] [blame] | 239 | sources -= [ "plugin_list_posix.cc" ] |
[email protected] | 7e4c3314 | 2014-05-21 22:01:32 | [diff] [blame] | 240 | |
[email protected] | 79ff77e6 | 2014-07-08 10:59:16 | [diff] [blame] | 241 | deps += [ |
dpranke | 380390f | 2014-11-21 06:08:53 | [diff] [blame] | 242 | ":libvt_generate_stubs", |
[email protected] | 79ff77e6 | 2014-07-08 10:59:16 | [diff] [blame] | 243 | "//content:resources", |
rockot | ac2a36e | 2015-11-20 17:56:54 | [diff] [blame] | 244 | "//content/app/resources", |
erg | a3c614c9 | 2015-04-03 17:47:51 | [diff] [blame] | 245 | "//third_party/WebKit/public:image_resources", |
[email protected] | 4eebe74d | 2014-08-13 02:54:46 | [diff] [blame] | 246 | "//third_party/WebKit/public:resources", |
tapted | 736e144 | 2014-12-01 22:25:46 | [diff] [blame] | 247 | "//ui/accelerated_widget_mac", |
[email protected] | 79ff77e6 | 2014-07-08 10:59:16 | [diff] [blame] | 248 | ] |
dpranke | 517335e | 2015-08-01 02:41:14 | [diff] [blame] | 249 | lib_dirs = [ "$mac_sdk_path/usr/lib" ] |
jiangj | 2bd42fd | 2015-04-18 13:29:06 | [diff] [blame] | 250 | libs += [ |
| 251 | "IOSurface.framework", |
| 252 | "OpenGL.framework", |
| 253 | "QuartzCore.framework", |
dpranke | 517335e | 2015-08-01 02:41:14 | [diff] [blame] | 254 | "sandbox", |
jiangj | 2bd42fd | 2015-04-18 13:29:06 | [diff] [blame] | 255 | ] |
[email protected] | 7e4c3314 | 2014-05-21 22:01:32 | [diff] [blame] | 256 | } |
| 257 | |
| 258 | if (is_android) { |
| 259 | sources += [ |
| 260 | "gpu/client/gpu_memory_buffer_impl_surface_texture.cc", |
| 261 | "gpu/client/gpu_memory_buffer_impl_surface_texture.h", |
reveman | 6f3e365 | 2014-10-10 03:32:00 | [diff] [blame] | 262 | "gpu/gpu_memory_buffer_factory_surface_texture.cc", |
| 263 | "gpu/gpu_memory_buffer_factory_surface_texture.h", |
[email protected] | 7e4c3314 | 2014-05-21 22:01:32 | [diff] [blame] | 264 | ] |
| 265 | |
James Robinson | 060f2e3 | 2014-09-10 22:31:37 | [diff] [blame] | 266 | deps += [ |
James Robinson | 060f2e3 | 2014-09-10 22:31:37 | [diff] [blame] | 267 | "//content/public/android:common_aidl", |
rockot | ac2a36e | 2015-11-20 17:56:54 | [diff] [blame] | 268 | "//content/public/android:jni", |
James Robinson | 060f2e3 | 2014-09-10 22:31:37 | [diff] [blame] | 269 | ] |
[email protected] | 7e4c3314 | 2014-05-21 22:01:32 | [diff] [blame] | 270 | |
| 271 | libs += [ "android" ] |
| 272 | } |
| 273 | |
agrieve | e786dac | 2015-12-02 14:45:22 | [diff] [blame^] | 274 | if (is_debug && !is_component_build && enable_plugins) { |
erg | 85ac931 | 2015-04-16 18:20:53 | [diff] [blame] | 275 | # Content depends on the PPAPI message logging stuff; if this isn't here, |
| 276 | # some unit test binaries won't compile. This only worked in release mode |
| 277 | # because logging is disabled there. |
| 278 | deps += [ "//ppapi/proxy:ipc_sources" ] |
| 279 | } |
| 280 | |
[email protected] | 7e4c3314 | 2014-05-21 22:01:32 | [diff] [blame] | 281 | if (is_ios) { |
| 282 | sources -= [ "user_agent.cc" ] |
| 283 | assert(false, "Need to add lots of conditions here") |
| 284 | } |
| 285 | |
reveman | bc2de2b | 2014-11-17 03:21:32 | [diff] [blame] | 286 | if (use_ozone) { |
dongseong.hwang | 2a785aa | 2015-10-19 17:04:57 | [diff] [blame] | 287 | configs += [ "//ui/ozone:vgem_map" ] |
| 288 | |
dpranke | acd282e | 2014-11-05 03:54:47 | [diff] [blame] | 289 | deps += [ |
dnicoara | dce73b03 | 2014-11-18 22:15:39 | [diff] [blame] | 290 | "//ui/ozone:ozone", |
| 291 | "//ui/ozone:ozone_base", |
dpranke | acd282e | 2014-11-05 03:54:47 | [diff] [blame] | 292 | ] |
reveman | bc2de2b | 2014-11-17 03:21:32 | [diff] [blame] | 293 | } else { |
| 294 | sources -= [ |
| 295 | "cursors/webcursor_ozone.cc", |
| 296 | "font_list_ozone.cc", |
dongseong.hwang | 6a80cc0 | 2015-07-24 11:55:11 | [diff] [blame] | 297 | "gpu/client/gpu_memory_buffer_impl_ozone_native_pixmap.cc", |
| 298 | "gpu/client/gpu_memory_buffer_impl_ozone_native_pixmap.h", |
| 299 | "gpu/gpu_memory_buffer_factory_ozone_native_pixmap.cc", |
| 300 | "gpu/gpu_memory_buffer_factory_ozone_native_pixmap.h", |
reveman | bc2de2b | 2014-11-17 03:21:32 | [diff] [blame] | 301 | ] |
[email protected] | 7e4c3314 | 2014-05-21 22:01:32 | [diff] [blame] | 302 | } |
| 303 | |
mfomitchev | 2977ebf | 2015-08-07 00:12:29 | [diff] [blame] | 304 | if (!use_aura || is_android) { |
[email protected] | 79ff77e6 | 2014-07-08 10:59:16 | [diff] [blame] | 305 | sources -= [ "cursors/webcursor_aura.cc" ] |
| 306 | } |
| 307 | |
[email protected] | 7e4c3314 | 2014-05-21 22:01:32 | [diff] [blame] | 308 | if (!use_aura || !use_x11) { |
| 309 | sources -= [ "cursors/webcursor_aurax11.cc" ] |
| 310 | } |
| 311 | |
| 312 | if (use_pango) { |
| 313 | configs += [ "//build/config/linux:pangocairo" ] |
| 314 | if (use_ozone) { |
| 315 | # If we're using pango, never use this ozone file (it was removed in all |
| 316 | # non-ozone cases above). |
| 317 | sources -= [ "font_list_ozone.cc" ] |
| 318 | } |
| 319 | } else { |
scottmg | 7afc409 | 2014-12-03 19:22:42 | [diff] [blame] | 320 | sources -= [ "font_list_pango.cc" ] |
[email protected] | 7e4c3314 | 2014-05-21 22:01:32 | [diff] [blame] | 321 | } |
| 322 | |
| 323 | if (use_x11) { |
brettw | 542f753 | 2015-04-06 22:35:45 | [diff] [blame] | 324 | configs += [ |
| 325 | "//build/config/linux:xcomposite", |
| 326 | "//third_party/khronos:khronos_headers", |
| 327 | ] |
[email protected] | 7e4c3314 | 2014-05-21 22:01:32 | [diff] [blame] | 328 | |
dpranke | 4327621 | 2015-02-20 02:55:19 | [diff] [blame] | 329 | if (current_cpu != "arm" || !is_chromeos) { |
Sadrul Habib Chowdhury | c351e95 | 2015-03-10 01:34:22 | [diff] [blame] | 330 | sources += [ "gpu/x_util.h" ] |
[email protected] | 7e4c3314 | 2014-05-21 22:01:32 | [diff] [blame] | 331 | } |
| 332 | } |
| 333 | |
| 334 | if (enable_plugins) { |
brettw | f7eb6ca | 2015-02-14 01:37:31 | [diff] [blame] | 335 | deps += [ "//ppapi/shared_impl" ] |
[email protected] | 7e4c3314 | 2014-05-21 22:01:32 | [diff] [blame] | 336 | } else { |
| 337 | sources -= [ |
thestig | c4cac8f | 2014-09-04 21:17:50 | [diff] [blame] | 338 | "pepper_file_util.cc", |
| 339 | "pepper_file_util.h", |
| 340 | "pepper_messages.h", |
[email protected] | 7e4c3314 | 2014-05-21 22:01:32 | [diff] [blame] | 341 | "pepper_plugin_list.cc", |
| 342 | "pepper_plugin_list.h", |
thestig | c4cac8f | 2014-09-04 21:17:50 | [diff] [blame] | 343 | "pepper_renderer_instance_data.cc", |
| 344 | "pepper_renderer_instance_data.h", |
| 345 | "plugin_list.cc", |
| 346 | "plugin_list.h", |
| 347 | "plugin_list_posix.cc", |
[email protected] | 7e4c3314 | 2014-05-21 22:01:32 | [diff] [blame] | 348 | "sandbox_util.cc", |
| 349 | ] |
| 350 | } |
| 351 | |
| 352 | if (is_android) { |
| 353 | sources += [ |
liberato | c765882 | 2015-09-14 23:54:19 | [diff] [blame] | 354 | "gpu/media/android_copying_backing_strategy.cc", |
| 355 | "gpu/media/android_copying_backing_strategy.h", |
xhwang | f351092 | 2015-10-21 22:29:34 | [diff] [blame] | 356 | "gpu/media/android_deferred_rendering_backing_strategy.cc", |
| 357 | "gpu/media/android_deferred_rendering_backing_strategy.h", |
[email protected] | 7e4c3314 | 2014-05-21 22:01:32 | [diff] [blame] | 358 | "gpu/media/android_video_decode_accelerator.cc", |
| 359 | "gpu/media/android_video_decode_accelerator.h", |
xhwang | f351092 | 2015-10-21 22:29:34 | [diff] [blame] | 360 | "gpu/media/avda_codec_image.cc", |
| 361 | "gpu/media/avda_codec_image.h", |
liberato | c765882 | 2015-09-14 23:54:19 | [diff] [blame] | 362 | "gpu/media/avda_return_on_failure.h", |
xhwang | f351092 | 2015-10-21 22:29:34 | [diff] [blame] | 363 | "gpu/media/avda_shared_state.h", |
| 364 | "gpu/media/avda_state_provider.h", |
[email protected] | 7e4c3314 | 2014-05-21 22:01:32 | [diff] [blame] | 365 | ] |
[email protected] | 7e4c3314 | 2014-05-21 22:01:32 | [diff] [blame] | 366 | |
| 367 | if (enable_webrtc) { |
| 368 | deps += [ "//third_party/libyuv" ] |
pkotwicz | 699de14 | 2015-10-22 15:26:51 | [diff] [blame] | 369 | sources += [ |
| 370 | "gpu/media/android_video_encode_accelerator.cc", |
| 371 | "gpu/media/android_video_encode_accelerator.h", |
| 372 | ] |
[email protected] | 7e4c3314 | 2014-05-21 22:01:32 | [diff] [blame] | 373 | } |
xhwang | 13eab74 | 2015-11-18 20:29:37 | [diff] [blame] | 374 | |
| 375 | if (enable_mojo_media == "gpu") { |
| 376 | deps += [ "//media/mojo/services:application" ] |
| 377 | } |
[email protected] | 7e4c3314 | 2014-05-21 22:01:32 | [diff] [blame] | 378 | } |
| 379 | |
lionel.g.landwerlin | 2c653de3 | 2014-12-25 19:05:02 | [diff] [blame] | 380 | if (is_chromeos) { |
posciak | d9ee533e | 2015-04-11 10:32:38 | [diff] [blame] | 381 | sources += [ |
| 382 | "gpu/media/accelerated_video_decoder.h", |
| 383 | "gpu/media/h264_decoder.cc", |
| 384 | "gpu/media/h264_decoder.h", |
| 385 | "gpu/media/h264_dpb.cc", |
| 386 | "gpu/media/h264_dpb.h", |
posciak | ef403af | 2015-05-06 06:32:41 | [diff] [blame] | 387 | "gpu/media/vp8_decoder.cc", |
| 388 | "gpu/media/vp8_decoder.h", |
| 389 | "gpu/media/vp8_picture.cc", |
| 390 | "gpu/media/vp8_picture.h", |
posciak | d94b2b08 | 2015-09-18 04:03:40 | [diff] [blame] | 391 | "gpu/media/vp9_decoder.cc", |
| 392 | "gpu/media/vp9_decoder.h", |
| 393 | "gpu/media/vp9_picture.cc", |
| 394 | "gpu/media/vp9_picture.h", |
posciak | d9ee533e | 2015-04-11 10:32:38 | [diff] [blame] | 395 | ] |
henryhsu | 5159267 | 2015-02-08 05:01:00 | [diff] [blame] | 396 | if (use_v4lplugin) { |
| 397 | defines += [ "USE_LIBV4L2" ] |
| 398 | sources += get_target_outputs(":libv4l2_generate_stubs") |
| 399 | deps += [ ":libv4l2_generate_stubs" ] |
| 400 | } |
henryhsu | 712f1ac | 2015-01-09 11:25:45 | [diff] [blame] | 401 | if (use_v4l2_codec) { |
| 402 | defines += [ "USE_V4L2_CODEC" ] |
[email protected] | 7e4c3314 | 2014-05-21 22:01:32 | [diff] [blame] | 403 | sources += [ |
emircan | 2090fc2b | 2015-02-26 17:50:43 | [diff] [blame] | 404 | "gpu/media/generic_v4l2_device.cc", |
| 405 | "gpu/media/generic_v4l2_device.h", |
emircan | 2090fc2b | 2015-02-26 17:50:43 | [diff] [blame] | 406 | "gpu/media/v4l2_device.cc", |
| 407 | "gpu/media/v4l2_device.h", |
[email protected] | 7e4c3314 | 2014-05-21 22:01:32 | [diff] [blame] | 408 | "gpu/media/v4l2_image_processor.cc", |
| 409 | "gpu/media/v4l2_image_processor.h", |
henryhsu | 840b38ed | 2015-07-09 05:29:48 | [diff] [blame] | 410 | "gpu/media/v4l2_jpeg_decode_accelerator.cc", |
| 411 | "gpu/media/v4l2_jpeg_decode_accelerator.h", |
henryhsu | 5159267 | 2015-02-08 05:01:00 | [diff] [blame] | 412 | "gpu/media/v4l2_slice_video_decode_accelerator.cc", |
| 413 | "gpu/media/v4l2_slice_video_decode_accelerator.h", |
[email protected] | 7e4c3314 | 2014-05-21 22:01:32 | [diff] [blame] | 414 | "gpu/media/v4l2_video_decode_accelerator.cc", |
| 415 | "gpu/media/v4l2_video_decode_accelerator.h", |
[email protected] | 7e4c3314 | 2014-05-21 22:01:32 | [diff] [blame] | 416 | "gpu/media/v4l2_video_encode_accelerator.cc", |
| 417 | "gpu/media/v4l2_video_encode_accelerator.h", |
| 418 | ] |
scottmg | 7afc409 | 2014-12-03 19:22:42 | [diff] [blame] | 419 | libs = [ |
| 420 | "EGL", |
| 421 | "GLESv2", |
| 422 | ] |
henryhsu | 5159267 | 2015-02-08 05:01:00 | [diff] [blame] | 423 | } |
dpranke | 4327621 | 2015-02-20 02:55:19 | [diff] [blame] | 424 | if (current_cpu == "arm") { |
henryhsu | 5159267 | 2015-02-08 05:01:00 | [diff] [blame] | 425 | sources += [ |
emircan | 2090fc2b | 2015-02-26 17:50:43 | [diff] [blame] | 426 | "gpu/media/tegra_v4l2_device.cc", |
| 427 | "gpu/media/tegra_v4l2_device.h", |
henryhsu | 5159267 | 2015-02-08 05:01:00 | [diff] [blame] | 428 | ] |
lionel.g.landwerlin | 2c653de3 | 2014-12-25 19:05:02 | [diff] [blame] | 429 | } |
dpranke | 4327621 | 2015-02-20 02:55:19 | [diff] [blame] | 430 | if (current_cpu != "arm") { |
[email protected] | 7e4c3314 | 2014-05-21 22:01:32 | [diff] [blame] | 431 | sources += [ |
scottmg | 7afc409 | 2014-12-03 19:22:42 | [diff] [blame] | 432 | "gpu/media/va_surface.h", |
kcwu | 2bdb8a4 | 2015-06-18 10:44:49 | [diff] [blame] | 433 | "gpu/media/vaapi_jpeg_decode_accelerator.cc", |
| 434 | "gpu/media/vaapi_jpeg_decode_accelerator.h", |
| 435 | "gpu/media/vaapi_jpeg_decoder.cc", |
| 436 | "gpu/media/vaapi_jpeg_decoder.h", |
lionel.g.landwerlin | 2c653de3 | 2014-12-25 19:05:02 | [diff] [blame] | 437 | "gpu/media/vaapi_picture.cc", |
| 438 | "gpu/media/vaapi_picture.h", |
scottmg | 7afc409 | 2014-12-03 19:22:42 | [diff] [blame] | 439 | "gpu/media/vaapi_video_decode_accelerator.cc", |
| 440 | "gpu/media/vaapi_video_decode_accelerator.h", |
| 441 | "gpu/media/vaapi_video_encode_accelerator.cc", |
| 442 | "gpu/media/vaapi_video_encode_accelerator.h", |
| 443 | "gpu/media/vaapi_wrapper.cc", |
| 444 | "gpu/media/vaapi_wrapper.h", |
| 445 | ] + get_target_outputs(":libva_generate_stubs") |
mukai | f7571f3 | 2014-09-30 19:19:10 | [diff] [blame] | 446 | configs += [ |
| 447 | "//third_party/libva:libva_config", |
| 448 | "//third_party/libyuv:libyuv_config", |
| 449 | ] |
| 450 | deps += [ |
| 451 | ":libva_generate_stubs", |
| 452 | "//media", |
| 453 | "//third_party/libyuv", |
| 454 | ] |
lionel.g.landwerlin | 2c653de3 | 2014-12-25 19:05:02 | [diff] [blame] | 455 | if (use_x11) { |
| 456 | sources += [ |
| 457 | "gpu/media/vaapi_tfp_picture.cc", |
| 458 | "gpu/media/vaapi_tfp_picture.h", |
| 459 | ] |
| 460 | } |
lionel.g.landwerlin | b056abc | 2015-01-02 23:50:52 | [diff] [blame] | 461 | if (use_ozone) { |
| 462 | sources += [ |
| 463 | "gpu/media/vaapi_drm_picture.cc", |
| 464 | "gpu/media/vaapi_drm_picture.h", |
| 465 | ] |
| 466 | } |
[email protected] | 7e4c3314 | 2014-05-21 22:01:32 | [diff] [blame] | 467 | } |
| 468 | } |
| 469 | |
| 470 | if (is_win) { |
| 471 | sources += [ |
| 472 | "gpu/media/dxva_video_decode_accelerator.cc", |
| 473 | "gpu/media/dxva_video_decode_accelerator.h", |
| 474 | ] |
brettw | 542f753 | 2015-04-06 22:35:45 | [diff] [blame] | 475 | configs += [ "//third_party/khronos:khronos_headers" ] |
scottmg | 7afc409 | 2014-12-03 19:22:42 | [diff] [blame] | 476 | deps += [ "//ui/gl" ] |
vchigrin | fd9bd7de | 2015-01-14 08:35:18 | [diff] [blame] | 477 | libs += [ |
| 478 | "d3d9.lib", |
ananta | 3b01db9 | 2015-02-28 00:39:18 | [diff] [blame] | 479 | "d3d11.lib", |
vchigrin | fd9bd7de | 2015-01-14 08:35:18 | [diff] [blame] | 480 | "dxva2.lib", |
| 481 | "strmiids.lib", |
| 482 | "mf.lib", |
| 483 | "mfplat.lib", |
| 484 | "mfuuid.lib", |
| 485 | ] |
| 486 | ldflags += [ |
| 487 | "/DELAYLOAD:d3d9.dll", |
ananta | 3b01db9 | 2015-02-28 00:39:18 | [diff] [blame] | 488 | "/DELAYLOAD:d3d11.dll", |
vchigrin | fd9bd7de | 2015-01-14 08:35:18 | [diff] [blame] | 489 | "/DELAYLOAD:dxva2.dll", |
| 490 | "/DELAYLOAD:mf.dll", |
| 491 | "/DELAYLOAD:mfplat.dll", |
| 492 | ] |
[email protected] | 7e4c3314 | 2014-05-21 22:01:32 | [diff] [blame] | 493 | |
| 494 | # TODO(GYP): extract_xinput action. |
| 495 | } |
| 496 | |
| 497 | if (!is_win || !use_aura) { |
| 498 | sources -= [ "cursors/webcursor_aurawin.cc" ] |
| 499 | } |
[email protected] | 7e4c3314 | 2014-05-21 22:01:32 | [diff] [blame] | 500 | |
| 501 | if (use_seccomp_bpf) { |
| 502 | defines += [ "USE_SECCOMP_BPF" ] |
| 503 | } else { |
| 504 | if (is_linux) { |
| 505 | sources -= [ |
| 506 | "sandbox_linux/bpf_cros_arm_gpu_policy_linux.cc", |
| 507 | "sandbox_linux/bpf_cros_arm_gpu_policy_linux.h", |
| 508 | "sandbox_linux/bpf_gpu_policy_linux.cc", |
| 509 | "sandbox_linux/bpf_gpu_policy_linux.h", |
| 510 | "sandbox_linux/bpf_ppapi_policy_linux.cc", |
| 511 | "sandbox_linux/bpf_ppapi_policy_linux.h", |
| 512 | "sandbox_linux/bpf_renderer_policy_linux.cc", |
| 513 | "sandbox_linux/bpf_renderer_policy_linux.h", |
[email protected] | 692a954 | 2014-06-25 23:04:47 | [diff] [blame] | 514 | "sandbox_linux/bpf_utility_policy_linux.cc", |
| 515 | "sandbox_linux/bpf_utility_policy_linux.h", |
[email protected] | 7e4c3314 | 2014-05-21 22:01:32 | [diff] [blame] | 516 | "sandbox_linux/sandbox_bpf_base_policy_linux.cc", |
| 517 | "sandbox_linux/sandbox_bpf_base_policy_linux.h", |
| 518 | ] |
| 519 | } |
| 520 | if (is_android) { |
| 521 | sources -= [ |
| 522 | "sandbox_linux/android/sandbox_bpf_base_policy_android.cc", |
| 523 | "sandbox_linux/android/sandbox_bpf_base_policy_android.h", |
| 524 | ] |
| 525 | } |
| 526 | } |
[email protected] | df3ecfde | 2014-05-20 21:52:34 | [diff] [blame] | 527 | } |
[email protected] | 7e4c3314 | 2014-05-21 22:01:32 | [diff] [blame] | 528 | |
[email protected] | 189add5 | 2014-05-28 16:51:44 | [diff] [blame] | 529 | mojom("mojo_bindings") { |
| 530 | sources = [ |
rockot | 775ce0d | 2015-01-27 18:35:01 | [diff] [blame] | 531 | "application_setup.mojom", |
iclelland | 53476852 | 2015-04-30 18:32:00 | [diff] [blame] | 532 | "background_sync_service.mojom", |
blundell | c57b93f | 2014-10-29 13:19:57 | [diff] [blame] | 533 | "geolocation_service.mojom", |
halton.huo | ca2eabd | 2015-07-06 08:17:40 | [diff] [blame] | 534 | "image_downloader/image_downloader.mojom", |
mlamouri | 4ebe69f | 2014-11-14 17:25:21 | [diff] [blame] | 535 | "permission_service.mojom", |
avayvod | bca35fad | 2015-01-29 20:20:57 | [diff] [blame] | 536 | "presentation/presentation_service.mojom", |
rockot | b814a58 | 2015-06-05 00:30:52 | [diff] [blame] | 537 | "process_control.mojom", |
fsamuel | 6c6da023 | 2015-11-26 05:13:46 | [diff] [blame] | 538 | "render_widget_window_tree_client_factory.mojom", |
rockot | ac2a36e | 2015-11-20 17:56:54 | [diff] [blame] | 539 | "routed_service_provider.mojom", |
mek | d4ff9b5 | 2015-06-29 21:02:23 | [diff] [blame] | 540 | "service_port_service.mojom", |
mek | 27c9d74 | 2015-07-16 18:30:18 | [diff] [blame] | 541 | "service_worker/embedded_worker_setup.mojom", |
bajones | 0244353 | 2015-06-22 21:17:40 | [diff] [blame] | 542 | "vr_service.mojom", |
alogvinov | f50445a | 2015-10-30 13:00:12 | [diff] [blame] | 543 | "wake_lock_service.mojom", |
[email protected] | 189add5 | 2014-05-28 16:51:44 | [diff] [blame] | 544 | ] |
[email protected] | e205123 | 2014-06-30 17:45:45 | [diff] [blame] | 545 | |
rockot | b814a58 | 2015-06-05 00:30:52 | [diff] [blame] | 546 | import_dirs = [ "//mojo/services" ] |
| 547 | |
[email protected] | e205123 | 2014-06-30 17:45:45 | [diff] [blame] | 548 | deps = [ |
vabr | 90450d7 | 2015-12-01 16:13:54 | [diff] [blame] | 549 | "//components/mus/public/interfaces", |
blundell | c57b93f | 2014-10-29 13:19:57 | [diff] [blame] | 550 | "//content/public/common:mojo_bindings", |
jam | 05a3de4 | 2015-05-14 22:56:10 | [diff] [blame] | 551 | "//mojo/application/public/interfaces", |
halton.huo | ca2eabd | 2015-07-06 08:17:40 | [diff] [blame] | 552 | "//skia/public/interfaces", |
| 553 | "//ui/mojo/geometry:interfaces", |
[email protected] | e205123 | 2014-06-30 17:45:45 | [diff] [blame] | 554 | ] |
[email protected] | 189add5 | 2014-05-28 16:51:44 | [diff] [blame] | 555 | } |