OLD | NEW |
1 # Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. | 1 # Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. |
2 # | 2 # |
3 # Use of this source code is governed by a BSD-style license | 3 # Use of this source code is governed by a BSD-style license |
4 # that can be found in the LICENSE file in the root of the source | 4 # that can be found in the LICENSE file in the root of the source |
5 # tree. An additional intellectual property rights grant can be found | 5 # tree. An additional intellectual property rights grant can be found |
6 # in the file PATENTS. All contributing project authors may | 6 # in the file PATENTS. All contributing project authors may |
7 # be found in the AUTHORS file in the root of the source tree. | 7 # be found in the AUTHORS file in the root of the source tree. |
8 | 8 |
9 import("//build/config/ui.gni") | 9 import("//build/config/ui.gni") |
10 import("../../build/webrtc.gni") | 10 import("../../build/webrtc.gni") |
11 import("desktop_capture.gni") | |
12 | 11 |
13 use_desktop_capture_differ_sse2 = | 12 use_desktop_capture_differ_sse2 = |
14 !is_ios && (current_cpu == "x86" || current_cpu == "x64") | 13 !is_ios && (current_cpu == "x86" || current_cpu == "x64") |
15 | 14 |
16 rtc_static_library("primitives") { | 15 rtc_static_library("primitives") { |
17 sources = [ | 16 sources = [ |
18 "desktop_capture_types.h", | 17 "desktop_capture_types.h", |
19 "desktop_frame.cc", | 18 "desktop_frame.cc", |
20 "desktop_frame.h", | 19 "desktop_frame.h", |
21 "desktop_geometry.cc", | 20 "desktop_geometry.cc", |
22 "desktop_geometry.h", | 21 "desktop_geometry.h", |
23 "desktop_region.cc", | 22 "desktop_region.cc", |
24 "desktop_region.h", | 23 "desktop_region.h", |
25 "shared_desktop_frame.cc", | 24 "shared_desktop_frame.cc", |
26 "shared_desktop_frame.h", | 25 "shared_desktop_frame.h", |
27 ] | 26 ] |
28 | 27 |
29 deps = [ | 28 deps = [ |
30 "../../base:rtc_base", # TODO(kjellander): Cleanup in bugs.webrtc.org/3806. | 29 "../../base:rtc_base", # TODO(kjellander): Cleanup in bugs.webrtc.org/3806. |
31 ] | 30 ] |
32 } | 31 } |
33 | 32 |
34 if (rtc_include_tests) { | 33 if (rtc_include_tests) { |
35 source_set("rgba_color") { | 34 source_set("desktop_capture_test_tools") { |
36 testonly = true | 35 testonly = true |
37 | 36 |
38 public_deps = [ | 37 public_deps = [ |
39 ":desktop_capture", | 38 ":desktop_capture", |
40 ] | 39 ] |
41 | 40 |
42 sources = [ | 41 sources = [ |
43 "rgba_color.cc", | 42 "rgba_color.cc", |
44 "rgba_color.h", | 43 "rgba_color.h", |
45 ] | |
46 } | |
47 | |
48 source_set("screen_drawer") { | |
49 testonly = true | |
50 | |
51 public_deps = [ | |
52 ":rgba_color", | |
53 ] | |
54 | |
55 sources = [ | |
56 "screen_drawer.cc", | 44 "screen_drawer.cc", |
57 "screen_drawer.h", | 45 "screen_drawer.h", |
58 "screen_drawer_linux.cc", | 46 "screen_drawer_linux.cc", |
59 "screen_drawer_mac.cc", | 47 "screen_drawer_mac.cc", |
60 "screen_drawer_win.cc", | 48 "screen_drawer_win.cc", |
61 ] | 49 ] |
62 } | 50 } |
63 | |
64 source_set("desktop_capture_mock") { | |
65 testonly = true | |
66 | |
67 public_deps = [ | |
68 ":desktop_capture", | |
69 ":rgba_color", | |
70 ] | |
71 | |
72 sources = [ | |
73 "desktop_frame_generator.cc", | |
74 "desktop_frame_generator.h", | |
75 "fake_desktop_capturer.h", | |
76 "fake_screen_capturer.cc", | |
77 "fake_screen_capturer.h", | |
78 "mock_desktop_capturer_callback.h", | |
79 "screen_capturer_mock_objects.h", | |
80 ] | |
81 } | |
82 } | 51 } |
83 | 52 |
84 rtc_static_library("desktop_capture") { | 53 rtc_static_library("desktop_capture") { |
85 sources = [ | 54 sources = [ |
86 "cropped_desktop_frame.cc", | 55 "cropped_desktop_frame.cc", |
87 "cropped_desktop_frame.h", | 56 "cropped_desktop_frame.h", |
88 "cropping_window_capturer.cc", | 57 "cropping_window_capturer.cc", |
89 "cropping_window_capturer.h", | 58 "cropping_window_capturer.h", |
90 "cropping_window_capturer_win.cc", | 59 "cropping_window_capturer_win.cc", |
91 "desktop_and_cursor_composer.cc", | 60 "desktop_and_cursor_composer.cc", |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
175 if (!is_win && !is_mac && !use_x11) { | 144 if (!is_win && !is_mac && !use_x11) { |
176 sources += [ | 145 sources += [ |
177 "mouse_cursor_monitor_null.cc", | 146 "mouse_cursor_monitor_null.cc", |
178 "screen_capturer_null.cc", | 147 "screen_capturer_null.cc", |
179 "window_capturer_null.cc", | 148 "window_capturer_null.cc", |
180 ] | 149 ] |
181 } | 150 } |
182 | 151 |
183 if (!is_ios) { | 152 if (!is_ios) { |
184 sources += [ | 153 sources += [ |
185 "desktop_capturer_differ_wrapper.cc", | |
186 "desktop_capturer_differ_wrapper.h", | |
187 "differ_block.cc", | 154 "differ_block.cc", |
188 "differ_block.h", | 155 "differ_block.h", |
189 "screen_capturer_differ_wrapper.cc", | 156 "screen_capturer_differ_wrapper.cc", |
190 "screen_capturer_differ_wrapper.h", | 157 "screen_capturer_differ_wrapper.h", |
191 ] | 158 ] |
192 } | 159 } |
193 | 160 |
194 if (is_mac) { | 161 if (is_mac) { |
195 libs = [ | 162 libs = [ |
196 "AppKit.framework", | 163 "AppKit.framework", |
(...skipping 11 matching lines...) Expand all Loading... |
208 | 175 |
209 deps = [ | 176 deps = [ |
210 ":primitives", | 177 ":primitives", |
211 "../../base:rtc_base", # TODO(kjellander): Cleanup in bugs.webrtc.org/3806. | 178 "../../base:rtc_base", # TODO(kjellander): Cleanup in bugs.webrtc.org/3806. |
212 "../../system_wrappers", | 179 "../../system_wrappers", |
213 ] | 180 ] |
214 | 181 |
215 if (use_desktop_capture_differ_sse2) { | 182 if (use_desktop_capture_differ_sse2) { |
216 deps += [ ":desktop_capture_differ_sse2" ] | 183 deps += [ ":desktop_capture_differ_sse2" ] |
217 } | 184 } |
218 | |
219 if (rtc_desktop_capture_supported) { | |
220 defines = [ "RTC_DESKTOP_CAPTURE_SUPPORTED" ] | |
221 } | |
222 } | 185 } |
223 | 186 |
224 if (use_desktop_capture_differ_sse2) { | 187 if (use_desktop_capture_differ_sse2) { |
225 # Have to be compiled as a separate target because it needs to be compiled | 188 # Have to be compiled as a separate target because it needs to be compiled |
226 # with SSE2 enabled. | 189 # with SSE2 enabled. |
227 rtc_static_library("desktop_capture_differ_sse2") { | 190 rtc_static_library("desktop_capture_differ_sse2") { |
228 visibility = [ ":*" ] | 191 visibility = [ ":*" ] |
229 sources = [ | 192 sources = [ |
230 "differ_vector_sse2.cc", | 193 "differ_vector_sse2.cc", |
231 "differ_vector_sse2.h", | 194 "differ_vector_sse2.h", |
232 ] | 195 ] |
233 | 196 |
234 if (is_posix) { | 197 if (is_posix) { |
235 cflags = [ "-msse2" ] | 198 cflags = [ "-msse2" ] |
236 } | 199 } |
237 } | 200 } |
238 } | 201 } |
OLD | NEW |