OLD | NEW |
1 # Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 import("//build/config/features.gni") | 5 import("//build/config/features.gni") |
6 import("//build/config/ui.gni") | 6 import("//build/config/ui.gni") |
7 import("//content/common/common.gni") | 7 import("//content/common/common.gni") |
8 import("//media/media_options.gni") | 8 import("//media/media_options.gni") |
9 import("//mojo/public/tools/bindings/mojom.gni") | 9 import("//mojo/public/tools/bindings/mojom.gni") |
10 if (is_mac) { | 10 if (is_mac) { |
11 import("//build/config/mac/mac_sdk.gni") | 11 import("//build/config/mac/mac_sdk.gni") |
12 } | 12 } |
13 | 13 |
14 if (is_chromeos && current_cpu != "arm") { | |
15 action("libva_generate_stubs") { | |
16 extra_header = "gpu/media/va_stub_header.fragment" | |
17 | |
18 script = "../../tools/generate_stubs/generate_stubs.py" | |
19 sources = [ | |
20 "gpu/media/va.sigs", | |
21 ] | |
22 inputs = [ | |
23 extra_header, | |
24 ] | |
25 if (use_x11) { | |
26 sources += [ "gpu/media/va_x11.sigs" ] | |
27 } | |
28 if (use_ozone) { | |
29 sources += [ "gpu/media/va_drm.sigs" ] | |
30 } | |
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 = [ | |
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", | |
50 ] | |
51 | |
52 args += rebase_path(sources, root_build_dir) | |
53 } | |
54 } | |
55 | |
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 | |
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" | |
97 sources = [ | |
98 "gpu/media/vt.sig", | |
99 ] | |
100 inputs = [ | |
101 extra_header, | |
102 ] | |
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 = [ | |
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", | |
122 ] | |
123 | |
124 args += rebase_path(sources, root_build_dir) | |
125 } | |
126 } | |
127 | |
128 source_set("common") { | 14 source_set("common") { |
129 # Targets external to content should always link to the public API. | 15 # Targets external to content should always link to the public API. |
130 # In addition, targets outside of the content component (shell and tests) | 16 # In addition, targets outside of the content component (shell and tests) |
131 # must not link to this because it will duplicate the code in the component | 17 # must not link to this because it will duplicate the code in the component |
132 # build. | 18 # build. |
133 visibility = [ "//content/*" ] | 19 visibility = [ "//content/*" ] |
134 | 20 |
135 sources = rebase_path(content_common_gypi_values.private_common_sources, | 21 sources = rebase_path(content_common_gypi_values.private_common_sources, |
136 ".", | 22 ".", |
137 "//content") | 23 "//content") |
(...skipping 22 matching lines...) Expand all Loading... |
160 "//device/bluetooth", | 46 "//device/bluetooth", |
161 "//gpu", | 47 "//gpu", |
162 "//gpu/command_buffer/client:gles2_c_lib", | 48 "//gpu/command_buffer/client:gles2_c_lib", |
163 "//gpu/command_buffer/client:gles2_cmd_helper", | 49 "//gpu/command_buffer/client:gles2_cmd_helper", |
164 "//gpu/command_buffer/client:gles2_implementation", | 50 "//gpu/command_buffer/client:gles2_implementation", |
165 "//gpu/command_buffer/client:gles2_interface", | 51 "//gpu/command_buffer/client:gles2_interface", |
166 "//gpu/command_buffer/common:gles2_utils", | 52 "//gpu/command_buffer/common:gles2_utils", |
167 "//gpu/command_buffer/service", | 53 "//gpu/command_buffer/service", |
168 "//gpu/ipc/client", | 54 "//gpu/ipc/client", |
169 "//gpu/ipc/common", | 55 "//gpu/ipc/common", |
170 | |
171 # TODO(markdittmer): This should be removed once content/common/gpu/media | |
172 # is refactored into media/ipc. | |
173 "//gpu/ipc/service", | |
174 "//gpu/skia_bindings", | 56 "//gpu/skia_bindings", |
175 "//ipc", | 57 "//ipc", |
176 "//ipc/mojo", | 58 "//ipc/mojo", |
177 "//media", | 59 "//media", |
178 "//media:shared_memory_support", | 60 "//media:shared_memory_support", |
179 "//media/gpu/ipc/client", | 61 "//media/gpu/ipc/client", |
180 "//media/gpu/ipc/common", | 62 "//media/gpu/ipc/common", |
181 "//media/midi", | 63 "//media/midi", |
182 "//mojo/common:common_base", | 64 "//mojo/common:common_base", |
183 "//mojo/edk/system", | 65 "//mojo/edk/system", |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
216 if (is_android && use_seccomp_bpf) { | 98 if (is_android && use_seccomp_bpf) { |
217 set_sources_assignment_filter([]) | 99 set_sources_assignment_filter([]) |
218 sources += [ | 100 sources += [ |
219 "sandbox_linux/sandbox_bpf_base_policy_linux.cc", | 101 "sandbox_linux/sandbox_bpf_base_policy_linux.cc", |
220 "sandbox_linux/sandbox_bpf_base_policy_linux.h", | 102 "sandbox_linux/sandbox_bpf_base_policy_linux.h", |
221 ] | 103 ] |
222 set_sources_assignment_filter(sources_assignment_filter) | 104 set_sources_assignment_filter(sources_assignment_filter) |
223 } | 105 } |
224 | 106 |
225 if (is_mac) { | 107 if (is_mac) { |
226 sources += [ | 108 deps += [ "//sandbox/mac:seatbelt" ] |
227 "gpu/media/vt_mac.h", | |
228 "gpu/media/vt_video_decode_accelerator_mac.cc", | |
229 "gpu/media/vt_video_decode_accelerator_mac.h", | |
230 "gpu/media/vt_video_encode_accelerator_mac.cc", | |
231 "gpu/media/vt_video_encode_accelerator_mac.h", | |
232 ] + get_target_outputs(":libvt_generate_stubs") | |
233 | |
234 deps += [ | |
235 ":libvt_generate_stubs", | |
236 "//content:resources", | |
237 "//content/app/resources", | |
238 "//sandbox/mac:seatbelt", | |
239 "//third_party/WebKit/public:image_resources", | |
240 "//third_party/WebKit/public:resources", | |
241 "//ui/accelerated_widget_mac", | |
242 ] | |
243 lib_dirs = [ "$mac_sdk_path/usr/lib" ] | |
244 libs += [ | |
245 "AVFoundation.framework", | |
246 "CoreMedia.framework", | |
247 "CoreVideo.framework", | |
248 "IOSurface.framework", | |
249 "OpenGL.framework", | |
250 "QuartzCore.framework", | |
251 "sandbox", | |
252 ] | |
253 } | 109 } |
254 | 110 |
255 if (is_android) { | 111 if (is_android) { |
256 deps += [ | 112 deps += [ |
257 "//content/public/android:common_aidl", | 113 "//content/public/android:common_aidl", |
258 "//content/public/android:jni", | 114 "//content/public/android:jni", |
259 ] | 115 ] |
260 | 116 |
261 libs += [ "android" ] | 117 libs += [ "android" ] |
262 } | 118 } |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
305 "pepper_messages.h", | 161 "pepper_messages.h", |
306 "pepper_plugin_list.cc", | 162 "pepper_plugin_list.cc", |
307 "pepper_plugin_list.h", | 163 "pepper_plugin_list.h", |
308 "pepper_renderer_instance_data.cc", | 164 "pepper_renderer_instance_data.cc", |
309 "pepper_renderer_instance_data.h", | 165 "pepper_renderer_instance_data.h", |
310 "plugin_list.cc", | 166 "plugin_list.cc", |
311 "plugin_list.h", | 167 "plugin_list.h", |
312 ] | 168 ] |
313 } | 169 } |
314 | 170 |
315 if (is_android) { | |
316 sources += [ | |
317 "gpu/media/android_copying_backing_strategy.cc", | |
318 "gpu/media/android_copying_backing_strategy.h", | |
319 "gpu/media/android_deferred_rendering_backing_strategy.cc", | |
320 "gpu/media/android_deferred_rendering_backing_strategy.h", | |
321 "gpu/media/android_video_decode_accelerator.cc", | |
322 "gpu/media/android_video_decode_accelerator.h", | |
323 "gpu/media/avda_codec_image.cc", | |
324 "gpu/media/avda_codec_image.h", | |
325 "gpu/media/avda_return_on_failure.h", | |
326 "gpu/media/avda_shared_state.cc", | |
327 "gpu/media/avda_shared_state.h", | |
328 "gpu/media/avda_state_provider.h", | |
329 ] | |
330 | |
331 if (enable_webrtc) { | |
332 deps += [ "//third_party/libyuv" ] | |
333 sources += [ | |
334 "gpu/media/android_video_encode_accelerator.cc", | |
335 "gpu/media/android_video_encode_accelerator.h", | |
336 ] | |
337 } | |
338 | |
339 if (mojo_media_host == "gpu") { | |
340 deps += [ "//media/mojo/services:cdm_service" ] | |
341 } | |
342 } | |
343 | |
344 if (is_chromeos) { | |
345 sources += [ | |
346 "gpu/media/accelerated_video_decoder.h", | |
347 "gpu/media/h264_decoder.cc", | |
348 "gpu/media/h264_decoder.h", | |
349 "gpu/media/h264_dpb.cc", | |
350 "gpu/media/h264_dpb.h", | |
351 "gpu/media/vp8_decoder.cc", | |
352 "gpu/media/vp8_decoder.h", | |
353 "gpu/media/vp8_picture.cc", | |
354 "gpu/media/vp8_picture.h", | |
355 "gpu/media/vp9_decoder.cc", | |
356 "gpu/media/vp9_decoder.h", | |
357 "gpu/media/vp9_picture.cc", | |
358 "gpu/media/vp9_picture.h", | |
359 ] | |
360 if (use_v4lplugin) { | |
361 defines += [ "USE_LIBV4L2" ] | |
362 sources += get_target_outputs(":libv4l2_generate_stubs") | |
363 deps += [ ":libv4l2_generate_stubs" ] | |
364 } | |
365 if (use_v4l2_codec) { | |
366 defines += [ "USE_V4L2_CODEC" ] | |
367 deps += [ "//third_party/libyuv" ] | |
368 sources += [ | |
369 "gpu/media/generic_v4l2_device.cc", | |
370 "gpu/media/generic_v4l2_device.h", | |
371 "gpu/media/v4l2_device.cc", | |
372 "gpu/media/v4l2_device.h", | |
373 "gpu/media/v4l2_image_processor.cc", | |
374 "gpu/media/v4l2_image_processor.h", | |
375 "gpu/media/v4l2_jpeg_decode_accelerator.cc", | |
376 "gpu/media/v4l2_jpeg_decode_accelerator.h", | |
377 "gpu/media/v4l2_slice_video_decode_accelerator.cc", | |
378 "gpu/media/v4l2_slice_video_decode_accelerator.h", | |
379 "gpu/media/v4l2_video_decode_accelerator.cc", | |
380 "gpu/media/v4l2_video_decode_accelerator.h", | |
381 "gpu/media/v4l2_video_encode_accelerator.cc", | |
382 "gpu/media/v4l2_video_encode_accelerator.h", | |
383 ] | |
384 libs = [ | |
385 "EGL", | |
386 "GLESv2", | |
387 ] | |
388 } | |
389 if (current_cpu == "arm") { | |
390 sources += [ | |
391 "gpu/media/tegra_v4l2_device.cc", | |
392 "gpu/media/tegra_v4l2_device.h", | |
393 ] | |
394 } | |
395 if (current_cpu != "arm") { | |
396 sources += [ | |
397 "gpu/media/va_surface.h", | |
398 "gpu/media/vaapi_jpeg_decode_accelerator.cc", | |
399 "gpu/media/vaapi_jpeg_decode_accelerator.h", | |
400 "gpu/media/vaapi_jpeg_decoder.cc", | |
401 "gpu/media/vaapi_jpeg_decoder.h", | |
402 "gpu/media/vaapi_picture.cc", | |
403 "gpu/media/vaapi_picture.h", | |
404 "gpu/media/vaapi_video_decode_accelerator.cc", | |
405 "gpu/media/vaapi_video_decode_accelerator.h", | |
406 "gpu/media/vaapi_video_encode_accelerator.cc", | |
407 "gpu/media/vaapi_video_encode_accelerator.h", | |
408 "gpu/media/vaapi_wrapper.cc", | |
409 "gpu/media/vaapi_wrapper.h", | |
410 ] + get_target_outputs(":libva_generate_stubs") | |
411 configs += [ | |
412 "//third_party/libva:libva_config", | |
413 "//third_party/libyuv:libyuv_config", | |
414 ] | |
415 deps += [ | |
416 ":libva_generate_stubs", | |
417 "//media", | |
418 "//third_party/libyuv", | |
419 ] | |
420 if (use_x11) { | |
421 sources += [ | |
422 "gpu/media/vaapi_tfp_picture.cc", | |
423 "gpu/media/vaapi_tfp_picture.h", | |
424 ] | |
425 } | |
426 if (use_ozone) { | |
427 sources += [ | |
428 "gpu/media/vaapi_drm_picture.cc", | |
429 "gpu/media/vaapi_drm_picture.h", | |
430 ] | |
431 } | |
432 } | |
433 } | |
434 | |
435 if (is_win) { | |
436 sources += [ | |
437 "gpu/media/dxva_video_decode_accelerator_win.cc", | |
438 "gpu/media/dxva_video_decode_accelerator_win.h", | |
439 ] | |
440 configs += [ "//third_party/khronos:khronos_headers" ] | |
441 deps += [ "//ui/gl" ] | |
442 libs += [ | |
443 "d3d9.lib", | |
444 "d3d11.lib", | |
445 "dxva2.lib", | |
446 "strmiids.lib", | |
447 "mf.lib", | |
448 "mfplat.lib", | |
449 "mfuuid.lib", | |
450 ] | |
451 ldflags += [ | |
452 "/DELAYLOAD:d3d9.dll", | |
453 "/DELAYLOAD:d3d11.dll", | |
454 "/DELAYLOAD:dxva2.dll", | |
455 "/DELAYLOAD:mf.dll", | |
456 "/DELAYLOAD:mfplat.dll", | |
457 ] | |
458 | |
459 # TODO(GYP): extract_xinput action. | |
460 } | |
461 | |
462 if (!is_win || !use_aura) { | 171 if (!is_win || !use_aura) { |
463 sources -= [ "cursors/webcursor_aurawin.cc" ] | 172 sources -= [ "cursors/webcursor_aurawin.cc" ] |
464 } | 173 } |
465 | 174 |
466 if (use_seccomp_bpf) { | 175 if (use_seccomp_bpf) { |
467 defines += [ "USE_SECCOMP_BPF" ] | 176 defines += [ "USE_SECCOMP_BPF" ] |
468 } else { | 177 } else { |
469 if (is_linux) { | 178 if (is_linux) { |
470 sources -= [ | 179 sources -= [ |
471 "sandbox_linux/bpf_cros_arm_gpu_policy_linux.cc", | 180 "sandbox_linux/bpf_cros_arm_gpu_policy_linux.cc", |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
528 "//components/leveldb/public/interfaces", | 237 "//components/leveldb/public/interfaces", |
529 "//components/mus/public/interfaces", | 238 "//components/mus/public/interfaces", |
530 "//content/public/common:mojo_bindings", | 239 "//content/public/common:mojo_bindings", |
531 "//services/shell/public/interfaces", | 240 "//services/shell/public/interfaces", |
532 "//skia/public/interfaces", | 241 "//skia/public/interfaces", |
533 "//third_party/WebKit/public:mojo_bindings", | 242 "//third_party/WebKit/public:mojo_bindings", |
534 "//ui/mojo/geometry:interfaces", | 243 "//ui/mojo/geometry:interfaces", |
535 "//url/mojo:url_mojom_origin", | 244 "//url/mojo:url_mojom_origin", |
536 ] | 245 ] |
537 } | 246 } |
OLD | NEW |