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"
15 sources = [ "gpu/media/va.sigs" ]
16 source_prereqs = [ extra_header ]
17 stubs_filename_root = "va_stubs"
20 "$target_gen_dir/gpu/media/$stubs_filename_root.cc",
21 "$target_gen_dir/gpu/media/$stubs_filename_root.h",
24 "-i", rebase_path("$target_gen_dir/gpu/media", root_build_dir),
25 "-o", rebase_path("$target_gen_dir/gpu/media", root_build_dir),
27 "-e", rebase_path(extra_header, root_build_dir),
28 "-s", stubs_filename_root,
29 "-p", "content/common/gpu/media",
32 args += rebase_path(sources, root_build_dir)
36 source_set("common") {
37 # Only the public target should depend on this. All other targets (even
38 # internal content ones) should depend on the public one.
39 visibility = [ "//content/public/common:common_sources" ]
41 sources = rebase_path(content_common_gypi_values.private_common_sources,
45 "//content:content_implementation",
49 "//gpu/command_buffer/common",
50 "//third_party/WebKit/public:blink_headers",
54 "//build/util:webkit_version",
55 "//components/tracing",
56 "//gpu/command_buffer/client:gles2_interface",
57 "//gpu/command_buffer/client:gpu_memory_buffer_manager",
69 "//third_party/libjingle",
77 # TODO: the dependency on gl_in_process_context should be decoupled from
78 # content and moved to android_webview. See crbug.com/365797.
79 "//gpu/command_buffer/client:gl_in_process_context",
80 "//gpu/command_buffer/client:gles2_c_lib",
81 "//gpu/command_buffer/client:gles2_cmd_helper",
82 "//gpu/command_buffer/client:gles2_implementation",
83 "//gpu/command_buffer/service",
85 "//gpu/skia_bindings",
87 "//media:shared_memory_support",
89 "//mojo/environment:chromium",
90 "//mojo/public/interfaces/application",
94 "//third_party/WebKit/public:blink",
96 "//webkit/common/gpu",
105 if (is_android && use_seccomp_bpf) {
106 set_sources_assignment_filter([])
108 "sandbox_linux/sandbox_bpf_base_policy_linux.cc",
109 "sandbox_linux/sandbox_bpf_base_policy_linux.h",
111 set_sources_assignment_filter(sources_assignment_filter)
116 "gpu/client/gpu_memory_buffer_impl_io_surface.cc",
117 "gpu/client/gpu_memory_buffer_impl_io_surface.h",
120 "plugin_list_posix.cc",
124 "//content/app/resources",
125 "//content:resources",
126 "//third_party/WebKit/public:resources",
128 libs += [ "QuartzCore.framework" ]
133 "gpu/client/gpu_memory_buffer_impl_surface_texture.cc",
134 "gpu/client/gpu_memory_buffer_impl_surface_texture.h",
135 "gpu/gpu_memory_buffer_factory_surface_texture.cc",
136 "gpu/gpu_memory_buffer_factory_surface_texture.h",
140 "//content/public/android:jni",
141 "//content/public/android:common_aidl",
144 libs += [ "android" ]
148 sources -= [ "user_agent.cc" ]
149 assert(false, "Need to add lots of conditions here")
154 "cursors/webcursor_ozone.cc",
155 "font_list_ozone.cc",
156 "gpu/gpu_memory_buffer_factory_ozone.cc",
160 "gpu/gpu_memory_buffer_factory_linux.cc",
168 sources -= [ "cursors/webcursor_aura.cc" ]
171 if (!use_aura || !use_x11) {
172 sources -= [ "cursors/webcursor_aurax11.cc" ]
176 configs += [ "//build/config/linux:pangocairo" ]
178 # If we're using pango, never use this ozone file (it was removed in all
179 # non-ozone cases above).
180 sources -= [ "font_list_ozone.cc" ]
184 "font_list_pango.cc",
189 include_dirs += [ "//third_party/khronos" ]
190 configs += [ "//build/config/linux:xcomposite" ]
192 if (cpu_arch != "arm" || !is_chromeos) {
200 if (enable_plugins) {
202 "//ppapi:ppapi_shared",
206 "pepper_file_util.cc",
207 "pepper_file_util.h",
209 "pepper_plugin_list.cc",
210 "pepper_plugin_list.h",
211 "pepper_renderer_instance_data.cc",
212 "pepper_renderer_instance_data.h",
215 "plugin_list_posix.cc",
222 "gpu/media/android_video_decode_accelerator.cc",
223 "gpu/media/android_video_decode_accelerator.h",
227 deps += [ "//third_party/libyuv" ]
231 if (is_chromeos && use_x11) {
232 if (cpu_arch == "arm") {
234 "gpu/media/exynos_v4l2_video_device.cc",
235 "gpu/media/exynos_v4l2_video_device.h",
236 "gpu/media/tegra_v4l2_video_device.cc",
237 "gpu/media/tegra_v4l2_video_device.h",
238 "gpu/media/v4l2_image_processor.cc",
239 "gpu/media/v4l2_image_processor.h",
240 "gpu/media/v4l2_video_decode_accelerator.cc",
241 "gpu/media/v4l2_video_decode_accelerator.h",
242 "gpu/media/v4l2_video_device.cc",
243 "gpu/media/v4l2_video_device.h",
244 "gpu/media/v4l2_video_encode_accelerator.cc",
245 "gpu/media/v4l2_video_encode_accelerator.h",
247 libs = [ "EGL", "GLESv2" ]
250 "gpu/media/h264_dpb.cc",
251 "gpu/media/h264_dpb.h",
252 "gpu/media/va_surface.h",
253 "gpu/media/vaapi_h264_decoder.cc",
254 "gpu/media/vaapi_h264_decoder.h",
255 "gpu/media/vaapi_video_decode_accelerator.cc",
256 "gpu/media/vaapi_video_decode_accelerator.h",
257 "gpu/media/vaapi_video_encode_accelerator.cc",
258 "gpu/media/vaapi_video_encode_accelerator.h",
259 "gpu/media/vaapi_wrapper.cc",
260 "gpu/media/vaapi_wrapper.h",
261 ] + get_target_outputs(":libva_generate_stubs")
263 "//third_party/libva:libva_config",
264 "//third_party/libyuv:libyuv_config",
267 ":libva_generate_stubs",
269 "//third_party/libyuv",
276 "gpu/media/dxva_video_decode_accelerator.cc",
277 "gpu/media/dxva_video_decode_accelerator.h",
279 include_dirs += [ "//third_party/khronos" ]
284 # TODO(GYP): extract_xinput action.
287 if (!is_win || !use_aura) {
288 sources -= [ "cursors/webcursor_aurawin.cc" ]
291 if (use_seccomp_bpf) {
292 defines += [ "USE_SECCOMP_BPF" ]
296 "sandbox_linux/bpf_cros_arm_gpu_policy_linux.cc",
297 "sandbox_linux/bpf_cros_arm_gpu_policy_linux.h",
298 "sandbox_linux/bpf_gpu_policy_linux.cc",
299 "sandbox_linux/bpf_gpu_policy_linux.h",
300 "sandbox_linux/bpf_ppapi_policy_linux.cc",
301 "sandbox_linux/bpf_ppapi_policy_linux.h",
302 "sandbox_linux/bpf_renderer_policy_linux.cc",
303 "sandbox_linux/bpf_renderer_policy_linux.h",
304 "sandbox_linux/bpf_utility_policy_linux.cc",
305 "sandbox_linux/bpf_utility_policy_linux.h",
306 "sandbox_linux/sandbox_bpf_base_policy_linux.cc",
307 "sandbox_linux/sandbox_bpf_base_policy_linux.h",
312 "sandbox_linux/android/sandbox_bpf_base_policy_android.cc",
313 "sandbox_linux/android/sandbox_bpf_base_policy_android.h",
319 mojom("mojo_bindings") {
321 "geolocation_service.mojom",
322 "render_frame_setup.mojom",
326 "//content/public/common:mojo_bindings",
327 "//mojo/public/interfaces/application:application",