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("//mojo/public/tools/bindings/mojom.gni")
10 if (is_chromeos && cpu_arch != "arm") {
11 action("libva_generate_stubs") {
12 extra_header = "gpu/media/va_stub_header.fragment"
14 script = "../../tools/generate_stubs/generate_stubs.py"
22 sources += [ "gpu/media/va_x11.sigs" ]
25 sources += [ "gpu/media/va_drm.sigs" ]
27 stubs_filename_root = "va_stubs"
30 "$target_gen_dir/gpu/media/$stubs_filename_root.cc",
31 "$target_gen_dir/gpu/media/$stubs_filename_root.h",
35 rebase_path("$target_gen_dir/gpu/media", root_build_dir),
37 rebase_path("$target_gen_dir/gpu/media", root_build_dir),
41 rebase_path(extra_header, root_build_dir),
45 "content/common/gpu/media",
48 args += rebase_path(sources, root_build_dir)
53 action("libvt_generate_stubs") {
54 extra_header = "gpu/media/vt_stubs_header.fragment"
56 script = "../../tools/generate_stubs/generate_stubs.py"
63 stubs_filename_root = "vt_stubs"
66 "$target_gen_dir/gpu/media/$stubs_filename_root.cc",
67 "$target_gen_dir/gpu/media/$stubs_filename_root.h",
71 rebase_path("$target_gen_dir/gpu/media", root_build_dir),
73 rebase_path("$target_gen_dir/gpu/media", root_build_dir),
77 rebase_path(extra_header, root_build_dir),
81 "content/common/gpu/media",
84 args += rebase_path(sources, root_build_dir)
88 source_set("common") {
89 # Only the public target should depend on this. All other targets (even
90 # internal content ones) should depend on the public one.
91 visibility = [ "//content/public/common:common_sources" ]
93 sources = rebase_path(content_common_gypi_values.private_common_sources,
97 configs += [ "//content:content_implementation" ]
100 "//gpu/command_buffer/common",
101 "//third_party/WebKit/public:blink_headers",
105 "//build/util:webkit_version",
106 "//components/tracing",
107 "//gpu/command_buffer/client:gles2_interface",
108 "//gpu/command_buffer/client:gpu_memory_buffer_manager",
112 "//ui/accessibility",
118 "//ui/shell_dialogs",
120 "//third_party/libjingle",
129 # TODO: the dependency on gl_in_process_context should be decoupled from
130 # content and moved to android_webview. See crbug.com/365797.
132 "//gpu/command_buffer/client:gl_in_process_context",
133 "//gpu/command_buffer/client:gles2_c_lib",
134 "//gpu/command_buffer/client:gles2_cmd_helper",
135 "//gpu/command_buffer/client:gles2_implementation",
136 "//gpu/command_buffer/service",
138 "//gpu/skia_bindings",
140 "//media:shared_memory_support",
142 "//mojo/environment:chromium",
143 "//mojo/public/interfaces/application",
147 "//third_party/WebKit/public:blink",
149 "//webkit/common/gpu",
158 if (is_android && use_seccomp_bpf) {
159 set_sources_assignment_filter([])
161 "sandbox_linux/sandbox_bpf_base_policy_linux.cc",
162 "sandbox_linux/sandbox_bpf_base_policy_linux.h",
164 set_sources_assignment_filter(sources_assignment_filter)
169 "gpu/client/gpu_memory_buffer_impl_io_surface.cc",
170 "gpu/client/gpu_memory_buffer_impl_io_surface.h",
171 ] + get_target_outputs(":libvt_generate_stubs")
173 sources -= [ "plugin_list_posix.cc" ]
176 ":libvt_generate_stubs",
177 "//content/app/resources",
178 "//content:resources",
179 "//third_party/WebKit/public:resources",
180 "//ui/accelerated_widget_mac",
182 libs += [ "QuartzCore.framework" ]
187 "gpu/client/gpu_memory_buffer_impl_surface_texture.cc",
188 "gpu/client/gpu_memory_buffer_impl_surface_texture.h",
189 "gpu/gpu_memory_buffer_factory_surface_texture.cc",
190 "gpu/gpu_memory_buffer_factory_surface_texture.h",
194 "//content/public/android:jni",
195 "//content/public/android:common_aidl",
198 libs += [ "android" ]
202 sources -= [ "user_agent.cc" ]
203 assert(false, "Need to add lots of conditions here")
209 "//ui/ozone:ozone_base",
214 "cursors/webcursor_ozone.cc",
215 "font_list_ozone.cc",
216 "gpu/client/gpu_memory_buffer_impl_ozone_native_buffer.cc",
217 "gpu/client/gpu_memory_buffer_impl_ozone_native_buffer.h",
218 "gpu/gpu_memory_buffer_factory_ozone_native_buffer.cc",
219 "gpu/gpu_memory_buffer_factory_ozone_native_buffer.h",
224 sources -= [ "cursors/webcursor_aura.cc" ]
227 if (!use_aura || !use_x11) {
228 sources -= [ "cursors/webcursor_aurax11.cc" ]
232 configs += [ "//build/config/linux:pangocairo" ]
234 # If we're using pango, never use this ozone file (it was removed in all
235 # non-ozone cases above).
236 sources -= [ "font_list_ozone.cc" ]
239 sources -= [ "font_list_pango.cc" ]
243 include_dirs += [ "//third_party/khronos" ]
244 configs += [ "//build/config/linux:xcomposite" ]
246 if (cpu_arch != "arm" || !is_chromeos) {
254 if (enable_plugins) {
255 deps += [ "//ppapi:ppapi_shared" ]
258 "pepper_file_util.cc",
259 "pepper_file_util.h",
261 "pepper_plugin_list.cc",
262 "pepper_plugin_list.h",
263 "pepper_renderer_instance_data.cc",
264 "pepper_renderer_instance_data.h",
267 "plugin_list_posix.cc",
274 "gpu/media/android_video_decode_accelerator.cc",
275 "gpu/media/android_video_decode_accelerator.h",
279 deps += [ "//third_party/libyuv" ]
284 if (cpu_arch == "arm" && use_x11) {
286 "gpu/media/exynos_v4l2_video_device.cc",
287 "gpu/media/exynos_v4l2_video_device.h",
288 "gpu/media/tegra_v4l2_video_device.cc",
289 "gpu/media/tegra_v4l2_video_device.h",
290 "gpu/media/v4l2_image_processor.cc",
291 "gpu/media/v4l2_image_processor.h",
292 "gpu/media/v4l2_video_decode_accelerator.cc",
293 "gpu/media/v4l2_video_decode_accelerator.h",
294 "gpu/media/v4l2_video_device.cc",
295 "gpu/media/v4l2_video_device.h",
296 "gpu/media/v4l2_video_encode_accelerator.cc",
297 "gpu/media/v4l2_video_encode_accelerator.h",
304 if (cpu_arch != "arm") {
306 "gpu/media/h264_dpb.cc",
307 "gpu/media/h264_dpb.h",
308 "gpu/media/va_surface.h",
309 "gpu/media/vaapi_h264_decoder.cc",
310 "gpu/media/vaapi_h264_decoder.h",
311 "gpu/media/vaapi_picture.cc",
312 "gpu/media/vaapi_picture.h",
313 "gpu/media/vaapi_video_decode_accelerator.cc",
314 "gpu/media/vaapi_video_decode_accelerator.h",
315 "gpu/media/vaapi_video_encode_accelerator.cc",
316 "gpu/media/vaapi_video_encode_accelerator.h",
317 "gpu/media/vaapi_wrapper.cc",
318 "gpu/media/vaapi_wrapper.h",
319 ] + get_target_outputs(":libva_generate_stubs")
321 "//third_party/libva:libva_config",
322 "//third_party/libyuv:libyuv_config",
325 ":libva_generate_stubs",
327 "//third_party/libyuv",
331 "gpu/media/vaapi_tfp_picture.cc",
332 "gpu/media/vaapi_tfp_picture.h",
337 "gpu/media/vaapi_drm_picture.cc",
338 "gpu/media/vaapi_drm_picture.h",
346 "gpu/media/dxva_video_decode_accelerator.cc",
347 "gpu/media/dxva_video_decode_accelerator.h",
349 include_dirs += [ "//third_party/khronos" ]
350 deps += [ "//ui/gl" ]
352 # TODO(GYP): extract_xinput action.
355 if (!is_win || !use_aura) {
356 sources -= [ "cursors/webcursor_aurawin.cc" ]
359 if (use_seccomp_bpf) {
360 defines += [ "USE_SECCOMP_BPF" ]
364 "sandbox_linux/bpf_cros_arm_gpu_policy_linux.cc",
365 "sandbox_linux/bpf_cros_arm_gpu_policy_linux.h",
366 "sandbox_linux/bpf_gpu_policy_linux.cc",
367 "sandbox_linux/bpf_gpu_policy_linux.h",
368 "sandbox_linux/bpf_ppapi_policy_linux.cc",
369 "sandbox_linux/bpf_ppapi_policy_linux.h",
370 "sandbox_linux/bpf_renderer_policy_linux.cc",
371 "sandbox_linux/bpf_renderer_policy_linux.h",
372 "sandbox_linux/bpf_utility_policy_linux.cc",
373 "sandbox_linux/bpf_utility_policy_linux.h",
374 "sandbox_linux/sandbox_bpf_base_policy_linux.cc",
375 "sandbox_linux/sandbox_bpf_base_policy_linux.h",
380 "sandbox_linux/android/sandbox_bpf_base_policy_android.cc",
381 "sandbox_linux/android/sandbox_bpf_base_policy_android.h",
387 mojom("mojo_bindings") {
389 "geolocation_service.mojom",
390 "permission_service.mojom",
391 "render_frame_setup.mojom",
395 "//content/public/common:mojo_bindings",
396 "//mojo/public/interfaces/application:application",