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.
5 import("//build/config/features.gni")
6 import("//build/config/ui.gni")
7 import("//content/common/common.gni")
8 import("//third_party/mojo/src/mojo/public/tools/bindings/mojom.gni")
10 import("//build/config/mac/mac_sdk.gni")
13 if (is_chromeos && current_cpu != "arm") {
14 action("libva_generate_stubs") {
15 extra_header = "gpu/media/va_stub_header.fragment"
17 script = "../../tools/generate_stubs/generate_stubs.py"
25 sources += [ "gpu/media/va_x11.sigs" ]
28 sources += [ "gpu/media/va_drm.sigs" ]
30 stubs_filename_root = "va_stubs"
33 "$target_gen_dir/gpu/media/$stubs_filename_root.cc",
34 "$target_gen_dir/gpu/media/$stubs_filename_root.h",
38 rebase_path("$target_gen_dir/gpu/media", root_build_dir),
40 rebase_path("$target_gen_dir/gpu/media", root_build_dir),
44 rebase_path(extra_header, root_build_dir),
48 "content/common/gpu/media",
51 args += rebase_path(sources, root_build_dir)
55 if (is_chromeos && use_v4lplugin) {
56 action("libv4l2_generate_stubs") {
57 extra_header = "gpu/media/v4l2_stub_header.fragment"
59 script = "../../tools/generate_stubs/generate_stubs.py"
66 stubs_filename_root = "v4l2_stubs"
69 "$target_gen_dir/gpu/media/$stubs_filename_root.cc",
70 "$target_gen_dir/gpu/media/$stubs_filename_root.h",
74 rebase_path("$target_gen_dir/gpu/media", root_build_dir),
76 rebase_path("$target_gen_dir/gpu/media", root_build_dir),
80 rebase_path(extra_header, root_build_dir),
84 "content/common/gpu/media",
87 args += rebase_path(sources, root_build_dir)
92 action("libvt_generate_stubs") {
93 extra_header = "gpu/media/vt_stubs_header.fragment"
95 script = "../../tools/generate_stubs/generate_stubs.py"
102 stubs_filename_root = "vt_stubs"
105 "$target_gen_dir/gpu/media/$stubs_filename_root.cc",
106 "$target_gen_dir/gpu/media/$stubs_filename_root.h",
110 rebase_path("$target_gen_dir/gpu/media", root_build_dir),
112 rebase_path("$target_gen_dir/gpu/media", root_build_dir),
116 rebase_path(extra_header, root_build_dir),
120 "content/common/gpu/media",
123 args += rebase_path(sources, root_build_dir)
127 source_set("common") {
128 # Only the public target should depend on this. All other targets (even
129 # internal content ones) should depend on the public one.
130 visibility = [ "//content/public/common:common_sources" ]
132 sources = rebase_path(content_common_gypi_values.private_common_sources,
137 "//content:content_implementation",
138 "//build/config:precompiled_headers",
139 "//build/config/compiler:no_size_t_to_int_warning",
143 "//gpu/command_buffer/common",
144 "//third_party/WebKit/public:blink_headers",
148 "//build/util:webkit_version",
149 "//components/tracing",
150 "//components/tracing:startup_tracing",
151 "//gpu/command_buffer/client:gles2_interface",
152 "//gpu/command_buffer/common:gles2_utils",
156 "//ui/accessibility",
159 "//ui/events/ipc:events_ipc",
163 "//ui/shell_dialogs",
165 "//third_party/libjingle",
171 "//device/bluetooth",
175 # TODO: the dependency on gl_in_process_context should be decoupled from
176 # content and moved to android_webview. See crbug.com/365797.
178 "//gpu/command_buffer/client:gl_in_process_context",
179 "//gpu/command_buffer/client:gles2_c_lib",
180 "//gpu/command_buffer/client:gles2_cmd_helper",
181 "//gpu/command_buffer/client:gles2_implementation",
182 "//gpu/command_buffer/service",
184 "//gpu/skia_bindings",
187 "//media:shared_memory_support",
188 "//mojo/application/public/interfaces",
189 "//mojo/environment:chromium",
192 "//third_party/WebKit/public:blink",
193 "//third_party/mojo/src/mojo/edk/system",
204 if (is_android && use_seccomp_bpf) {
205 set_sources_assignment_filter([])
207 "sandbox_linux/sandbox_bpf_base_policy_linux.cc",
208 "sandbox_linux/sandbox_bpf_base_policy_linux.h",
210 set_sources_assignment_filter(sources_assignment_filter)
215 "gpu/client/gpu_memory_buffer_impl_io_surface.cc",
216 "gpu/client/gpu_memory_buffer_impl_io_surface.h",
217 "gpu/gpu_memory_buffer_factory_io_surface.cc",
218 "gpu/gpu_memory_buffer_factory_io_surface.h",
220 "gpu/media/vt_video_decode_accelerator.cc",
221 "gpu/media/vt_video_decode_accelerator.h",
222 ] + get_target_outputs(":libvt_generate_stubs")
224 sources -= [ "plugin_list_posix.cc" ]
227 ":libvt_generate_stubs",
228 "//content/app/resources",
229 "//content:resources",
230 "//third_party/WebKit/public:image_resources",
231 "//third_party/WebKit/public:resources",
232 "//ui/accelerated_widget_mac",
234 lib_dirs = [ "$mac_sdk_path/usr/lib" ]
236 "IOSurface.framework",
238 "QuartzCore.framework",
245 "gpu/client/gpu_memory_buffer_impl_surface_texture.cc",
246 "gpu/client/gpu_memory_buffer_impl_surface_texture.h",
247 "gpu/gpu_memory_buffer_factory_surface_texture.cc",
248 "gpu/gpu_memory_buffer_factory_surface_texture.h",
252 "//content/public/android:jni",
253 "//content/public/android:common_aidl",
256 libs += [ "android" ]
259 if (is_debug && !is_component_build) {
260 # Content depends on the PPAPI message logging stuff; if this isn't here,
261 # some unit test binaries won't compile. This only worked in release mode
262 # because logging is disabled there.
263 deps += [ "//ppapi/proxy:ipc_sources" ]
267 sources -= [ "user_agent.cc" ]
268 assert(false, "Need to add lots of conditions here")
274 "//ui/ozone:ozone_base",
278 "cursors/webcursor_ozone.cc",
279 "font_list_ozone.cc",
280 "gpu/client/gpu_memory_buffer_impl_ozone_native_pixmap.cc",
281 "gpu/client/gpu_memory_buffer_impl_ozone_native_pixmap.h",
282 "gpu/gpu_memory_buffer_factory_ozone_native_pixmap.cc",
283 "gpu/gpu_memory_buffer_factory_ozone_native_pixmap.h",
287 if (!use_aura || is_android) {
288 sources -= [ "cursors/webcursor_aura.cc" ]
291 if (!use_aura || !use_x11) {
292 sources -= [ "cursors/webcursor_aurax11.cc" ]
296 configs += [ "//build/config/linux:pangocairo" ]
298 # If we're using pango, never use this ozone file (it was removed in all
299 # non-ozone cases above).
300 sources -= [ "font_list_ozone.cc" ]
303 sources -= [ "font_list_pango.cc" ]
308 "//build/config/linux:xcomposite",
309 "//third_party/khronos:khronos_headers",
312 if (current_cpu != "arm" || !is_chromeos) {
313 sources += [ "gpu/x_util.h" ]
317 if (enable_plugins) {
318 deps += [ "//ppapi/shared_impl" ]
321 "pepper_file_util.cc",
322 "pepper_file_util.h",
324 "pepper_plugin_list.cc",
325 "pepper_plugin_list.h",
326 "pepper_renderer_instance_data.cc",
327 "pepper_renderer_instance_data.h",
330 "plugin_list_posix.cc",
337 "gpu/media/android_video_decode_accelerator.cc",
338 "gpu/media/android_video_decode_accelerator.h",
342 deps += [ "//third_party/libyuv" ]
348 "gpu/media/accelerated_video_decoder.h",
349 "gpu/media/h264_decoder.cc",
350 "gpu/media/h264_decoder.h",
351 "gpu/media/h264_dpb.cc",
352 "gpu/media/h264_dpb.h",
353 "gpu/media/vp8_decoder.cc",
354 "gpu/media/vp8_decoder.h",
355 "gpu/media/vp8_picture.cc",
356 "gpu/media/vp8_picture.h",
359 defines += [ "USE_LIBV4L2" ]
360 sources += get_target_outputs(":libv4l2_generate_stubs")
361 deps += [ ":libv4l2_generate_stubs" ]
363 if (use_v4l2_codec) {
364 defines += [ "USE_V4L2_CODEC" ]
366 "gpu/media/generic_v4l2_device.cc",
367 "gpu/media/generic_v4l2_device.h",
368 "gpu/media/v4l2_device.cc",
369 "gpu/media/v4l2_device.h",
370 "gpu/media/v4l2_image_processor.cc",
371 "gpu/media/v4l2_image_processor.h",
372 "gpu/media/v4l2_jpeg_decode_accelerator.cc",
373 "gpu/media/v4l2_jpeg_decode_accelerator.h",
374 "gpu/media/v4l2_slice_video_decode_accelerator.cc",
375 "gpu/media/v4l2_slice_video_decode_accelerator.h",
376 "gpu/media/v4l2_video_decode_accelerator.cc",
377 "gpu/media/v4l2_video_decode_accelerator.h",
378 "gpu/media/v4l2_video_encode_accelerator.cc",
379 "gpu/media/v4l2_video_encode_accelerator.h",
386 if (current_cpu == "arm") {
388 "gpu/media/tegra_v4l2_device.cc",
389 "gpu/media/tegra_v4l2_device.h",
392 if (current_cpu != "arm") {
394 "gpu/media/va_surface.h",
395 "gpu/media/vaapi_jpeg_decode_accelerator.cc",
396 "gpu/media/vaapi_jpeg_decode_accelerator.h",
397 "gpu/media/vaapi_jpeg_decoder.cc",
398 "gpu/media/vaapi_jpeg_decoder.h",
399 "gpu/media/vaapi_picture.cc",
400 "gpu/media/vaapi_picture.h",
401 "gpu/media/vaapi_video_decode_accelerator.cc",
402 "gpu/media/vaapi_video_decode_accelerator.h",
403 "gpu/media/vaapi_video_encode_accelerator.cc",
404 "gpu/media/vaapi_video_encode_accelerator.h",
405 "gpu/media/vaapi_wrapper.cc",
406 "gpu/media/vaapi_wrapper.h",
407 ] + get_target_outputs(":libva_generate_stubs")
409 "//third_party/libva:libva_config",
410 "//third_party/libyuv:libyuv_config",
413 ":libva_generate_stubs",
415 "//third_party/libyuv",
419 "gpu/media/vaapi_tfp_picture.cc",
420 "gpu/media/vaapi_tfp_picture.h",
425 "gpu/media/vaapi_drm_picture.cc",
426 "gpu/media/vaapi_drm_picture.h",
434 "gpu/media/dxva_video_decode_accelerator.cc",
435 "gpu/media/dxva_video_decode_accelerator.h",
437 configs += [ "//third_party/khronos:khronos_headers" ]
438 deps += [ "//ui/gl" ]
449 "/DELAYLOAD:d3d9.dll",
450 "/DELAYLOAD:d3d11.dll",
451 "/DELAYLOAD:dxva2.dll",
453 "/DELAYLOAD:mfplat.dll",
456 # TODO(GYP): extract_xinput action.
459 if (!is_win || !use_aura) {
460 sources -= [ "cursors/webcursor_aurawin.cc" ]
463 if (use_seccomp_bpf) {
464 defines += [ "USE_SECCOMP_BPF" ]
468 "sandbox_linux/bpf_cros_arm_gpu_policy_linux.cc",
469 "sandbox_linux/bpf_cros_arm_gpu_policy_linux.h",
470 "sandbox_linux/bpf_gpu_policy_linux.cc",
471 "sandbox_linux/bpf_gpu_policy_linux.h",
472 "sandbox_linux/bpf_ppapi_policy_linux.cc",
473 "sandbox_linux/bpf_ppapi_policy_linux.h",
474 "sandbox_linux/bpf_renderer_policy_linux.cc",
475 "sandbox_linux/bpf_renderer_policy_linux.h",
476 "sandbox_linux/bpf_utility_policy_linux.cc",
477 "sandbox_linux/bpf_utility_policy_linux.h",
478 "sandbox_linux/sandbox_bpf_base_policy_linux.cc",
479 "sandbox_linux/sandbox_bpf_base_policy_linux.h",
484 "sandbox_linux/android/sandbox_bpf_base_policy_android.cc",
485 "sandbox_linux/android/sandbox_bpf_base_policy_android.h",
491 mojom("mojo_bindings") {
493 "application_setup.mojom",
494 "background_sync_service.mojom",
495 "geolocation_service.mojom",
496 "image_downloader/image_downloader.mojom",
497 "permission_service.mojom",
498 "presentation/presentation_service.mojom",
499 "process_control.mojom",
500 "render_frame_setup.mojom",
501 "service_port_service.mojom",
502 "service_worker/embedded_worker_setup.mojom",
506 import_dirs = [ "//mojo/services" ]
509 "//content/public/common:mojo_bindings",
510 "//mojo/application/public/interfaces",
511 "//skia/public/interfaces",
512 "//ui/mojo/geometry:interfaces",