| OLD | NEW |
| 1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2016 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") | |
| 6 import("//build/config/ui.gni") | 5 import("//build/config/ui.gni") |
| 7 import("//content/common/common.gni") | 6 import("//testing/test.gni") |
| 8 import("//media/media_options.gni") | 7 |
| 9 import("//mojo/public/tools/bindings/mojom.gni") | |
| 10 if (is_mac) { | 8 if (is_mac) { |
| 11 import("//build/config/mac/mac_sdk.gni") | 9 import("//build/config/mac/mac_sdk.gni") |
| 12 } | 10 } |
| 13 | 11 |
| 14 if (is_chromeos && current_cpu != "arm") { | 12 if (is_chromeos && current_cpu != "arm") { |
| 15 action("libva_generate_stubs") { | 13 action("libva_generate_stubs") { |
| 16 extra_header = "gpu/media/va_stub_header.fragment" | 14 extra_header = "va_stub_header.fragment" |
| 17 | 15 |
| 18 script = "../../tools/generate_stubs/generate_stubs.py" | 16 script = "../../tools/generate_stubs/generate_stubs.py" |
| 19 sources = [ | 17 sources = [ |
| 20 "gpu/media/va.sigs", | 18 "va.sigs", |
| 21 ] | 19 ] |
| 22 inputs = [ | 20 inputs = [ |
| 23 extra_header, | 21 extra_header, |
| 24 ] | 22 ] |
| 25 if (use_x11) { | 23 if (use_x11) { |
| 26 sources += [ "gpu/media/va_x11.sigs" ] | 24 sources += [ "va_x11.sigs" ] |
| 27 } | 25 } |
| 28 if (use_ozone) { | 26 if (use_ozone) { |
| 29 sources += [ "gpu/media/va_drm.sigs" ] | 27 sources += [ "va_drm.sigs" ] |
| 30 } | 28 } |
| 31 stubs_filename_root = "va_stubs" | 29 stubs_filename_root = "va_stubs" |
| 32 | 30 |
| 33 outputs = [ | 31 outputs = [ |
| 34 "$target_gen_dir/gpu/media/$stubs_filename_root.cc", | 32 "$target_gen_dir/$stubs_filename_root.cc", |
| 35 "$target_gen_dir/gpu/media/$stubs_filename_root.h", | 33 "$target_gen_dir/$stubs_filename_root.h", |
| 36 ] | 34 ] |
| 37 args = [ | 35 args = [ |
| 38 "-i", | 36 "-i", |
| 39 rebase_path("$target_gen_dir/gpu/media", root_build_dir), | 37 rebase_path("$target_gen_dir", root_build_dir), |
| 40 "-o", | 38 "-o", |
| 41 rebase_path("$target_gen_dir/gpu/media", root_build_dir), | 39 rebase_path("$target_gen_dir", root_build_dir), |
| 42 "-t", | 40 "-t", |
| 43 "posix_stubs", | 41 "posix_stubs", |
| 44 "-e", | 42 "-e", |
| 45 rebase_path(extra_header, root_build_dir), | 43 rebase_path(extra_header, root_build_dir), |
| 46 "-s", | 44 "-s", |
| 47 stubs_filename_root, | 45 stubs_filename_root, |
| 48 "-p", | 46 "-p", |
| 49 "content/common/gpu/media", | 47 "media/gpu", |
| 50 ] | 48 ] |
| 51 | 49 |
| 52 args += rebase_path(sources, root_build_dir) | 50 args += rebase_path(sources, root_build_dir) |
| 53 } | 51 } |
| 54 } | 52 } |
| 55 | 53 |
| 56 if (is_chromeos && use_v4lplugin) { | 54 if (is_chromeos && use_v4lplugin) { |
| 57 action("libv4l2_generate_stubs") { | 55 action("libv4l2_generate_stubs") { |
| 58 extra_header = "gpu/media/v4l2_stub_header.fragment" | 56 extra_header = "v4l2_stub_header.fragment" |
| 59 | 57 |
| 60 script = "../../tools/generate_stubs/generate_stubs.py" | 58 script = "../../tools/generate_stubs/generate_stubs.py" |
| 61 sources = [ | 59 sources = [ |
| 62 "gpu/media/v4l2.sig", | 60 "v4l2.sig", |
| 63 ] | 61 ] |
| 64 inputs = [ | 62 inputs = [ |
| 65 extra_header, | 63 extra_header, |
| 66 ] | 64 ] |
| 67 stubs_filename_root = "v4l2_stubs" | 65 stubs_filename_root = "v4l2_stubs" |
| 68 | 66 |
| 69 outputs = [ | 67 outputs = [ |
| 70 "$target_gen_dir/gpu/media/$stubs_filename_root.cc", | 68 "$target_gen_dir/$stubs_filename_root.cc", |
| 71 "$target_gen_dir/gpu/media/$stubs_filename_root.h", | 69 "$target_gen_dir/$stubs_filename_root.h", |
| 72 ] | 70 ] |
| 73 args = [ | 71 args = [ |
| 74 "-i", | 72 "-i", |
| 75 rebase_path("$target_gen_dir/gpu/media", root_build_dir), | 73 rebase_path("$target_gen_dir", root_build_dir), |
| 76 "-o", | 74 "-o", |
| 77 rebase_path("$target_gen_dir/gpu/media", root_build_dir), | 75 rebase_path("$target_gen_dir", root_build_dir), |
| 78 "-t", | 76 "-t", |
| 79 "posix_stubs", | 77 "posix_stubs", |
| 80 "-e", | 78 "-e", |
| 81 rebase_path(extra_header, root_build_dir), | 79 rebase_path(extra_header, root_build_dir), |
| 82 "-s", | 80 "-s", |
| 83 stubs_filename_root, | 81 stubs_filename_root, |
| 84 "-p", | 82 "-p", |
| 85 "content/common/gpu/media", | 83 "media/gpu", |
| 86 ] | 84 ] |
| 87 | 85 |
| 88 args += rebase_path(sources, root_build_dir) | 86 args += rebase_path(sources, root_build_dir) |
| 89 } | 87 } |
| 90 } | 88 } |
| 91 | 89 |
| 92 if (is_mac) { | 90 if (is_mac) { |
| 93 action("libvt_generate_stubs") { | 91 action("libvt_generate_stubs") { |
| 94 extra_header = "gpu/media/vt_stubs_header.fragment" | 92 extra_header = "vt_stubs_header.fragment" |
| 95 | 93 |
| 96 script = "../../tools/generate_stubs/generate_stubs.py" | 94 script = "../../tools/generate_stubs/generate_stubs.py" |
| 97 sources = [ | 95 sources = [ |
| 98 "gpu/media/vt.sig", | 96 "vt.sig", |
| 99 ] | 97 ] |
| 100 inputs = [ | 98 inputs = [ |
| 101 extra_header, | 99 extra_header, |
| 102 ] | 100 ] |
| 103 stubs_filename_root = "vt_stubs" | 101 stubs_filename_root = "vt_stubs" |
| 104 | 102 |
| 105 outputs = [ | 103 outputs = [ |
| 106 "$target_gen_dir/gpu/media/$stubs_filename_root.cc", | 104 "$target_gen_dir/$stubs_filename_root.cc", |
| 107 "$target_gen_dir/gpu/media/$stubs_filename_root.h", | 105 "$target_gen_dir/$stubs_filename_root.h", |
| 108 ] | 106 ] |
| 109 args = [ | 107 args = [ |
| 110 "-i", | 108 "-i", |
| 111 rebase_path("$target_gen_dir/gpu/media", root_build_dir), | 109 rebase_path("$target_gen_dir", root_build_dir), |
| 112 "-o", | 110 "-o", |
| 113 rebase_path("$target_gen_dir/gpu/media", root_build_dir), | 111 rebase_path("$target_gen_dir", root_build_dir), |
| 114 "-t", | 112 "-t", |
| 115 "posix_stubs", | 113 "posix_stubs", |
| 116 "-e", | 114 "-e", |
| 117 rebase_path(extra_header, root_build_dir), | 115 rebase_path(extra_header, root_build_dir), |
| 118 "-s", | 116 "-s", |
| 119 stubs_filename_root, | 117 stubs_filename_root, |
| 120 "-p", | 118 "-p", |
| 121 "content/common/gpu/media", | 119 "media/gpu", |
| 122 ] | 120 ] |
| 123 | 121 |
| 124 args += rebase_path(sources, root_build_dir) | 122 args += rebase_path(sources, root_build_dir) |
| 125 } | 123 } |
| 126 } | 124 } |
| 127 | 125 |
| 128 source_set("common") { | 126 component("gpu") { |
| 129 # Targets external to content should always link to the public API. | 127 output_name = "media_gpu" |
| 130 # 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 | |
| 132 # build. | |
| 133 visibility = [ "//content/*" ] | |
| 134 | 128 |
| 135 sources = rebase_path(content_common_gypi_values.private_common_sources, | 129 # Only GPU service code in the media layer should access //media/gpu. |
| 136 ".", | 130 visibility = [ "//media/gpu/ipc/service" ] |
| 137 "//content") | |
| 138 | 131 |
| 139 configs += [ | 132 defines = [ "MEDIA_GPU_IMPLEMENTATION" ] |
| 140 "//content:content_implementation", | 133 |
| 141 "//build/config:precompiled_headers", | 134 sources = [ |
| 142 "//build/config/compiler:no_size_t_to_int_warning", | 135 "fake_video_decode_accelerator.cc", |
| 136 "fake_video_decode_accelerator.h", |
| 137 "gpu_video_decode_accelerator_helpers.h", |
| 138 "shared_memory_region.cc", |
| 139 "shared_memory_region.h", |
| 143 ] | 140 ] |
| 144 | 141 |
| 145 public_deps = [ | 142 public_deps = [ |
| 146 ":mojo_bindings", | 143 "//base", |
| 147 "//gpu/command_buffer/common", | 144 "//gpu", |
| 148 "//ipc", | 145 "//media", |
| 149 "//third_party/WebKit/public:blink_headers", | 146 "//ui/gfx/geometry", |
| 150 ] | 147 ] |
| 151 deps = [ | 148 deps = [ |
| 152 "//base", | 149 "//ui/display/types", |
| 153 "//base/third_party/dynamic_annotations", | |
| 154 "//build/util:webkit_version", | |
| 155 "//cc", | |
| 156 "//cc/blink", | |
| 157 "//cc/surfaces", | |
| 158 "//components/mus/public/interfaces", | |
| 159 "//components/tracing", | |
| 160 "//components/tracing:startup_tracing", | |
| 161 "//device/bluetooth", | |
| 162 | |
| 163 # TODO: the dependency on gl_in_process_context should be decoupled from | |
| 164 # content and moved to android_webview. See crbug.com/365797. | |
| 165 "//gpu", | |
| 166 "//gpu/blink", | |
| 167 "//gpu/command_buffer/client:gl_in_process_context", | |
| 168 "//gpu/command_buffer/client:gles2_c_lib", | |
| 169 "//gpu/command_buffer/client:gles2_cmd_helper", | |
| 170 "//gpu/command_buffer/client:gles2_implementation", | |
| 171 "//gpu/command_buffer/client:gles2_interface", | |
| 172 "//gpu/command_buffer/common:gles2_utils", | |
| 173 "//gpu/command_buffer/service", | |
| 174 "//gpu/ipc/client", | |
| 175 "//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", | |
| 181 "//ipc", | |
| 182 "//ipc/mojo", | |
| 183 "//media", | |
| 184 "//media:shared_memory_support", | |
| 185 "//media/gpu/ipc/client", | |
| 186 "//media/gpu/ipc/common", | |
| 187 "//media/midi", | |
| 188 "//mojo/common:common_base", | |
| 189 "//mojo/edk/system", | |
| 190 "//net", | |
| 191 "//sandbox", | |
| 192 "//services/shell", | |
| 193 "//services/shell/public/cpp", | |
| 194 "//services/shell/public/interfaces", | |
| 195 "//services/shell/runner/common", | |
| 196 "//skia", | |
| 197 "//storage/common", | |
| 198 "//third_party/WebKit/public:blink", | |
| 199 "//third_party/boringssl", | |
| 200 "//third_party/icu", | |
| 201 "//third_party/libjingle", | |
| 202 "//third_party/webrtc/base:rtc_base", | |
| 203 "//ui/accessibility", | |
| 204 "//ui/base", | |
| 205 "//ui/base/ime", | |
| 206 "//ui/gfx", | |
| 207 "//ui/gfx/geometry", | |
| 208 "//ui/gfx/ipc", | |
| 209 "//ui/gfx/ipc/skia", | |
| 210 "//ui/gl", | 150 "//ui/gl", |
| 211 "//ui/latency_info/ipc", | 151 "//ui/platform_window", |
| 212 "//ui/shell_dialogs", | |
| 213 "//url", | |
| 214 "//url/ipc:url_ipc", | |
| 215 ] | 152 ] |
| 216 | |
| 217 defines = [] | |
| 218 include_dirs = [] | |
| 219 libs = [] | 153 libs = [] |
| 220 ldflags = [] | |
| 221 | |
| 222 if (is_android && use_seccomp_bpf) { | |
| 223 set_sources_assignment_filter([]) | |
| 224 sources += [ | |
| 225 "sandbox_linux/sandbox_bpf_base_policy_linux.cc", | |
| 226 "sandbox_linux/sandbox_bpf_base_policy_linux.h", | |
| 227 ] | |
| 228 set_sources_assignment_filter(sources_assignment_filter) | |
| 229 } | |
| 230 | 154 |
| 231 if (is_mac) { | 155 if (is_mac) { |
| 232 sources += [ | 156 sources += [ |
| 233 "gpu/media/vt_mac.h", | 157 "vt_mac.h", |
| 234 "gpu/media/vt_video_decode_accelerator_mac.cc", | 158 "vt_video_decode_accelerator_mac.cc", |
| 235 "gpu/media/vt_video_decode_accelerator_mac.h", | 159 "vt_video_decode_accelerator_mac.h", |
| 236 "gpu/media/vt_video_encode_accelerator_mac.cc", | 160 "vt_video_encode_accelerator_mac.cc", |
| 237 "gpu/media/vt_video_encode_accelerator_mac.h", | 161 "vt_video_encode_accelerator_mac.h", |
| 238 ] + get_target_outputs(":libvt_generate_stubs") | 162 ] + get_target_outputs(":libvt_generate_stubs") |
| 163 deps += [ ":libvt_generate_stubs" ] |
| 164 lib_dirs = [ "$mac_sdk_path/usr/lib" ] |
| 239 | 165 |
| 240 deps += [ | 166 # TODO(markdittmer): Determine which libs are needed here. |
| 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 += [ | 167 libs += [ |
| 251 "AVFoundation.framework", | 168 # "AVFoundation.framework", |
| 252 "CoreMedia.framework", | 169 # "CoreMedia.framework", |
| 253 "CoreVideo.framework", | 170 # "CoreVideo.framework", |
| 254 "IOSurface.framework", | 171 # "IOSurface.framework", |
| 255 "OpenGL.framework", | 172 # "OpenGL.framework", |
| 256 "QuartzCore.framework", | 173 # "QuartzCore.framework", |
| 257 "sandbox", | 174 # "sandbox", |
| 258 ] | |
| 259 } | |
| 260 | |
| 261 if (is_android) { | |
| 262 deps += [ | |
| 263 "//content/public/android:common_aidl", | |
| 264 "//content/public/android:jni", | |
| 265 ] | |
| 266 | |
| 267 libs += [ "android" ] | |
| 268 } | |
| 269 | |
| 270 if (is_debug && !is_component_build && enable_plugins) { | |
| 271 # Content depends on the PPAPI message logging stuff; if this isn't here, | |
| 272 # some unit test binaries won't compile. This only worked in release mode | |
| 273 # because logging is disabled there. | |
| 274 deps += [ "//ppapi/proxy:ipc_sources" ] | |
| 275 } | |
| 276 | |
| 277 if (use_ozone) { | |
| 278 deps += [ "//ui/ozone" ] | |
| 279 } else { | |
| 280 sources -= [ | |
| 281 "cursors/webcursor_ozone.cc", | |
| 282 "font_list_ozone.cc", | |
| 283 ] | |
| 284 } | |
| 285 | |
| 286 if (!use_aura || is_android) { | |
| 287 sources -= [ "cursors/webcursor_aura.cc" ] | |
| 288 } | |
| 289 | |
| 290 if (!use_aura || !use_x11) { | |
| 291 sources -= [ "cursors/webcursor_aurax11.cc" ] | |
| 292 } | |
| 293 | |
| 294 if (use_pango) { | |
| 295 configs += [ "//build/config/linux:pangocairo" ] | |
| 296 if (use_ozone) { | |
| 297 # If we're using pango, never use this ozone file (it was removed in all | |
| 298 # non-ozone cases above). | |
| 299 sources -= [ "font_list_ozone.cc" ] | |
| 300 } | |
| 301 } else { | |
| 302 sources -= [ "font_list_pango.cc" ] | |
| 303 } | |
| 304 | |
| 305 if (enable_plugins) { | |
| 306 deps += [ "//ppapi/shared_impl" ] | |
| 307 } else { | |
| 308 sources -= [ | |
| 309 "pepper_file_util.cc", | |
| 310 "pepper_file_util.h", | |
| 311 "pepper_messages.h", | |
| 312 "pepper_plugin_list.cc", | |
| 313 "pepper_plugin_list.h", | |
| 314 "pepper_renderer_instance_data.cc", | |
| 315 "pepper_renderer_instance_data.h", | |
| 316 "plugin_list.cc", | |
| 317 "plugin_list.h", | |
| 318 ] | 175 ] |
| 319 } | 176 } |
| 320 | 177 |
| 321 if (is_android) { | 178 if (is_android) { |
| 322 sources += [ | 179 sources += [ |
| 323 "gpu/media/android_copying_backing_strategy.cc", | 180 "android_copying_backing_strategy.cc", |
| 324 "gpu/media/android_copying_backing_strategy.h", | 181 "android_copying_backing_strategy.h", |
| 325 "gpu/media/android_deferred_rendering_backing_strategy.cc", | 182 "android_deferred_rendering_backing_strategy.cc", |
| 326 "gpu/media/android_deferred_rendering_backing_strategy.h", | 183 "android_deferred_rendering_backing_strategy.h", |
| 327 "gpu/media/android_video_decode_accelerator.cc", | 184 "android_video_decode_accelerator.cc", |
| 328 "gpu/media/android_video_decode_accelerator.h", | 185 "android_video_decode_accelerator.h", |
| 329 "gpu/media/avda_codec_image.cc", | 186 "avda_codec_image.cc", |
| 330 "gpu/media/avda_codec_image.h", | 187 "avda_codec_image.h", |
| 331 "gpu/media/avda_return_on_failure.h", | 188 "avda_return_on_failure.h", |
| 332 "gpu/media/avda_shared_state.cc", | 189 "avda_shared_state.cc", |
| 333 "gpu/media/avda_shared_state.h", | 190 "avda_shared_state.h", |
| 334 "gpu/media/avda_state_provider.h", | 191 "avda_state_provider.h", |
| 335 ] | 192 ] |
| 336 | 193 |
| 337 if (enable_webrtc) { | 194 if (enable_webrtc) { |
| 338 deps += [ "//third_party/libyuv" ] | 195 deps += [ "//third_party/libyuv" ] |
| 339 sources += [ | 196 sources += [ |
| 340 "gpu/media/android_video_encode_accelerator.cc", | 197 "android_video_encode_accelerator.cc", |
| 341 "gpu/media/android_video_encode_accelerator.h", | 198 "android_video_encode_accelerator.h", |
| 342 ] | 199 ] |
| 343 } | 200 } |
| 344 | 201 |
| 345 if (mojo_media_host == "gpu") { | 202 if (mojo_media_host == "gpu") { |
| 346 deps += [ "//media/mojo/services:cdm_service" ] | 203 deps += [ "//media/mojo/services:cdm_service" ] |
| 347 } | 204 } |
| 348 } | 205 } |
| 349 | 206 |
| 350 if (is_chromeos) { | 207 if (is_chromeos) { |
| 351 sources += [ | 208 sources += [ |
| 352 "gpu/media/accelerated_video_decoder.h", | 209 "accelerated_video_decoder.h", |
| 353 "gpu/media/h264_decoder.cc", | 210 "h264_decoder.cc", |
| 354 "gpu/media/h264_decoder.h", | 211 "h264_decoder.h", |
| 355 "gpu/media/h264_dpb.cc", | 212 "h264_dpb.cc", |
| 356 "gpu/media/h264_dpb.h", | 213 "h264_dpb.h", |
| 357 "gpu/media/vp8_decoder.cc", | 214 "vp8_decoder.cc", |
| 358 "gpu/media/vp8_decoder.h", | 215 "vp8_decoder.h", |
| 359 "gpu/media/vp8_picture.cc", | 216 "vp8_picture.cc", |
| 360 "gpu/media/vp8_picture.h", | 217 "vp8_picture.h", |
| 361 "gpu/media/vp9_decoder.cc", | 218 "vp9_decoder.cc", |
| 362 "gpu/media/vp9_decoder.h", | 219 "vp9_decoder.h", |
| 363 "gpu/media/vp9_picture.cc", | 220 "vp9_picture.cc", |
| 364 "gpu/media/vp9_picture.h", | 221 "vp9_picture.h", |
| 365 ] | 222 ] |
| 366 if (use_v4lplugin) { | 223 if (use_v4lplugin) { |
| 367 defines += [ "USE_LIBV4L2" ] | 224 defines += [ "USE_LIBV4L2" ] |
| 368 sources += get_target_outputs(":libv4l2_generate_stubs") | 225 sources += get_target_outputs(":libv4l2_generate_stubs") |
| 369 deps += [ ":libv4l2_generate_stubs" ] | 226 deps += [ ":libv4l2_generate_stubs" ] |
| 370 } | 227 } |
| 371 if (use_v4l2_codec) { | 228 if (use_v4l2_codec) { |
| 372 defines += [ "USE_V4L2_CODEC" ] | 229 defines += [ "USE_V4L2_CODEC" ] |
| 373 deps += [ "//third_party/libyuv" ] | 230 deps += [ "//third_party/libyuv" ] |
| 374 sources += [ | 231 sources += [ |
| 375 "gpu/media/generic_v4l2_device.cc", | 232 "generic_v4l2_device.cc", |
| 376 "gpu/media/generic_v4l2_device.h", | 233 "generic_v4l2_device.h", |
| 377 "gpu/media/v4l2_device.cc", | 234 "v4l2_device.cc", |
| 378 "gpu/media/v4l2_device.h", | 235 "v4l2_device.h", |
| 379 "gpu/media/v4l2_image_processor.cc", | 236 "v4l2_image_processor.cc", |
| 380 "gpu/media/v4l2_image_processor.h", | 237 "v4l2_image_processor.h", |
| 381 "gpu/media/v4l2_jpeg_decode_accelerator.cc", | 238 "v4l2_jpeg_decode_accelerator.cc", |
| 382 "gpu/media/v4l2_jpeg_decode_accelerator.h", | 239 "v4l2_jpeg_decode_accelerator.h", |
| 383 "gpu/media/v4l2_slice_video_decode_accelerator.cc", | 240 "v4l2_slice_video_decode_accelerator.cc", |
| 384 "gpu/media/v4l2_slice_video_decode_accelerator.h", | 241 "v4l2_slice_video_decode_accelerator.h", |
| 385 "gpu/media/v4l2_video_decode_accelerator.cc", | 242 "v4l2_video_decode_accelerator.cc", |
| 386 "gpu/media/v4l2_video_decode_accelerator.h", | 243 "v4l2_video_decode_accelerator.h", |
| 387 "gpu/media/v4l2_video_encode_accelerator.cc", | 244 "v4l2_video_encode_accelerator.cc", |
| 388 "gpu/media/v4l2_video_encode_accelerator.h", | 245 "v4l2_video_encode_accelerator.h", |
| 389 ] | 246 ] |
| 390 libs = [ | 247 libs = [ |
| 391 "EGL", | 248 "EGL", |
| 392 "GLESv2", | 249 "GLESv2", |
| 393 ] | 250 ] |
| 394 } | 251 } |
| 395 if (current_cpu == "arm") { | 252 if (current_cpu == "arm") { |
| 396 sources += [ | 253 sources += [ |
| 397 "gpu/media/tegra_v4l2_device.cc", | 254 "tegra_v4l2_device.cc", |
| 398 "gpu/media/tegra_v4l2_device.h", | 255 "tegra_v4l2_device.h", |
| 399 ] | 256 ] |
| 400 } | 257 } |
| 401 if (current_cpu != "arm") { | 258 if (current_cpu != "arm") { |
| 402 sources += [ | 259 sources += [ |
| 403 "gpu/media/va_surface.h", | 260 "va_surface.h", |
| 404 "gpu/media/vaapi_jpeg_decode_accelerator.cc", | 261 "vaapi_jpeg_decode_accelerator.cc", |
| 405 "gpu/media/vaapi_jpeg_decode_accelerator.h", | 262 "vaapi_jpeg_decode_accelerator.h", |
| 406 "gpu/media/vaapi_jpeg_decoder.cc", | 263 "vaapi_jpeg_decoder.cc", |
| 407 "gpu/media/vaapi_jpeg_decoder.h", | 264 "vaapi_jpeg_decoder.h", |
| 408 "gpu/media/vaapi_picture.cc", | 265 "vaapi_picture.cc", |
| 409 "gpu/media/vaapi_picture.h", | 266 "vaapi_picture.h", |
| 410 "gpu/media/vaapi_video_decode_accelerator.cc", | 267 "vaapi_video_decode_accelerator.cc", |
| 411 "gpu/media/vaapi_video_decode_accelerator.h", | 268 "vaapi_video_decode_accelerator.h", |
| 412 "gpu/media/vaapi_video_encode_accelerator.cc", | 269 "vaapi_video_encode_accelerator.cc", |
| 413 "gpu/media/vaapi_video_encode_accelerator.h", | 270 "vaapi_video_encode_accelerator.h", |
| 414 "gpu/media/vaapi_wrapper.cc", | 271 "vaapi_wrapper.cc", |
| 415 "gpu/media/vaapi_wrapper.h", | 272 "vaapi_wrapper.h", |
| 416 ] + get_target_outputs(":libva_generate_stubs") | 273 ] + get_target_outputs(":libva_generate_stubs") |
| 417 configs += [ | 274 configs += [ |
| 418 "//third_party/libva:libva_config", | 275 "//third_party/libva:libva_config", |
| 419 "//third_party/libyuv:libyuv_config", | 276 "//third_party/libyuv:libyuv_config", |
| 420 ] | 277 ] |
| 421 deps += [ | 278 deps += [ |
| 422 ":libva_generate_stubs", | 279 ":libva_generate_stubs", |
| 423 "//media", | 280 "//media", |
| 424 "//third_party/libyuv", | 281 "//third_party/libyuv", |
| 425 ] | 282 ] |
| 426 if (use_x11) { | 283 if (use_x11) { |
| 427 sources += [ | 284 sources += [ |
| 428 "gpu/media/vaapi_tfp_picture.cc", | 285 "vaapi_tfp_picture.cc", |
| 429 "gpu/media/vaapi_tfp_picture.h", | 286 "vaapi_tfp_picture.h", |
| 430 ] | 287 ] |
| 431 } | 288 } |
| 432 if (use_ozone) { | 289 if (use_ozone) { |
| 433 sources += [ | 290 sources += [ |
| 434 "gpu/media/vaapi_drm_picture.cc", | 291 "vaapi_drm_picture.cc", |
| 435 "gpu/media/vaapi_drm_picture.h", | 292 "vaapi_drm_picture.h", |
| 436 ] | 293 ] |
| 437 } | 294 } |
| 438 } | 295 } |
| 439 } | 296 } |
| 440 | 297 |
| 441 if (is_win) { | 298 if (is_win) { |
| 442 sources += [ | 299 sources += [ |
| 443 "gpu/media/dxva_video_decode_accelerator_win.cc", | 300 "dxva_video_decode_accelerator_win.cc", |
| 444 "gpu/media/dxva_video_decode_accelerator_win.h", | 301 "dxva_video_decode_accelerator_win.h", |
| 445 ] | 302 ] |
| 446 configs += [ "//third_party/khronos:khronos_headers" ] | 303 configs += [ "//third_party/khronos:khronos_headers" ] |
| 447 deps += [ "//ui/gl" ] | 304 deps += [ "//ui/gl" ] |
| 448 libs += [ | 305 libs += [ |
| 449 "d3d9.lib", | 306 "d3d9.lib", |
| 450 "d3d11.lib", | 307 "d3d11.lib", |
| 451 "dxva2.lib", | 308 "dxva2.lib", |
| 452 "strmiids.lib", | 309 "strmiids.lib", |
| 453 "mf.lib", | 310 "mf.lib", |
| 454 "mfplat.lib", | 311 "mfplat.lib", |
| 455 "mfuuid.lib", | 312 "mfuuid.lib", |
| 456 ] | 313 ] |
| 457 ldflags += [ | 314 ldflags += [ |
| 458 "/DELAYLOAD:d3d9.dll", | 315 "/DELAYLOAD:d3d9.dll", |
| 459 "/DELAYLOAD:d3d11.dll", | 316 "/DELAYLOAD:d3d11.dll", |
| 460 "/DELAYLOAD:dxva2.dll", | 317 "/DELAYLOAD:dxva2.dll", |
| 461 "/DELAYLOAD:mf.dll", | 318 "/DELAYLOAD:mf.dll", |
| 462 "/DELAYLOAD:mfplat.dll", | 319 "/DELAYLOAD:mfplat.dll", |
| 463 ] | 320 ] |
| 464 | 321 |
| 465 # TODO(GYP): extract_xinput action. | 322 # TODO(GYP): extract_xinput action. |
| 466 } | 323 } |
| 467 | 324 |
| 468 if (!is_win || !use_aura) { | 325 if (use_x11) { |
| 469 sources -= [ "cursors/webcursor_aurawin.cc" ] | 326 deps += [ "//ui/gfx/x" ] |
| 470 } | 327 } |
| 328 } |
| 471 | 329 |
| 472 if (use_seccomp_bpf) { | 330 if (is_android) { |
| 473 defines += [ "USE_SECCOMP_BPF" ] | 331 # TODO(GYP): Port Windows and ChromeOS logic. |
| 474 } else { | 332 test("video_decode_accelerator_unittest") { |
| 475 if (is_linux) { | 333 deps = [ |
| 476 sources -= [ | 334 "//base", |
| 477 "sandbox_linux/bpf_cros_arm_gpu_policy_linux.cc", | 335 "//media", |
| 478 "sandbox_linux/bpf_cros_arm_gpu_policy_linux.h", | 336 "//testing/gtest", |
| 479 "sandbox_linux/bpf_gpu_policy_linux.cc", | 337 "//ui/base", |
| 480 "sandbox_linux/bpf_gpu_policy_linux.h", | 338 "//ui/gfx", |
| 481 "sandbox_linux/bpf_ppapi_policy_linux.cc", | 339 "//ui/gfx:test_support", |
| 482 "sandbox_linux/bpf_ppapi_policy_linux.h", | 340 "//ui/gfx/geometry", |
| 483 "sandbox_linux/bpf_renderer_policy_linux.cc", | 341 "//ui/gl", |
| 484 "sandbox_linux/bpf_renderer_policy_linux.h", | 342 "//ui/gl:test_support", |
| 485 "sandbox_linux/bpf_utility_policy_linux.cc", | 343 ] |
| 486 "sandbox_linux/bpf_utility_policy_linux.h", | 344 configs += [ "//third_party/khronos:khronos_headers" ] |
| 487 "sandbox_linux/sandbox_bpf_base_policy_linux.cc", | 345 sources = [ |
| 488 "sandbox_linux/sandbox_bpf_base_policy_linux.h", | 346 "video_accelerator_unittest_helpers.h", |
| 347 ] |
| 348 if (is_android) { |
| 349 sources += [ "android_video_decode_accelerator_unittest.cc" ] |
| 350 } else { |
| 351 sources += [ |
| 352 "rendering_helper.cc", |
| 353 "rendering_helper.h", |
| 354 "video_decode_accelerator_unittest.cc", |
| 489 ] | 355 ] |
| 490 } | 356 } |
| 357 |
| 491 if (is_android) { | 358 if (is_android) { |
| 492 sources -= [ | 359 deps += [ |
| 493 "sandbox_linux/android/sandbox_bpf_base_policy_android.cc", | 360 "//gpu:test_support", |
| 494 "sandbox_linux/android/sandbox_bpf_base_policy_android.h", | 361 "//media/base/android", |
| 362 "//media/base/android:media_java", |
| 363 "//media/capture/video/android:capture_java", |
| 364 "//testing/gmock", |
| 365 "//ui/android:ui_java", |
| 495 ] | 366 ] |
| 496 } | 367 } |
| 497 } | 368 } |
| 498 } | 369 } |
| 499 | |
| 500 # See comment at the top of //content/BUILD.gn for how this works. | |
| 501 group("for_content_tests") { | |
| 502 visibility = [ "//content/test/*" ] | |
| 503 if (!is_component_build) { | |
| 504 public_deps = [ | |
| 505 ":common", | |
| 506 ] | |
| 507 } | |
| 508 } | |
| 509 | |
| 510 mojom("mojo_bindings") { | |
| 511 # This interface is internal to content. However, this is not exported from | |
| 512 # the content component shared library. Code in content but outside of the | |
| 513 # content component (content/test or content/shell) should link to this | |
| 514 # directly. | |
| 515 visibility = [ "//content/*" ] | |
| 516 | |
| 517 sources = [ | |
| 518 "application_setup.mojom", | |
| 519 "background_sync_service.mojom", | |
| 520 "image_downloader/image_downloader.mojom", | |
| 521 "leveldb_wrapper.mojom", | |
| 522 "presentation/presentation_service.mojom", | |
| 523 "process_control.mojom", | |
| 524 "render_frame_setup.mojom", | |
| 525 "render_widget_window_tree_client_factory.mojom", | |
| 526 "service_worker/embedded_worker_setup.mojom", | |
| 527 "storage_partition_service.mojom", | |
| 528 "vr_service.mojom", | |
| 529 ] | |
| 530 | |
| 531 import_dirs = [ "//mojo/services" ] | |
| 532 | |
| 533 typemaps = [ "//url/mojo/origin.typemap" ] | |
| 534 | |
| 535 public_deps = [ | |
| 536 "//components/leveldb/public/interfaces", | |
| 537 "//components/mus/public/interfaces", | |
| 538 "//content/public/common:mojo_bindings", | |
| 539 "//services/shell/public/interfaces", | |
| 540 "//skia/public/interfaces", | |
| 541 "//third_party/WebKit/public:mojo_bindings", | |
| 542 "//ui/mojo/geometry:interfaces", | |
| 543 "//url/mojo:url_mojom_origin", | |
| 544 ] | |
| 545 } | |
| OLD | NEW |