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_copying_backing_strategy.cc",
339 "gpu/media/android_copying_backing_strategy.h",
340 "gpu/media/android_video_decode_accelerator.cc",
341 "gpu/media/android_video_decode_accelerator.h",
342 "gpu/media/avda_return_on_failure.h",
346 deps += [ "//third_party/libyuv" ]
352 "gpu/media/accelerated_video_decoder.h",
353 "gpu/media/h264_decoder.cc",
354 "gpu/media/h264_decoder.h",
355 "gpu/media/h264_dpb.cc",
356 "gpu/media/h264_dpb.h",
357 "gpu/media/vp8_decoder.cc",
358 "gpu/media/vp8_decoder.h",
359 "gpu/media/vp8_picture.cc",
360 "gpu/media/vp8_picture.h",
361 "gpu/media/vp9_decoder.cc",
362 "gpu/media/vp9_decoder.h",
363 "gpu/media/vp9_picture.cc",
364 "gpu/media/vp9_picture.h",
367 defines += [ "USE_LIBV4L2" ]
368 sources += get_target_outputs(":libv4l2_generate_stubs")
369 deps += [ ":libv4l2_generate_stubs" ]
371 if (use_v4l2_codec) {
372 defines += [ "USE_V4L2_CODEC" ]
374 "gpu/media/generic_v4l2_device.cc",
375 "gpu/media/generic_v4l2_device.h",
376 "gpu/media/v4l2_device.cc",
377 "gpu/media/v4l2_device.h",
378 "gpu/media/v4l2_image_processor.cc",
379 "gpu/media/v4l2_image_processor.h",
380 "gpu/media/v4l2_jpeg_decode_accelerator.cc",
381 "gpu/media/v4l2_jpeg_decode_accelerator.h",
382 "gpu/media/v4l2_slice_video_decode_accelerator.cc",
383 "gpu/media/v4l2_slice_video_decode_accelerator.h",
384 "gpu/media/v4l2_video_decode_accelerator.cc",
385 "gpu/media/v4l2_video_decode_accelerator.h",
386 "gpu/media/v4l2_video_encode_accelerator.cc",
387 "gpu/media/v4l2_video_encode_accelerator.h",
394 if (current_cpu == "arm") {
396 "gpu/media/tegra_v4l2_device.cc",
397 "gpu/media/tegra_v4l2_device.h",
400 if (current_cpu != "arm") {
402 "gpu/media/va_surface.h",
403 "gpu/media/vaapi_jpeg_decode_accelerator.cc",
404 "gpu/media/vaapi_jpeg_decode_accelerator.h",
405 "gpu/media/vaapi_jpeg_decoder.cc",
406 "gpu/media/vaapi_jpeg_decoder.h",
407 "gpu/media/vaapi_picture.cc",
408 "gpu/media/vaapi_picture.h",
409 "gpu/media/vaapi_video_decode_accelerator.cc",
410 "gpu/media/vaapi_video_decode_accelerator.h",
411 "gpu/media/vaapi_video_encode_accelerator.cc",
412 "gpu/media/vaapi_video_encode_accelerator.h",
413 "gpu/media/vaapi_wrapper.cc",
414 "gpu/media/vaapi_wrapper.h",
415 ] + get_target_outputs(":libva_generate_stubs")
417 "//third_party/libva:libva_config",
418 "//third_party/libyuv:libyuv_config",
421 ":libva_generate_stubs",
423 "//third_party/libyuv",
427 "gpu/media/vaapi_tfp_picture.cc",
428 "gpu/media/vaapi_tfp_picture.h",
433 "gpu/media/vaapi_drm_picture.cc",
434 "gpu/media/vaapi_drm_picture.h",
442 "gpu/media/dxva_video_decode_accelerator.cc",
443 "gpu/media/dxva_video_decode_accelerator.h",
445 configs += [ "//third_party/khronos:khronos_headers" ]
446 deps += [ "//ui/gl" ]
457 "/DELAYLOAD:d3d9.dll",
458 "/DELAYLOAD:d3d11.dll",
459 "/DELAYLOAD:dxva2.dll",
461 "/DELAYLOAD:mfplat.dll",
464 # TODO(GYP): extract_xinput action.
467 if (!is_win || !use_aura) {
468 sources -= [ "cursors/webcursor_aurawin.cc" ]
471 if (use_seccomp_bpf) {
472 defines += [ "USE_SECCOMP_BPF" ]
476 "sandbox_linux/bpf_cros_arm_gpu_policy_linux.cc",
477 "sandbox_linux/bpf_cros_arm_gpu_policy_linux.h",
478 "sandbox_linux/bpf_gpu_policy_linux.cc",
479 "sandbox_linux/bpf_gpu_policy_linux.h",
480 "sandbox_linux/bpf_ppapi_policy_linux.cc",
481 "sandbox_linux/bpf_ppapi_policy_linux.h",
482 "sandbox_linux/bpf_renderer_policy_linux.cc",
483 "sandbox_linux/bpf_renderer_policy_linux.h",
484 "sandbox_linux/bpf_utility_policy_linux.cc",
485 "sandbox_linux/bpf_utility_policy_linux.h",
486 "sandbox_linux/sandbox_bpf_base_policy_linux.cc",
487 "sandbox_linux/sandbox_bpf_base_policy_linux.h",
492 "sandbox_linux/android/sandbox_bpf_base_policy_android.cc",
493 "sandbox_linux/android/sandbox_bpf_base_policy_android.h",
499 mojom("mojo_bindings") {
501 "application_setup.mojom",
502 "background_sync_service.mojom",
503 "geolocation_service.mojom",
504 "image_downloader/image_downloader.mojom",
505 "permission_service.mojom",
506 "presentation/presentation_service.mojom",
507 "process_control.mojom",
508 "render_frame_setup.mojom",
509 "service_port_service.mojom",
510 "service_worker/embedded_worker_setup.mojom",
514 import_dirs = [ "//mojo/services" ]
517 "//content/public/common:mojo_bindings",
518 "//mojo/application/public/interfaces",
519 "//skia/public/interfaces",
520 "//ui/mojo/geometry:interfaces",