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 inputs = [ 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)
37 action("libvt_generate_stubs") {
38 extra_header = "gpu/media/vt_stubs_header.fragment"
40 script = "../../tools/generate_stubs/generate_stubs.py"
41 sources = [ "gpu/media/vt.sig" ]
42 inputs = [ extra_header ]
43 stubs_filename_root = "vt_stubs"
46 "$target_gen_dir/gpu/media/$stubs_filename_root.cc",
47 "$target_gen_dir/gpu/media/$stubs_filename_root.h",
50 "-i", rebase_path("$target_gen_dir/gpu/media", root_build_dir),
51 "-o", rebase_path("$target_gen_dir/gpu/media", root_build_dir),
53 "-e", rebase_path(extra_header, root_build_dir),
54 "-s", stubs_filename_root,
55 "-p", "content/common/gpu/media",
58 args += rebase_path(sources, root_build_dir)
62 source_set("common") {
63 # Only the public target should depend on this. All other targets (even
64 # internal content ones) should depend on the public one.
65 visibility = [ "//content/public/common:common_sources" ]
67 sources = rebase_path(content_common_gypi_values.private_common_sources,
71 "//content:content_implementation",
75 "//gpu/command_buffer/common",
76 "//third_party/WebKit/public:blink_headers",
80 "//build/util:webkit_version",
81 "//components/tracing",
82 "//gpu/command_buffer/client:gles2_interface",
83 "//gpu/command_buffer/client:gpu_memory_buffer_manager",
95 "//third_party/libjingle",
103 # TODO: the dependency on gl_in_process_context should be decoupled from
104 # content and moved to android_webview. See crbug.com/365797.
105 "//gpu/command_buffer/client:gl_in_process_context",
106 "//gpu/command_buffer/client:gles2_c_lib",
107 "//gpu/command_buffer/client:gles2_cmd_helper",
108 "//gpu/command_buffer/client:gles2_implementation",
109 "//gpu/command_buffer/service",
111 "//gpu/skia_bindings",
113 "//media:shared_memory_support",
115 "//mojo/environment:chromium",
116 "//mojo/public/interfaces/application",
120 "//third_party/WebKit/public:blink",
122 "//webkit/common/gpu",
131 if (is_android && use_seccomp_bpf) {
132 set_sources_assignment_filter([])
134 "sandbox_linux/sandbox_bpf_base_policy_linux.cc",
135 "sandbox_linux/sandbox_bpf_base_policy_linux.h",
137 set_sources_assignment_filter(sources_assignment_filter)
142 "gpu/client/gpu_memory_buffer_impl_io_surface.cc",
143 "gpu/client/gpu_memory_buffer_impl_io_surface.h",
144 ] + get_target_outputs(":libvt_generate_stubs")
147 "plugin_list_posix.cc",
151 ":libvt_generate_stubs",
152 "//content/app/resources",
153 "//content:resources",
154 "//third_party/WebKit/public:resources",
156 libs += [ "QuartzCore.framework" ]
161 "gpu/client/gpu_memory_buffer_impl_surface_texture.cc",
162 "gpu/client/gpu_memory_buffer_impl_surface_texture.h",
163 "gpu/gpu_memory_buffer_factory_surface_texture.cc",
164 "gpu/gpu_memory_buffer_factory_surface_texture.h",
168 "//content/public/android:jni",
169 "//content/public/android:common_aidl",
172 libs += [ "android" ]
176 sources -= [ "user_agent.cc" ]
177 assert(false, "Need to add lots of conditions here")
182 "gpu/client/gpu_memory_buffer_impl_linux.cc",
183 "gpu/gpu_memory_buffer_factory_linux.cc",
187 "//ui/ozone:ozone_base",
192 "cursors/webcursor_ozone.cc",
193 "font_list_ozone.cc",
194 "gpu/client/gpu_memory_buffer_impl_ozone.cc",
195 "gpu/client/gpu_memory_buffer_impl_ozone_native_buffer.cc",
196 "gpu/client/gpu_memory_buffer_impl_ozone_native_buffer.h",
197 "gpu/gpu_memory_buffer_factory_ozone.cc",
202 sources -= [ "cursors/webcursor_aura.cc" ]
205 if (!use_aura || !use_x11) {
206 sources -= [ "cursors/webcursor_aurax11.cc" ]
210 configs += [ "//build/config/linux:pangocairo" ]
212 # If we're using pango, never use this ozone file (it was removed in all
213 # non-ozone cases above).
214 sources -= [ "font_list_ozone.cc" ]
218 "font_list_pango.cc",
223 include_dirs += [ "//third_party/khronos" ]
224 configs += [ "//build/config/linux:xcomposite" ]
226 if (cpu_arch != "arm" || !is_chromeos) {
234 if (enable_plugins) {
236 "//ppapi:ppapi_shared",
240 "pepper_file_util.cc",
241 "pepper_file_util.h",
243 "pepper_plugin_list.cc",
244 "pepper_plugin_list.h",
245 "pepper_renderer_instance_data.cc",
246 "pepper_renderer_instance_data.h",
249 "plugin_list_posix.cc",
256 "gpu/media/android_video_decode_accelerator.cc",
257 "gpu/media/android_video_decode_accelerator.h",
261 deps += [ "//third_party/libyuv" ]
265 if (is_chromeos && use_x11) {
266 if (cpu_arch == "arm") {
268 "gpu/media/exynos_v4l2_video_device.cc",
269 "gpu/media/exynos_v4l2_video_device.h",
270 "gpu/media/tegra_v4l2_video_device.cc",
271 "gpu/media/tegra_v4l2_video_device.h",
272 "gpu/media/v4l2_image_processor.cc",
273 "gpu/media/v4l2_image_processor.h",
274 "gpu/media/v4l2_video_decode_accelerator.cc",
275 "gpu/media/v4l2_video_decode_accelerator.h",
276 "gpu/media/v4l2_video_device.cc",
277 "gpu/media/v4l2_video_device.h",
278 "gpu/media/v4l2_video_encode_accelerator.cc",
279 "gpu/media/v4l2_video_encode_accelerator.h",
281 libs = [ "EGL", "GLESv2" ]
284 "gpu/media/h264_dpb.cc",
285 "gpu/media/h264_dpb.h",
286 "gpu/media/va_surface.h",
287 "gpu/media/vaapi_h264_decoder.cc",
288 "gpu/media/vaapi_h264_decoder.h",
289 "gpu/media/vaapi_video_decode_accelerator.cc",
290 "gpu/media/vaapi_video_decode_accelerator.h",
291 "gpu/media/vaapi_video_encode_accelerator.cc",
292 "gpu/media/vaapi_video_encode_accelerator.h",
293 "gpu/media/vaapi_wrapper.cc",
294 "gpu/media/vaapi_wrapper.h",
295 ] + get_target_outputs(":libva_generate_stubs")
297 "//third_party/libva:libva_config",
298 "//third_party/libyuv:libyuv_config",
301 ":libva_generate_stubs",
303 "//third_party/libyuv",
310 "gpu/media/dxva_video_decode_accelerator.cc",
311 "gpu/media/dxva_video_decode_accelerator.h",
313 include_dirs += [ "//third_party/khronos" ]
318 # TODO(GYP): extract_xinput action.
321 if (!is_win || !use_aura) {
322 sources -= [ "cursors/webcursor_aurawin.cc" ]
325 if (use_seccomp_bpf) {
326 defines += [ "USE_SECCOMP_BPF" ]
330 "sandbox_linux/bpf_cros_arm_gpu_policy_linux.cc",
331 "sandbox_linux/bpf_cros_arm_gpu_policy_linux.h",
332 "sandbox_linux/bpf_gpu_policy_linux.cc",
333 "sandbox_linux/bpf_gpu_policy_linux.h",
334 "sandbox_linux/bpf_ppapi_policy_linux.cc",
335 "sandbox_linux/bpf_ppapi_policy_linux.h",
336 "sandbox_linux/bpf_renderer_policy_linux.cc",
337 "sandbox_linux/bpf_renderer_policy_linux.h",
338 "sandbox_linux/bpf_utility_policy_linux.cc",
339 "sandbox_linux/bpf_utility_policy_linux.h",
340 "sandbox_linux/sandbox_bpf_base_policy_linux.cc",
341 "sandbox_linux/sandbox_bpf_base_policy_linux.h",
346 "sandbox_linux/android/sandbox_bpf_base_policy_android.cc",
347 "sandbox_linux/android/sandbox_bpf_base_policy_android.h",
353 mojom("mojo_bindings") {
355 "geolocation_service.mojom",
356 "permission_service.mojom",
357 "render_frame_setup.mojom",
361 "//content/public/common:mojo_bindings",
362 "//mojo/public/interfaces/application:application",