Reland of Refactor webrtc/modules/desktop_capture for GN check
Reason for revert:
Trying to reland this CL.
Original issue's description:
> Revert of Refactor webrtc/modules/desktop_capture for GN check (patchset #1 id:1 of https://codereview.webrtc.org/2593713002/ )
>
> Reason for revert:
> Apparently breaks Chromium compile for unknown reason:
> https://build.chromium.org/p/chromium.webrtc.fyi/builders/Linux%20Builder/builds/12314
>
> Original issue's description:
> > Refactor webrtc/modules/desktop_capture for GN check
> >
> > This moves some GN check configurations out of .gn to individual
> > targets.
> >
> > The now checked target is:
> > "//webrtc/modules/desktop_capture/*"
> >
> > BUG=webrtc:6828
> > NOTRY=True
> >
> > Review-Url: https://codereview.webrtc.org/2593713002
> > Cr-Commit-Position: refs/heads/master@{#15725}
> > Committed: https://chromium.googlesource.com/external/webrtc/+/70870b921148fdc10d1131958a03d45f0f83f6fa
>
> TBR=sergeyu@chromium.org,mbonadei@webrtc.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=webrtc:6828
>
> Review-Url: https://codereview.webrtc.org/2597923002
> Cr-Commit-Position: refs/heads/master@{#15750}
> Committed: https://chromium.googlesource.com/external/webrtc/+/d943c4845439aab311212b881d05ca0f2bb493f8
TBR=sergeyu@chromium.org,kjellander@webrtc.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=webrtc:6828
Review-Url: https://codereview.webrtc.org/2609523002
Cr-Commit-Position: refs/heads/master@{#15832}
diff --git a/.gn b/.gn
index c82d480..ca3a6a7 100644
--- a/.gn
+++ b/.gn
@@ -31,6 +31,7 @@
"//webrtc/modules/audio_processing/*",
"//webrtc/modules/bitrate_controller/*",
"//webrtc/modules/congestion_controller/*",
+ "//webrtc/modules/desktop_capture/*",
"//webrtc/modules/media_file/*",
"//webrtc/modules/pacing/*",
"//webrtc/modules/rtp_rtcp/*",
diff --git a/webrtc/modules/desktop_capture/BUILD.gn b/webrtc/modules/desktop_capture/BUILD.gn
index 5d27994..4920611 100644
--- a/webrtc/modules/desktop_capture/BUILD.gn
+++ b/webrtc/modules/desktop_capture/BUILD.gn
@@ -22,9 +22,12 @@
"desktop_region.h",
"shared_desktop_frame.cc",
"shared_desktop_frame.h",
+ "shared_memory.cc",
+ "shared_memory.h",
]
deps = [
+ "../..:webrtc_common",
"../../base:rtc_base", # TODO(kjellander): Cleanup in bugs.webrtc.org/3806.
]
}
@@ -41,6 +44,11 @@
"rgba_color.cc",
"rgba_color.h",
]
+
+ deps = [
+ ":primitives",
+ "../..:webrtc_common",
+ ]
}
source_set("screen_drawer") {
@@ -57,6 +65,12 @@
"screen_drawer_mac.cc",
"screen_drawer_win.cc",
]
+
+ deps = [
+ ":primitives",
+ "../../base:rtc_base_approved",
+ "../../system_wrappers",
+ ]
}
source_set("desktop_capture_mock") {
@@ -75,7 +89,12 @@
"fake_desktop_capturer.h",
"mock_desktop_capturer_callback.cc",
"mock_desktop_capturer_callback.h",
- "screen_capturer_mock_objects.h",
+ ]
+
+ deps = [
+ ":primitives",
+ "../../base:rtc_base_approved",
+ "../../test:test_support",
]
}
}
@@ -121,8 +140,6 @@
"screen_capturer_helper.h",
"screen_capturer_mac.mm",
"screen_capturer_win.cc",
- "shared_memory.cc",
- "shared_memory.h",
"win/cursor.cc",
"win/cursor.h",
"win/d3d_device.cc",
@@ -198,6 +215,7 @@
deps = [
":primitives",
+ "../..:webrtc_common",
"../../base:rtc_base", # TODO(kjellander): Cleanup in bugs.webrtc.org/3806.
"../../system_wrappers",
"//third_party/libyuv",
diff --git a/webrtc/modules/desktop_capture/desktop_capture_types.h b/webrtc/modules/desktop_capture/desktop_capture_types.h
index 3e41796..9a6162a 100644
--- a/webrtc/modules/desktop_capture/desktop_capture_types.h
+++ b/webrtc/modules/desktop_capture/desktop_capture_types.h
@@ -13,7 +13,6 @@
#include <stdint.h>
-#include "webrtc/modules/desktop_capture/desktop_geometry.h"
#include "webrtc/typedefs.h"
namespace webrtc {
@@ -40,4 +39,3 @@
} // namespace webrtc
#endif // WEBRTC_MODULES_DESKTOP_CAPTURE_DESKTOP_CAPTURE_TYPES_H_
-
diff --git a/webrtc/modules/desktop_capture/shared_desktop_frame.cc b/webrtc/modules/desktop_capture/shared_desktop_frame.cc
index 3114235..fd67c74 100644
--- a/webrtc/modules/desktop_capture/shared_desktop_frame.cc
+++ b/webrtc/modules/desktop_capture/shared_desktop_frame.cc
@@ -13,7 +13,6 @@
#include <memory>
#include "webrtc/base/constructormagic.h"
-#include "webrtc/system_wrappers/include/atomic32.h"
namespace webrtc {