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 && use_x11 && 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"
21 stubs_filename_root = "va_stubs"
24 "$target_gen_dir/gpu/media/$stubs_filename_root.cc",
25 "$target_gen_dir/gpu/media/$stubs_filename_root.h",
29 rebase_path("$target_gen_dir/gpu/media", root_build_dir),
31 rebase_path("$target_gen_dir/gpu/media", root_build_dir),
35 rebase_path(extra_header, root_build_dir),
39 "content/common/gpu/media",
42 args += rebase_path(sources, root_build_dir)
47 action("libvt_generate_stubs") {
48 extra_header = "gpu/media/vt_stubs_header.fragment"
50 script = "../../tools/generate_stubs/generate_stubs.py"
57 stubs_filename_root = "vt_stubs"
60 "$target_gen_dir/gpu/media/$stubs_filename_root.cc",
61 "$target_gen_dir/gpu/media/$stubs_filename_root.h",
65 rebase_path("$target_gen_dir/gpu/media", root_build_dir),
67 rebase_path("$target_gen_dir/gpu/media", root_build_dir),
71 rebase_path(extra_header, root_build_dir),
75 "content/common/gpu/media",
78 args += rebase_path(sources, root_build_dir)
82 source_set("common") {
83 # Only the public target should depend on this. All other targets (even
84 # internal content ones) should depend on the public one.
85 visibility = [ "//content/public/common:common_sources" ]
87 sources = rebase_path(content_common_gypi_values.private_common_sources,
91 configs += [ "//content:content_implementation" ]
94 "//gpu/command_buffer/common",
95 "//third_party/WebKit/public:blink_headers",
99 "//build/util:webkit_version",
100 "//components/tracing",
101 "//gpu/command_buffer/client:gles2_interface",
102 "//gpu/command_buffer/client:gpu_memory_buffer_manager",
106 "//ui/accessibility",
112 "//ui/shell_dialogs",
114 "//third_party/libjingle",
123 # TODO: the dependency on gl_in_process_context should be decoupled from
124 # content and moved to android_webview. See crbug.com/365797.
125 "//gpu/command_buffer/client:gl_in_process_context",
126 "//gpu/command_buffer/client:gles2_c_lib",
127 "//gpu/command_buffer/client:gles2_cmd_helper",
128 "//gpu/command_buffer/client:gles2_implementation",
129 "//gpu/command_buffer/service",
131 "//gpu/skia_bindings",
133 "//media:shared_memory_support",
135 "//mojo/environment:chromium",
136 "//mojo/public/interfaces/application",
140 "//third_party/WebKit/public:blink",
142 "//webkit/common/gpu",
151 if (is_android && use_seccomp_bpf) {
152 set_sources_assignment_filter([])
154 "sandbox_linux/sandbox_bpf_base_policy_linux.cc",
155 "sandbox_linux/sandbox_bpf_base_policy_linux.h",
157 set_sources_assignment_filter(sources_assignment_filter)
162 "gpu/client/gpu_memory_buffer_impl_io_surface.cc",
163 "gpu/client/gpu_memory_buffer_impl_io_surface.h",
164 ] + get_target_outputs(":libvt_generate_stubs")
166 sources -= [ "plugin_list_posix.cc" ]
169 ":libvt_generate_stubs",
170 "//content/app/resources",
171 "//content:resources",
172 "//third_party/WebKit/public:resources",
173 "//ui/accelerated_widget_mac",
175 libs += [ "QuartzCore.framework" ]
180 "gpu/client/gpu_memory_buffer_impl_surface_texture.cc",
181 "gpu/client/gpu_memory_buffer_impl_surface_texture.h",
182 "gpu/gpu_memory_buffer_factory_surface_texture.cc",
183 "gpu/gpu_memory_buffer_factory_surface_texture.h",
187 "//content/public/android:jni",
188 "//content/public/android:common_aidl",
191 libs += [ "android" ]
195 sources -= [ "user_agent.cc" ]
196 assert(false, "Need to add lots of conditions here")
202 "//ui/ozone:ozone_base",
207 "cursors/webcursor_ozone.cc",
208 "font_list_ozone.cc",
209 "gpu/client/gpu_memory_buffer_impl_ozone_native_buffer.cc",
210 "gpu/client/gpu_memory_buffer_impl_ozone_native_buffer.h",
211 "gpu/gpu_memory_buffer_factory_ozone_native_buffer.cc",
212 "gpu/gpu_memory_buffer_factory_ozone_native_buffer.h",
217 sources -= [ "cursors/webcursor_aura.cc" ]
220 if (!use_aura || !use_x11) {
221 sources -= [ "cursors/webcursor_aurax11.cc" ]
225 configs += [ "//build/config/linux:pangocairo" ]
227 # If we're using pango, never use this ozone file (it was removed in all
228 # non-ozone cases above).
229 sources -= [ "font_list_ozone.cc" ]
232 sources -= [ "font_list_pango.cc" ]
236 include_dirs += [ "//third_party/khronos" ]
237 configs += [ "//build/config/linux:xcomposite" ]
239 if (cpu_arch != "arm" || !is_chromeos) {
247 if (enable_plugins) {
248 deps += [ "//ppapi:ppapi_shared" ]
251 "pepper_file_util.cc",
252 "pepper_file_util.h",
254 "pepper_plugin_list.cc",
255 "pepper_plugin_list.h",
256 "pepper_renderer_instance_data.cc",
257 "pepper_renderer_instance_data.h",
260 "plugin_list_posix.cc",
267 "gpu/media/android_video_decode_accelerator.cc",
268 "gpu/media/android_video_decode_accelerator.h",
272 deps += [ "//third_party/libyuv" ]
276 if (is_chromeos && use_x11) {
277 if (cpu_arch == "arm") {
279 "gpu/media/exynos_v4l2_video_device.cc",
280 "gpu/media/exynos_v4l2_video_device.h",
281 "gpu/media/tegra_v4l2_video_device.cc",
282 "gpu/media/tegra_v4l2_video_device.h",
283 "gpu/media/v4l2_image_processor.cc",
284 "gpu/media/v4l2_image_processor.h",
285 "gpu/media/v4l2_video_decode_accelerator.cc",
286 "gpu/media/v4l2_video_decode_accelerator.h",
287 "gpu/media/v4l2_video_device.cc",
288 "gpu/media/v4l2_video_device.h",
289 "gpu/media/v4l2_video_encode_accelerator.cc",
290 "gpu/media/v4l2_video_encode_accelerator.h",
298 "gpu/media/h264_dpb.cc",
299 "gpu/media/h264_dpb.h",
300 "gpu/media/va_surface.h",
301 "gpu/media/vaapi_h264_decoder.cc",
302 "gpu/media/vaapi_h264_decoder.h",
303 "gpu/media/vaapi_video_decode_accelerator.cc",
304 "gpu/media/vaapi_video_decode_accelerator.h",
305 "gpu/media/vaapi_video_encode_accelerator.cc",
306 "gpu/media/vaapi_video_encode_accelerator.h",
307 "gpu/media/vaapi_wrapper.cc",
308 "gpu/media/vaapi_wrapper.h",
309 ] + get_target_outputs(":libva_generate_stubs")
311 "//third_party/libva:libva_config",
312 "//third_party/libyuv:libyuv_config",
315 ":libva_generate_stubs",
317 "//third_party/libyuv",
324 "gpu/media/dxva_video_decode_accelerator.cc",
325 "gpu/media/dxva_video_decode_accelerator.h",
327 include_dirs += [ "//third_party/khronos" ]
328 deps += [ "//ui/gl" ]
330 # TODO(GYP): extract_xinput action.
333 if (!is_win || !use_aura) {
334 sources -= [ "cursors/webcursor_aurawin.cc" ]
337 if (use_seccomp_bpf) {
338 defines += [ "USE_SECCOMP_BPF" ]
342 "sandbox_linux/bpf_cros_arm_gpu_policy_linux.cc",
343 "sandbox_linux/bpf_cros_arm_gpu_policy_linux.h",
344 "sandbox_linux/bpf_gpu_policy_linux.cc",
345 "sandbox_linux/bpf_gpu_policy_linux.h",
346 "sandbox_linux/bpf_ppapi_policy_linux.cc",
347 "sandbox_linux/bpf_ppapi_policy_linux.h",
348 "sandbox_linux/bpf_renderer_policy_linux.cc",
349 "sandbox_linux/bpf_renderer_policy_linux.h",
350 "sandbox_linux/bpf_utility_policy_linux.cc",
351 "sandbox_linux/bpf_utility_policy_linux.h",
352 "sandbox_linux/sandbox_bpf_base_policy_linux.cc",
353 "sandbox_linux/sandbox_bpf_base_policy_linux.h",
358 "sandbox_linux/android/sandbox_bpf_base_policy_android.cc",
359 "sandbox_linux/android/sandbox_bpf_base_policy_android.h",
365 mojom("mojo_bindings") {
367 "geolocation_service.mojom",
368 "permission_service.mojom",
369 "render_frame_setup.mojom",
373 "//content/public/common:mojo_bindings",
374 "//mojo/public/interfaces/application:application",