Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(26)

Side by Side Diff: content/common/BUILD.gn

Issue 1939683002: Test X11 header pollution (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « content/DEPS ('k') | content/common/common.gni » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2014 The Chromium Authors. All rights reserved. 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 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import("//build/config/features.gni") 5 import("//build/config/features.gni")
6 import("//build/config/ui.gni") 6 import("//build/config/ui.gni")
7 import("//content/common/common.gni") 7 import("//content/common/common.gni")
8 import("//media/media_options.gni") 8 import("//media/media_options.gni")
9 import("//mojo/public/tools/bindings/mojom.gni") 9 import("//mojo/public/tools/bindings/mojom.gni")
10 if (is_mac) { 10 if (is_mac) {
11 import("//build/config/mac/mac_sdk.gni") 11 import("//build/config/mac/mac_sdk.gni")
12 } 12 }
13 13
14 if (is_chromeos && current_cpu != "arm") {
15 action("libva_generate_stubs") {
16 extra_header = "gpu/media/va_stub_header.fragment"
17
18 script = "../../tools/generate_stubs/generate_stubs.py"
19 sources = [
20 "gpu/media/va.sigs",
21 ]
22 inputs = [
23 extra_header,
24 ]
25 if (use_x11) {
26 sources += [ "gpu/media/va_x11.sigs" ]
27 }
28 if (use_ozone) {
29 sources += [ "gpu/media/va_drm.sigs" ]
30 }
31 stubs_filename_root = "va_stubs"
32
33 outputs = [
34 "$target_gen_dir/gpu/media/$stubs_filename_root.cc",
35 "$target_gen_dir/gpu/media/$stubs_filename_root.h",
36 ]
37 args = [
38 "-i",
39 rebase_path("$target_gen_dir/gpu/media", root_build_dir),
40 "-o",
41 rebase_path("$target_gen_dir/gpu/media", root_build_dir),
42 "-t",
43 "posix_stubs",
44 "-e",
45 rebase_path(extra_header, root_build_dir),
46 "-s",
47 stubs_filename_root,
48 "-p",
49 "content/common/gpu/media",
50 ]
51
52 args += rebase_path(sources, root_build_dir)
53 }
54 }
55
56 if (is_chromeos && use_v4lplugin) {
57 action("libv4l2_generate_stubs") {
58 extra_header = "gpu/media/v4l2_stub_header.fragment"
59
60 script = "../../tools/generate_stubs/generate_stubs.py"
61 sources = [
62 "gpu/media/v4l2.sig",
63 ]
64 inputs = [
65 extra_header,
66 ]
67 stubs_filename_root = "v4l2_stubs"
68
69 outputs = [
70 "$target_gen_dir/gpu/media/$stubs_filename_root.cc",
71 "$target_gen_dir/gpu/media/$stubs_filename_root.h",
72 ]
73 args = [
74 "-i",
75 rebase_path("$target_gen_dir/gpu/media", root_build_dir),
76 "-o",
77 rebase_path("$target_gen_dir/gpu/media", root_build_dir),
78 "-t",
79 "posix_stubs",
80 "-e",
81 rebase_path(extra_header, root_build_dir),
82 "-s",
83 stubs_filename_root,
84 "-p",
85 "content/common/gpu/media",
86 ]
87
88 args += rebase_path(sources, root_build_dir)
89 }
90 }
91
92 if (is_mac) {
93 action("libvt_generate_stubs") {
94 extra_header = "gpu/media/vt_stubs_header.fragment"
95
96 script = "../../tools/generate_stubs/generate_stubs.py"
97 sources = [
98 "gpu/media/vt.sig",
99 ]
100 inputs = [
101 extra_header,
102 ]
103 stubs_filename_root = "vt_stubs"
104
105 outputs = [
106 "$target_gen_dir/gpu/media/$stubs_filename_root.cc",
107 "$target_gen_dir/gpu/media/$stubs_filename_root.h",
108 ]
109 args = [
110 "-i",
111 rebase_path("$target_gen_dir/gpu/media", root_build_dir),
112 "-o",
113 rebase_path("$target_gen_dir/gpu/media", root_build_dir),
114 "-t",
115 "posix_stubs",
116 "-e",
117 rebase_path(extra_header, root_build_dir),
118 "-s",
119 stubs_filename_root,
120 "-p",
121 "content/common/gpu/media",
122 ]
123
124 args += rebase_path(sources, root_build_dir)
125 }
126 }
127
128 source_set("common") { 14 source_set("common") {
129 # Targets external to content should always link to the public API. 15 # Targets external to content should always link to the public API.
130 # In addition, targets outside of the content component (shell and tests) 16 # In addition, targets outside of the content component (shell and tests)
131 # must not link to this because it will duplicate the code in the component 17 # must not link to this because it will duplicate the code in the component
132 # build. 18 # build.
133 visibility = [ "//content/*" ] 19 visibility = [ "//content/*" ]
134 20
135 sources = rebase_path(content_common_gypi_values.private_common_sources, 21 sources = rebase_path(content_common_gypi_values.private_common_sources,
136 ".", 22 ".",
137 "//content") 23 "//content")
(...skipping 22 matching lines...) Expand all
160 "//device/bluetooth", 46 "//device/bluetooth",
161 "//gpu", 47 "//gpu",
162 "//gpu/command_buffer/client:gles2_c_lib", 48 "//gpu/command_buffer/client:gles2_c_lib",
163 "//gpu/command_buffer/client:gles2_cmd_helper", 49 "//gpu/command_buffer/client:gles2_cmd_helper",
164 "//gpu/command_buffer/client:gles2_implementation", 50 "//gpu/command_buffer/client:gles2_implementation",
165 "//gpu/command_buffer/client:gles2_interface", 51 "//gpu/command_buffer/client:gles2_interface",
166 "//gpu/command_buffer/common:gles2_utils", 52 "//gpu/command_buffer/common:gles2_utils",
167 "//gpu/command_buffer/service", 53 "//gpu/command_buffer/service",
168 "//gpu/ipc/client", 54 "//gpu/ipc/client",
169 "//gpu/ipc/common", 55 "//gpu/ipc/common",
170
171 # TODO(markdittmer): This should be removed once content/common/gpu/media
172 # is refactored into media/ipc.
173 "//gpu/ipc/service",
174 "//gpu/skia_bindings", 56 "//gpu/skia_bindings",
175 "//ipc", 57 "//ipc",
176 "//ipc/mojo", 58 "//ipc/mojo",
177 "//media", 59 "//media",
178 "//media:shared_memory_support", 60 "//media:shared_memory_support",
179 "//media/gpu/ipc/client", 61 "//media/gpu/ipc/client",
180 "//media/gpu/ipc/common", 62 "//media/gpu/ipc/common",
181 "//media/midi", 63 "//media/midi",
182 "//mojo/common:common_base", 64 "//mojo/common:common_base",
183 "//mojo/edk/system", 65 "//mojo/edk/system",
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 if (is_android && use_seccomp_bpf) { 99 if (is_android && use_seccomp_bpf) {
218 set_sources_assignment_filter([]) 100 set_sources_assignment_filter([])
219 sources += [ 101 sources += [
220 "sandbox_linux/sandbox_bpf_base_policy_linux.cc", 102 "sandbox_linux/sandbox_bpf_base_policy_linux.cc",
221 "sandbox_linux/sandbox_bpf_base_policy_linux.h", 103 "sandbox_linux/sandbox_bpf_base_policy_linux.h",
222 ] 104 ]
223 set_sources_assignment_filter(sources_assignment_filter) 105 set_sources_assignment_filter(sources_assignment_filter)
224 } 106 }
225 107
226 if (is_mac) { 108 if (is_mac) {
227 sources += [ 109 deps += [ "//sandbox/mac:seatbelt" ]
228 "gpu/media/vt_mac.h",
229 "gpu/media/vt_video_decode_accelerator_mac.cc",
230 "gpu/media/vt_video_decode_accelerator_mac.h",
231 "gpu/media/vt_video_encode_accelerator_mac.cc",
232 "gpu/media/vt_video_encode_accelerator_mac.h",
233 ] + get_target_outputs(":libvt_generate_stubs")
234
235 deps += [
236 ":libvt_generate_stubs",
237 "//content:resources",
238 "//content/app/resources",
239 "//sandbox/mac:seatbelt",
240 "//third_party/WebKit/public:image_resources",
241 "//third_party/WebKit/public:resources",
242 "//ui/accelerated_widget_mac",
243 ]
244 lib_dirs = [ "$mac_sdk_path/usr/lib" ]
245 libs += [
246 "AVFoundation.framework",
247 "CoreMedia.framework",
248 "CoreVideo.framework",
249 "IOSurface.framework",
250 "OpenGL.framework",
251 "QuartzCore.framework",
252 "sandbox",
253 ]
254 } 110 }
255 111
256 if (is_android) { 112 if (is_android) {
257 deps += [ 113 deps += [
258 "//content/public/android:common_aidl", 114 "//content/public/android:common_aidl",
259 "//content/public/android:jni", 115 "//content/public/android:jni",
260 ] 116 ]
261 117
262 libs += [ "android" ] 118 libs += [ "android" ]
263 } 119 }
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
306 "pepper_messages.h", 162 "pepper_messages.h",
307 "pepper_plugin_list.cc", 163 "pepper_plugin_list.cc",
308 "pepper_plugin_list.h", 164 "pepper_plugin_list.h",
309 "pepper_renderer_instance_data.cc", 165 "pepper_renderer_instance_data.cc",
310 "pepper_renderer_instance_data.h", 166 "pepper_renderer_instance_data.h",
311 "plugin_list.cc", 167 "plugin_list.cc",
312 "plugin_list.h", 168 "plugin_list.h",
313 ] 169 ]
314 } 170 }
315 171
316 if (is_android) {
317 sources += [
318 "gpu/media/android_copying_backing_strategy.cc",
319 "gpu/media/android_copying_backing_strategy.h",
320 "gpu/media/android_deferred_rendering_backing_strategy.cc",
321 "gpu/media/android_deferred_rendering_backing_strategy.h",
322 "gpu/media/android_video_decode_accelerator.cc",
323 "gpu/media/android_video_decode_accelerator.h",
324 "gpu/media/avda_codec_image.cc",
325 "gpu/media/avda_codec_image.h",
326 "gpu/media/avda_return_on_failure.h",
327 "gpu/media/avda_shared_state.cc",
328 "gpu/media/avda_shared_state.h",
329 "gpu/media/avda_state_provider.h",
330 "gpu/media/avda_surface_tracker.cc",
331 "gpu/media/avda_surface_tracker.h",
332 ]
333
334 if (enable_webrtc) {
335 deps += [ "//third_party/libyuv" ]
336 sources += [
337 "gpu/media/android_video_encode_accelerator.cc",
338 "gpu/media/android_video_encode_accelerator.h",
339 ]
340 }
341
342 if (mojo_media_host == "gpu") {
343 deps += [ "//media/mojo/services:cdm_service" ]
344 }
345 }
346
347 if (is_chromeos) {
348 sources += [
349 "gpu/media/accelerated_video_decoder.h",
350 "gpu/media/h264_decoder.cc",
351 "gpu/media/h264_decoder.h",
352 "gpu/media/h264_dpb.cc",
353 "gpu/media/h264_dpb.h",
354 "gpu/media/vp8_decoder.cc",
355 "gpu/media/vp8_decoder.h",
356 "gpu/media/vp8_picture.cc",
357 "gpu/media/vp8_picture.h",
358 "gpu/media/vp9_decoder.cc",
359 "gpu/media/vp9_decoder.h",
360 "gpu/media/vp9_picture.cc",
361 "gpu/media/vp9_picture.h",
362 ]
363 if (use_v4lplugin) {
364 defines += [ "USE_LIBV4L2" ]
365 sources += get_target_outputs(":libv4l2_generate_stubs")
366 deps += [ ":libv4l2_generate_stubs" ]
367 }
368 if (use_v4l2_codec) {
369 defines += [ "USE_V4L2_CODEC" ]
370 deps += [ "//third_party/libyuv" ]
371 sources += [
372 "gpu/media/generic_v4l2_device.cc",
373 "gpu/media/generic_v4l2_device.h",
374 "gpu/media/v4l2_device.cc",
375 "gpu/media/v4l2_device.h",
376 "gpu/media/v4l2_image_processor.cc",
377 "gpu/media/v4l2_image_processor.h",
378 "gpu/media/v4l2_jpeg_decode_accelerator.cc",
379 "gpu/media/v4l2_jpeg_decode_accelerator.h",
380 "gpu/media/v4l2_slice_video_decode_accelerator.cc",
381 "gpu/media/v4l2_slice_video_decode_accelerator.h",
382 "gpu/media/v4l2_video_decode_accelerator.cc",
383 "gpu/media/v4l2_video_decode_accelerator.h",
384 "gpu/media/v4l2_video_encode_accelerator.cc",
385 "gpu/media/v4l2_video_encode_accelerator.h",
386 ]
387 libs = [
388 "EGL",
389 "GLESv2",
390 ]
391 }
392 if (current_cpu == "arm") {
393 sources += [
394 "gpu/media/tegra_v4l2_device.cc",
395 "gpu/media/tegra_v4l2_device.h",
396 ]
397 }
398 if (current_cpu != "arm") {
399 sources += [
400 "gpu/media/va_surface.h",
401 "gpu/media/vaapi_jpeg_decode_accelerator.cc",
402 "gpu/media/vaapi_jpeg_decode_accelerator.h",
403 "gpu/media/vaapi_jpeg_decoder.cc",
404 "gpu/media/vaapi_jpeg_decoder.h",
405 "gpu/media/vaapi_picture.cc",
406 "gpu/media/vaapi_picture.h",
407 "gpu/media/vaapi_video_decode_accelerator.cc",
408 "gpu/media/vaapi_video_decode_accelerator.h",
409 "gpu/media/vaapi_video_encode_accelerator.cc",
410 "gpu/media/vaapi_video_encode_accelerator.h",
411 "gpu/media/vaapi_wrapper.cc",
412 "gpu/media/vaapi_wrapper.h",
413 ] + get_target_outputs(":libva_generate_stubs")
414 configs += [
415 "//third_party/libva:libva_config",
416 "//third_party/libyuv:libyuv_config",
417 ]
418 deps += [
419 ":libva_generate_stubs",
420 "//media",
421 "//third_party/libyuv",
422 ]
423 if (use_x11) {
424 sources += [
425 "gpu/media/vaapi_tfp_picture.cc",
426 "gpu/media/vaapi_tfp_picture.h",
427 ]
428 }
429 if (use_ozone) {
430 sources += [
431 "gpu/media/vaapi_drm_picture.cc",
432 "gpu/media/vaapi_drm_picture.h",
433 ]
434 }
435 }
436 }
437
438 if (is_win) {
439 sources += [
440 "gpu/media/dxva_video_decode_accelerator_win.cc",
441 "gpu/media/dxva_video_decode_accelerator_win.h",
442 ]
443 configs += [ "//third_party/khronos:khronos_headers" ]
444 deps += [ "//ui/gl" ]
445 libs += [
446 "d3d9.lib",
447 "d3d11.lib",
448 "dxva2.lib",
449 "strmiids.lib",
450 "mf.lib",
451 "mfplat.lib",
452 "mfuuid.lib",
453 ]
454 ldflags += [
455 "/DELAYLOAD:d3d9.dll",
456 "/DELAYLOAD:d3d11.dll",
457 "/DELAYLOAD:dxva2.dll",
458 "/DELAYLOAD:mf.dll",
459 "/DELAYLOAD:mfplat.dll",
460 ]
461
462 # TODO(GYP): extract_xinput action.
463 }
464
465 if (!is_win || !use_aura) { 172 if (!is_win || !use_aura) {
466 sources -= [ "cursors/webcursor_aurawin.cc" ] 173 sources -= [ "cursors/webcursor_aurawin.cc" ]
467 } 174 }
468 175
469 if (use_seccomp_bpf) { 176 if (use_seccomp_bpf) {
470 defines += [ "USE_SECCOMP_BPF" ] 177 defines += [ "USE_SECCOMP_BPF" ]
471 } else { 178 } else {
472 if (is_linux) { 179 if (is_linux) {
473 sources -= [ 180 sources -= [
474 "sandbox_linux/bpf_cros_arm_gpu_policy_linux.cc", 181 "sandbox_linux/bpf_cros_arm_gpu_policy_linux.cc",
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
531 "//components/leveldb/public/interfaces", 238 "//components/leveldb/public/interfaces",
532 "//components/mus/public/interfaces", 239 "//components/mus/public/interfaces",
533 "//content/public/common:mojo_bindings", 240 "//content/public/common:mojo_bindings",
534 "//services/shell/public/interfaces", 241 "//services/shell/public/interfaces",
535 "//skia/public/interfaces", 242 "//skia/public/interfaces",
536 "//third_party/WebKit/public:mojo_bindings", 243 "//third_party/WebKit/public:mojo_bindings",
537 "//ui/mojo/geometry:interfaces", 244 "//ui/mojo/geometry:interfaces",
538 "//url/mojo:url_mojom_origin", 245 "//url/mojo:url_mojom_origin",
539 ] 246 ]
540 } 247 }
OLDNEW
« no previous file with comments | « content/DEPS ('k') | content/common/common.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698