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

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

Issue 1882373004: Migrate content/common/gpu/media code to media/gpu (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix several more bot-identified build issues Created 4 years, 8 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
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 28 matching lines...) Expand all
166 "//gpu/blink", 52 "//gpu/blink",
167 "//gpu/command_buffer/client:gl_in_process_context", 53 "//gpu/command_buffer/client:gl_in_process_context",
168 "//gpu/command_buffer/client:gles2_c_lib", 54 "//gpu/command_buffer/client:gles2_c_lib",
169 "//gpu/command_buffer/client:gles2_cmd_helper", 55 "//gpu/command_buffer/client:gles2_cmd_helper",
170 "//gpu/command_buffer/client:gles2_implementation", 56 "//gpu/command_buffer/client:gles2_implementation",
171 "//gpu/command_buffer/client:gles2_interface", 57 "//gpu/command_buffer/client:gles2_interface",
172 "//gpu/command_buffer/common:gles2_utils", 58 "//gpu/command_buffer/common:gles2_utils",
173 "//gpu/command_buffer/service", 59 "//gpu/command_buffer/service",
174 "//gpu/ipc/client", 60 "//gpu/ipc/client",
175 "//gpu/ipc/common", 61 "//gpu/ipc/common",
176
177 # TODO(markdittmer): This should be removed once content/common/gpu/media
178 # is refactored into media/ipc.
179 "//gpu/ipc/service",
180 "//gpu/skia_bindings", 62 "//gpu/skia_bindings",
181 "//ipc", 63 "//ipc",
182 "//ipc/mojo", 64 "//ipc/mojo",
183 "//media", 65 "//media",
184 "//media:shared_memory_support", 66 "//media:shared_memory_support",
185 "//media/gpu/ipc/client", 67 "//media/gpu/ipc/client",
186 "//media/gpu/ipc/common", 68 "//media/gpu/ipc/common",
187 "//media/midi", 69 "//media/midi",
188 "//mojo/common:common_base", 70 "//mojo/common:common_base",
189 "//mojo/edk/system", 71 "//mojo/edk/system",
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 if (is_android && use_seccomp_bpf) { 104 if (is_android && use_seccomp_bpf) {
223 set_sources_assignment_filter([]) 105 set_sources_assignment_filter([])
224 sources += [ 106 sources += [
225 "sandbox_linux/sandbox_bpf_base_policy_linux.cc", 107 "sandbox_linux/sandbox_bpf_base_policy_linux.cc",
226 "sandbox_linux/sandbox_bpf_base_policy_linux.h", 108 "sandbox_linux/sandbox_bpf_base_policy_linux.h",
227 ] 109 ]
228 set_sources_assignment_filter(sources_assignment_filter) 110 set_sources_assignment_filter(sources_assignment_filter)
229 } 111 }
230 112
231 if (is_mac) { 113 if (is_mac) {
232 sources += [ 114 deps += [ "//sandbox/mac:seatbelt" ]
233 "gpu/media/vt_mac.h",
234 "gpu/media/vt_video_decode_accelerator_mac.cc",
235 "gpu/media/vt_video_decode_accelerator_mac.h",
236 "gpu/media/vt_video_encode_accelerator_mac.cc",
237 "gpu/media/vt_video_encode_accelerator_mac.h",
238 ] + get_target_outputs(":libvt_generate_stubs")
239
240 deps += [
241 ":libvt_generate_stubs",
242 "//content:resources",
243 "//content/app/resources",
244 "//sandbox/mac:seatbelt",
245 "//third_party/WebKit/public:image_resources",
246 "//third_party/WebKit/public:resources",
247 "//ui/accelerated_widget_mac",
248 ]
249 lib_dirs = [ "$mac_sdk_path/usr/lib" ]
250 libs += [
251 "AVFoundation.framework",
252 "CoreMedia.framework",
253 "CoreVideo.framework",
254 "IOSurface.framework",
255 "OpenGL.framework",
256 "QuartzCore.framework",
257 "sandbox",
258 ]
259 } 115 }
260 116
261 if (is_android) { 117 if (is_android) {
262 deps += [ 118 deps += [
263 "//content/public/android:common_aidl", 119 "//content/public/android:common_aidl",
264 "//content/public/android:jni", 120 "//content/public/android:jni",
265 ] 121 ]
266 122
267 libs += [ "android" ] 123 libs += [ "android" ]
268 } 124 }
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
311 "pepper_messages.h", 167 "pepper_messages.h",
312 "pepper_plugin_list.cc", 168 "pepper_plugin_list.cc",
313 "pepper_plugin_list.h", 169 "pepper_plugin_list.h",
314 "pepper_renderer_instance_data.cc", 170 "pepper_renderer_instance_data.cc",
315 "pepper_renderer_instance_data.h", 171 "pepper_renderer_instance_data.h",
316 "plugin_list.cc", 172 "plugin_list.cc",
317 "plugin_list.h", 173 "plugin_list.h",
318 ] 174 ]
319 } 175 }
320 176
321 if (is_android) {
322 sources += [
323 "gpu/media/android_copying_backing_strategy.cc",
324 "gpu/media/android_copying_backing_strategy.h",
325 "gpu/media/android_deferred_rendering_backing_strategy.cc",
326 "gpu/media/android_deferred_rendering_backing_strategy.h",
327 "gpu/media/android_video_decode_accelerator.cc",
328 "gpu/media/android_video_decode_accelerator.h",
329 "gpu/media/avda_codec_image.cc",
330 "gpu/media/avda_codec_image.h",
331 "gpu/media/avda_return_on_failure.h",
332 "gpu/media/avda_shared_state.cc",
333 "gpu/media/avda_shared_state.h",
334 "gpu/media/avda_state_provider.h",
335 ]
336
337 if (enable_webrtc) {
338 deps += [ "//third_party/libyuv" ]
339 sources += [
340 "gpu/media/android_video_encode_accelerator.cc",
341 "gpu/media/android_video_encode_accelerator.h",
342 ]
343 }
344
345 if (mojo_media_host == "gpu") {
346 deps += [ "//media/mojo/services:cdm_service" ]
347 }
348 }
349
350 if (is_chromeos) {
351 sources += [
352 "gpu/media/accelerated_video_decoder.h",
353 "gpu/media/h264_decoder.cc",
354 "gpu/media/h264_decoder.h",
355 "gpu/media/h264_dpb.cc",
356 "gpu/media/h264_dpb.h",
357 "gpu/media/vp8_decoder.cc",
358 "gpu/media/vp8_decoder.h",
359 "gpu/media/vp8_picture.cc",
360 "gpu/media/vp8_picture.h",
361 "gpu/media/vp9_decoder.cc",
362 "gpu/media/vp9_decoder.h",
363 "gpu/media/vp9_picture.cc",
364 "gpu/media/vp9_picture.h",
365 ]
366 if (use_v4lplugin) {
367 defines += [ "USE_LIBV4L2" ]
368 sources += get_target_outputs(":libv4l2_generate_stubs")
369 deps += [ ":libv4l2_generate_stubs" ]
370 }
371 if (use_v4l2_codec) {
372 defines += [ "USE_V4L2_CODEC" ]
373 deps += [ "//third_party/libyuv" ]
374 sources += [
375 "gpu/media/generic_v4l2_device.cc",
376 "gpu/media/generic_v4l2_device.h",
377 "gpu/media/v4l2_device.cc",
378 "gpu/media/v4l2_device.h",
379 "gpu/media/v4l2_image_processor.cc",
380 "gpu/media/v4l2_image_processor.h",
381 "gpu/media/v4l2_jpeg_decode_accelerator.cc",
382 "gpu/media/v4l2_jpeg_decode_accelerator.h",
383 "gpu/media/v4l2_slice_video_decode_accelerator.cc",
384 "gpu/media/v4l2_slice_video_decode_accelerator.h",
385 "gpu/media/v4l2_video_decode_accelerator.cc",
386 "gpu/media/v4l2_video_decode_accelerator.h",
387 "gpu/media/v4l2_video_encode_accelerator.cc",
388 "gpu/media/v4l2_video_encode_accelerator.h",
389 ]
390 libs = [
391 "EGL",
392 "GLESv2",
393 ]
394 }
395 if (current_cpu == "arm") {
396 sources += [
397 "gpu/media/tegra_v4l2_device.cc",
398 "gpu/media/tegra_v4l2_device.h",
399 ]
400 }
401 if (current_cpu != "arm") {
402 sources += [
403 "gpu/media/va_surface.h",
404 "gpu/media/vaapi_jpeg_decode_accelerator.cc",
405 "gpu/media/vaapi_jpeg_decode_accelerator.h",
406 "gpu/media/vaapi_jpeg_decoder.cc",
407 "gpu/media/vaapi_jpeg_decoder.h",
408 "gpu/media/vaapi_picture.cc",
409 "gpu/media/vaapi_picture.h",
410 "gpu/media/vaapi_video_decode_accelerator.cc",
411 "gpu/media/vaapi_video_decode_accelerator.h",
412 "gpu/media/vaapi_video_encode_accelerator.cc",
413 "gpu/media/vaapi_video_encode_accelerator.h",
414 "gpu/media/vaapi_wrapper.cc",
415 "gpu/media/vaapi_wrapper.h",
416 ] + get_target_outputs(":libva_generate_stubs")
417 configs += [
418 "//third_party/libva:libva_config",
419 "//third_party/libyuv:libyuv_config",
420 ]
421 deps += [
422 ":libva_generate_stubs",
423 "//media",
424 "//third_party/libyuv",
425 ]
426 if (use_x11) {
427 sources += [
428 "gpu/media/vaapi_tfp_picture.cc",
429 "gpu/media/vaapi_tfp_picture.h",
430 ]
431 }
432 if (use_ozone) {
433 sources += [
434 "gpu/media/vaapi_drm_picture.cc",
435 "gpu/media/vaapi_drm_picture.h",
436 ]
437 }
438 }
439 }
440
441 if (is_win) {
442 sources += [
443 "gpu/media/dxva_video_decode_accelerator_win.cc",
444 "gpu/media/dxva_video_decode_accelerator_win.h",
445 ]
446 configs += [ "//third_party/khronos:khronos_headers" ]
447 deps += [ "//ui/gl" ]
448 libs += [
449 "d3d9.lib",
450 "d3d11.lib",
451 "dxva2.lib",
452 "strmiids.lib",
453 "mf.lib",
454 "mfplat.lib",
455 "mfuuid.lib",
456 ]
457 ldflags += [
458 "/DELAYLOAD:d3d9.dll",
459 "/DELAYLOAD:d3d11.dll",
460 "/DELAYLOAD:dxva2.dll",
461 "/DELAYLOAD:mf.dll",
462 "/DELAYLOAD:mfplat.dll",
463 ]
464
465 # TODO(GYP): extract_xinput action.
466 }
467
468 if (!is_win || !use_aura) { 177 if (!is_win || !use_aura) {
469 sources -= [ "cursors/webcursor_aurawin.cc" ] 178 sources -= [ "cursors/webcursor_aurawin.cc" ]
470 } 179 }
471 180
472 if (use_seccomp_bpf) { 181 if (use_seccomp_bpf) {
473 defines += [ "USE_SECCOMP_BPF" ] 182 defines += [ "USE_SECCOMP_BPF" ]
474 } else { 183 } else {
475 if (is_linux) { 184 if (is_linux) {
476 sources -= [ 185 sources -= [
477 "sandbox_linux/bpf_cros_arm_gpu_policy_linux.cc", 186 "sandbox_linux/bpf_cros_arm_gpu_policy_linux.cc",
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
536 "//components/leveldb/public/interfaces", 245 "//components/leveldb/public/interfaces",
537 "//components/mus/public/interfaces", 246 "//components/mus/public/interfaces",
538 "//content/public/common:mojo_bindings", 247 "//content/public/common:mojo_bindings",
539 "//services/shell/public/interfaces", 248 "//services/shell/public/interfaces",
540 "//skia/public/interfaces", 249 "//skia/public/interfaces",
541 "//third_party/WebKit/public:mojo_bindings", 250 "//third_party/WebKit/public:mojo_bindings",
542 "//ui/mojo/geometry:interfaces", 251 "//ui/mojo/geometry:interfaces",
543 "//url/mojo:url_mojom_origin", 252 "//url/mojo:url_mojom_origin",
544 ] 253 ]
545 } 254 }
OLDNEW
« no previous file with comments | « content/DEPS ('k') | content/common/common.gni » ('j') | media/gpu/h264_decoder.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698