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/common:common_base",
190 "//mojo/environment:chromium",
193 "//third_party/WebKit/public:blink",
194 "//third_party/mojo/src/mojo/edk/system",
205 if (is_android && use_seccomp_bpf) {
206 set_sources_assignment_filter([])
208 "sandbox_linux/sandbox_bpf_base_policy_linux.cc",
209 "sandbox_linux/sandbox_bpf_base_policy_linux.h",
211 set_sources_assignment_filter(sources_assignment_filter)
216 "gpu/client/gpu_memory_buffer_impl_io_surface.cc",
217 "gpu/client/gpu_memory_buffer_impl_io_surface.h",
218 "gpu/gpu_memory_buffer_factory_io_surface.cc",
219 "gpu/gpu_memory_buffer_factory_io_surface.h",
221 "gpu/media/vt_video_decode_accelerator.cc",
222 "gpu/media/vt_video_decode_accelerator.h",
223 ] + get_target_outputs(":libvt_generate_stubs")
225 sources -= [ "plugin_list_posix.cc" ]
228 ":libvt_generate_stubs",
229 "//content/app/resources",
230 "//content:resources",
231 "//third_party/WebKit/public:image_resources",
232 "//third_party/WebKit/public:resources",
233 "//ui/accelerated_widget_mac",
235 lib_dirs = [ "$mac_sdk_path/usr/lib" ]
237 "IOSurface.framework",
239 "QuartzCore.framework",
246 "gpu/client/gpu_memory_buffer_impl_surface_texture.cc",
247 "gpu/client/gpu_memory_buffer_impl_surface_texture.h",
248 "gpu/gpu_memory_buffer_factory_surface_texture.cc",
249 "gpu/gpu_memory_buffer_factory_surface_texture.h",
253 "//content/public/android:jni",
254 "//content/public/android:common_aidl",
257 libs += [ "android" ]
260 if (is_debug && !is_component_build) {
261 # Content depends on the PPAPI message logging stuff; if this isn't here,
262 # some unit test binaries won't compile. This only worked in release mode
263 # because logging is disabled there.
264 deps += [ "//ppapi/proxy:ipc_sources" ]
268 sources -= [ "user_agent.cc" ]
269 assert(false, "Need to add lots of conditions here")
275 "//ui/ozone:ozone_base",
279 "cursors/webcursor_ozone.cc",
280 "font_list_ozone.cc",
281 "gpu/client/gpu_memory_buffer_impl_ozone_native_pixmap.cc",
282 "gpu/client/gpu_memory_buffer_impl_ozone_native_pixmap.h",
283 "gpu/gpu_memory_buffer_factory_ozone_native_pixmap.cc",
284 "gpu/gpu_memory_buffer_factory_ozone_native_pixmap.h",
288 if (!use_aura || is_android) {
289 sources -= [ "cursors/webcursor_aura.cc" ]
292 if (!use_aura || !use_x11) {
293 sources -= [ "cursors/webcursor_aurax11.cc" ]
297 configs += [ "//build/config/linux:pangocairo" ]
299 # If we're using pango, never use this ozone file (it was removed in all
300 # non-ozone cases above).
301 sources -= [ "font_list_ozone.cc" ]
304 sources -= [ "font_list_pango.cc" ]
309 "//build/config/linux:xcomposite",
310 "//third_party/khronos:khronos_headers",
313 if (current_cpu != "arm" || !is_chromeos) {
314 sources += [ "gpu/x_util.h" ]
318 if (enable_plugins) {
319 deps += [ "//ppapi/shared_impl" ]
322 "pepper_file_util.cc",
323 "pepper_file_util.h",
325 "pepper_plugin_list.cc",
326 "pepper_plugin_list.h",
327 "pepper_renderer_instance_data.cc",
328 "pepper_renderer_instance_data.h",
331 "plugin_list_posix.cc",
338 "gpu/media/android_video_decode_accelerator.cc",
339 "gpu/media/android_video_decode_accelerator.h",
343 deps += [ "//third_party/libyuv" ]
349 "gpu/media/accelerated_video_decoder.h",
350 "gpu/media/h264_decoder.cc",
351 "gpu/media/h264_decoder.h",
352 "gpu/media/h264_dpb.cc",
353 "gpu/media/h264_dpb.h",
354 "gpu/media/vp8_decoder.cc",
355 "gpu/media/vp8_decoder.h",
356 "gpu/media/vp8_picture.cc",
357 "gpu/media/vp8_picture.h",
360 defines += [ "USE_LIBV4L2" ]
361 sources += get_target_outputs(":libv4l2_generate_stubs")
362 deps += [ ":libv4l2_generate_stubs" ]
364 if (use_v4l2_codec) {
365 defines += [ "USE_V4L2_CODEC" ]
367 "gpu/media/generic_v4l2_device.cc",
368 "gpu/media/generic_v4l2_device.h",
369 "gpu/media/v4l2_device.cc",
370 "gpu/media/v4l2_device.h",
371 "gpu/media/v4l2_image_processor.cc",
372 "gpu/media/v4l2_image_processor.h",
373 "gpu/media/v4l2_jpeg_decode_accelerator.cc",
374 "gpu/media/v4l2_jpeg_decode_accelerator.h",
375 "gpu/media/v4l2_slice_video_decode_accelerator.cc",
376 "gpu/media/v4l2_slice_video_decode_accelerator.h",
377 "gpu/media/v4l2_video_decode_accelerator.cc",
378 "gpu/media/v4l2_video_decode_accelerator.h",
379 "gpu/media/v4l2_video_encode_accelerator.cc",
380 "gpu/media/v4l2_video_encode_accelerator.h",
387 if (current_cpu == "arm") {
389 "gpu/media/tegra_v4l2_device.cc",
390 "gpu/media/tegra_v4l2_device.h",
393 if (current_cpu != "arm") {
395 "gpu/media/va_surface.h",
396 "gpu/media/vaapi_jpeg_decode_accelerator.cc",
397 "gpu/media/vaapi_jpeg_decode_accelerator.h",
398 "gpu/media/vaapi_jpeg_decoder.cc",
399 "gpu/media/vaapi_jpeg_decoder.h",
400 "gpu/media/vaapi_picture.cc",
401 "gpu/media/vaapi_picture.h",
402 "gpu/media/vaapi_video_decode_accelerator.cc",
403 "gpu/media/vaapi_video_decode_accelerator.h",
404 "gpu/media/vaapi_video_encode_accelerator.cc",
405 "gpu/media/vaapi_video_encode_accelerator.h",
406 "gpu/media/vaapi_wrapper.cc",
407 "gpu/media/vaapi_wrapper.h",
408 ] + get_target_outputs(":libva_generate_stubs")
410 "//third_party/libva:libva_config",
411 "//third_party/libyuv:libyuv_config",
414 ":libva_generate_stubs",
416 "//third_party/libyuv",
420 "gpu/media/vaapi_tfp_picture.cc",
421 "gpu/media/vaapi_tfp_picture.h",
426 "gpu/media/vaapi_drm_picture.cc",
427 "gpu/media/vaapi_drm_picture.h",
435 "gpu/media/dxva_video_decode_accelerator.cc",
436 "gpu/media/dxva_video_decode_accelerator.h",
438 configs += [ "//third_party/khronos:khronos_headers" ]
439 deps += [ "//ui/gl" ]
450 "/DELAYLOAD:d3d9.dll",
451 "/DELAYLOAD:d3d11.dll",
452 "/DELAYLOAD:dxva2.dll",
454 "/DELAYLOAD:mfplat.dll",
457 # TODO(GYP): extract_xinput action.
460 if (!is_win || !use_aura) {
461 sources -= [ "cursors/webcursor_aurawin.cc" ]
464 if (use_seccomp_bpf) {
465 defines += [ "USE_SECCOMP_BPF" ]
469 "sandbox_linux/bpf_cros_arm_gpu_policy_linux.cc",
470 "sandbox_linux/bpf_cros_arm_gpu_policy_linux.h",
471 "sandbox_linux/bpf_gpu_policy_linux.cc",
472 "sandbox_linux/bpf_gpu_policy_linux.h",
473 "sandbox_linux/bpf_ppapi_policy_linux.cc",
474 "sandbox_linux/bpf_ppapi_policy_linux.h",
475 "sandbox_linux/bpf_renderer_policy_linux.cc",
476 "sandbox_linux/bpf_renderer_policy_linux.h",
477 "sandbox_linux/bpf_utility_policy_linux.cc",
478 "sandbox_linux/bpf_utility_policy_linux.h",
479 "sandbox_linux/sandbox_bpf_base_policy_linux.cc",
480 "sandbox_linux/sandbox_bpf_base_policy_linux.h",
485 "sandbox_linux/android/sandbox_bpf_base_policy_android.cc",
486 "sandbox_linux/android/sandbox_bpf_base_policy_android.h",
492 mojom("mojo_bindings") {
494 "application_setup.mojom",
495 "background_sync_service.mojom",
496 "geolocation_service.mojom",
497 "image_downloader/image_downloader.mojom",
498 "permission_service.mojom",
499 "presentation/presentation_service.mojom",
500 "process_control.mojom",
501 "render_frame_setup.mojom",
502 "service_port_service.mojom",
503 "service_worker/embedded_worker_setup.mojom",
507 import_dirs = [ "//mojo/services" ]
510 "//content/public/common:mojo_bindings",
511 "//mojo/application/public/interfaces",
512 "//skia/public/interfaces",
513 "//ui/mojo/geometry:interfaces",