webrtc/modules/desktop_capture
Markus Handell ad5037b4a8 Reland "Refactor the PlatformThread API."
This reverts commit 793bac569f.

Reason for revert: rare compilation error fixed

Original change's description:
> Revert "Refactor the PlatformThread API."
>
> This reverts commit c89fdd716c.
>
> Reason for revert: Causes rare compilation error on win-libfuzzer-asan trybot.
> See https://ci.chromium.org/p/chromium/builders/try/win-libfuzzer-asan-rel/713745?
>
> Original change's description:
> > Refactor the PlatformThread API.
> >
> > PlatformThread's API is using old style function pointers, causes
> > casting, is unintuitive and forces artificial call sequences, and
> > is additionally possible to misuse in release mode.
> >
> > Fix this by an API face lift:
> > 1. The class is turned into a handle, which can be empty.
> > 2. The only way of getting a non-empty PlatformThread is by calling
> > SpawnJoinable or SpawnDetached, clearly conveying the semantics to the
> > code reader.
> > 3. Handles can be Finalized, which works differently for joinable and
> > detached threads:
> >   a) Handles for detached threads are simply closed where applicable.
> >   b) Joinable threads are joined before handles are closed.
> > 4. The destructor finalizes handles. No explicit call is needed.
> >
> > Fixed: webrtc:12727
> > Change-Id: Id00a0464edf4fc9e552b6a1fbb5d2e1280e88811
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/215075
> > Commit-Queue: Markus Handell <handellm@webrtc.org>
> > Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> > Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> > Reviewed-by: Tommi <tommi@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#33923}
>
> # Not skipping CQ checks because original CL landed > 1 day ago.
>
> TBR=handellm@webrtc.org
>
> Bug: webrtc:12727
> Change-Id: Ic0146be8866f6dd3ad9c364fb8646650b8e07419
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/217583
> Reviewed-by: Guido Urdaneta <guidou@webrtc.org>
> Reviewed-by: Markus Handell <handellm@webrtc.org>
> Commit-Queue: Guido Urdaneta <guidou@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#33936}

# Not skipping CQ checks because this is a reland.

Bug: webrtc:12727
Change-Id: Ifd6f44eac72fed84474277a1be03eb84d2f4376e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/217881
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Markus Handell <handellm@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33950}
2021-05-07 14:14:43 +00:00
..
linux Simplify reference counting implementation of PendingTaskSafetyFlag. 2021-04-21 07:04:01 +00:00
mac Simplify reference counting implementation of PendingTaskSafetyFlag. 2021-04-21 07:04:01 +00:00
win Add DesktopCaptureOptions to allow WGC capturer. 2021-04-26 18:00:59 +00:00
blank_detector_desktop_capturer_wrapper_unittest.cc Fully qualify googletest symbols. 2019-04-09 17:18:20 +00:00
blank_detector_desktop_capturer_wrapper.cc Add missing interface methods. 2020-02-18 22:36:00 +00:00
blank_detector_desktop_capturer_wrapper.h Add missing interface methods. 2020-02-18 22:36:00 +00:00
BUILD.gn Add GetTopLeft to WgcCaptureSource to facilitate cursor capture. 2021-04-23 16:46:49 +00:00
cropped_desktop_frame_unittest.cc Use std::make_unique instead of absl::make_unique. 2019-09-17 15:47:29 +00:00
cropped_desktop_frame.cc Format almost everything. 2019-07-08 13:45:15 +00:00
cropped_desktop_frame.h [Cleanup] Add missing #include. Remove useless ones. IWYU part 2. 2018-11-28 18:25:07 +00:00
cropping_window_capturer_win.cc Add Presentation Mode Support for Capturing OpenOffice Impress document windows 2020-11-05 21:22:19 +00:00
cropping_window_capturer.cc Format almost everything. 2019-07-08 13:45:15 +00:00
cropping_window_capturer.h Implement handling for MS PowerPoint Presentation Mode. 2019-12-03 19:17:24 +00:00
DEPS Can use the given IOSurfaceRef to reach higher capture framerate on Mac 2018-04-10 00:37:59 +00:00
desktop_and_cursor_composer_unittest.cc Add may_contain_cursor property to DesktopFrame to avoid double capture 2021-04-19 22:58:15 +00:00
desktop_and_cursor_composer.cc Add may_contain_cursor property to DesktopFrame to avoid double capture 2021-04-19 22:58:15 +00:00
desktop_and_cursor_composer.h Add missing interface methods. 2020-02-18 22:36:00 +00:00
desktop_capture_metrics_helper.cc Add telemetry to measure usage, perf, and errors in Desktop Capturers. 2021-04-13 23:30:52 +00:00
desktop_capture_metrics_helper.h Add telemetry to measure usage, perf, and errors in Desktop Capturers. 2021-04-13 23:30:52 +00:00
desktop_capture_options.cc Revert "Improve screen sharing with PipeWire on Wayland" 2020-10-14 08:26:18 +00:00
desktop_capture_options.h Add DesktopCaptureOptions to allow WGC capturer. 2021-04-26 18:00:59 +00:00
desktop_capture_types.h Add telemetry to measure usage, perf, and errors in Desktop Capturers. 2021-04-13 23:30:52 +00:00
desktop_capturer_differ_wrapper_unittest.cc Fully qualify googletest symbols. 2019-04-09 17:18:20 +00:00
desktop_capturer_differ_wrapper.cc Format almost everything. 2019-07-08 13:45:15 +00:00
desktop_capturer_differ_wrapper.h RTC_EXPORT webrtc::DesktopCapturerDifferWrapper. 2019-10-23 23:34:46 +00:00
desktop_capturer_wrapper.cc Implement DesktopCapturerWrapper and CaptureResultDesktopCapturerWrapper 2017-09-15 18:56:26 +00:00
desktop_capturer_wrapper.h [Cleanup] Add missing #include. Remove useless ones. IWYU part 2. 2018-11-28 18:25:07 +00:00
desktop_capturer.cc Add DesktopCaptureOptions to allow WGC capturer. 2021-04-26 18:00:59 +00:00
desktop_capturer.h Explicitly set and use WEBRTC_USE_X11 instead of USE_X11. 2019-12-13 09:36:25 +00:00
desktop_frame_generator.cc Format almost everything. 2019-07-08 13:45:15 +00:00
desktop_frame_generator.h
desktop_frame_rotation_unittest.cc [Cleanup] Add missing #include. Remove useless ones. IWYU part 2. 2018-11-28 18:25:07 +00:00
desktop_frame_rotation.cc [Cleanup] Add missing #include. Remove useless ones. IWYU part 2. 2018-11-28 18:25:07 +00:00
desktop_frame_rotation.h
desktop_frame_unittest.cc Use std::make_unique instead of absl::make_unique. 2019-09-17 15:47:29 +00:00
desktop_frame_win.cc Reformat the WebRTC code base 2018-06-19 14:00:39 +00:00
desktop_frame_win.h Format almost everything. 2019-07-08 13:45:15 +00:00
desktop_frame.cc Fixing a buffer copy issue in DesktopFrame 2021-04-09 20:48:32 +00:00
desktop_frame.h Add may_contain_cursor property to DesktopFrame to avoid double capture 2021-04-19 22:58:15 +00:00
desktop_geometry_unittest.cc
desktop_geometry.cc Include menus & dialogs in frames captured by WindowCapturerWin 2019-08-21 07:55:07 +00:00
desktop_geometry.h Reland "Reland "Reland "Reland "Reland "Implemented screen enumeration and selection for desktop capture under X11 using the X Resize and Rotate extension version 1.5.""""" 2020-02-26 20:35:54 +00:00
desktop_region_unittest.cc Format almost everything. 2019-07-08 13:45:15 +00:00
desktop_region.cc Format almost everything. 2019-07-08 13:45:15 +00:00
desktop_region.h Add missing RTC_EXPORT for the Chromium Windows build. 2019-11-07 09:32:24 +00:00
differ_block_unittest.cc [Cleanup] Add missing #include. Remove useless ones. IWYU part 2. 2018-11-28 18:25:07 +00:00
differ_block.cc Refactor cpu_features_wrapper.h functions from C to C++. 2020-09-07 08:44:24 +00:00
differ_block.h Reformat the WebRTC code base 2018-06-19 14:00:39 +00:00
differ_vector_sse2.cc Reformat the WebRTC code base 2018-06-19 14:00:39 +00:00
differ_vector_sse2.h
fake_desktop_capturer.cc [Cleanup] Add missing #include. Remove useless ones. IWYU part 2. 2018-11-28 18:25:07 +00:00
fake_desktop_capturer.h [Cleanup] Add missing #include. Remove useless ones. IWYU part 2. 2018-11-28 18:25:07 +00:00
fallback_desktop_capturer_wrapper_unittest.cc Format almost everything. 2019-07-08 13:45:15 +00:00
fallback_desktop_capturer_wrapper.cc Use SequenceChecker from public API 2021-02-10 15:04:55 +00:00
fallback_desktop_capturer_wrapper.h Revert "Desktop capturer: Add OnDisplayChanged callback" 2018-12-22 00:10:40 +00:00
full_screen_application_handler.cc Implement handling for MS PowerPoint Presentation Mode. 2019-12-03 19:17:24 +00:00
full_screen_application_handler.h Implement handling for MS PowerPoint Presentation Mode. 2019-12-03 19:17:24 +00:00
full_screen_window_detector.cc Implement handling for MS PowerPoint Presentation Mode. 2019-12-03 19:17:24 +00:00
full_screen_window_detector.h Simplify reference counting implementation of PendingTaskSafetyFlag. 2021-04-21 07:04:01 +00:00
mock_desktop_capturer_callback.cc
mock_desktop_capturer_callback.h Replace mock macros with unified MOCK_METHOD macro 2020-05-28 14:11:53 +00:00
mouse_cursor_monitor_linux.cc Explicitly set and use WEBRTC_USE_X11 instead of USE_X11. 2019-12-13 09:36:25 +00:00
mouse_cursor_monitor_mac.mm Implement handling for MS PowerPoint Presentation Mode. 2019-12-03 19:17:24 +00:00
mouse_cursor_monitor_null.cc Format almost everything. 2019-07-08 13:45:15 +00:00
mouse_cursor_monitor_unittest.cc Revert "Reland "reenable mouse_cursor_monitor tests on linux"" 2020-09-07 18:29:13 +00:00
mouse_cursor_monitor_win.cc Include menus & dialogs in frames captured by WindowCapturerWin 2019-08-21 07:55:07 +00:00
mouse_cursor_monitor.h Make deprecated OnMouseCursorPosition overload optional. 2020-01-17 23:14:21 +00:00
mouse_cursor.cc Reformat the WebRTC code base 2018-06-19 14:00:39 +00:00
mouse_cursor.h Export symbols needed by the Chromium component build (part 8). 2019-04-02 10:13:36 +00:00
OWNERS Updating the OWNERS file for desktop capture 2020-09-15 21:34:24 +00:00
resolution_tracker.cc
resolution_tracker.h
rgba_color_unittest.cc [Cleanup] Add missing #include. Remove useless ones. IWYU part 2. 2018-11-28 18:25:07 +00:00
rgba_color.cc Format almost everything. 2019-07-08 13:45:15 +00:00
rgba_color.h
screen_capture_frame_queue.h (4) Rename files to snake_case: update BUILD.gn, include paths, header guards, and DEPS entries 2019-01-11 17:11:39 +00:00
screen_capturer_darwin.mm Can use the given IOSurfaceRef to reach higher capture framerate on Mac 2018-04-10 00:37:59 +00:00
screen_capturer_helper_unittest.cc Fully qualify googletest symbols. 2019-04-09 17:18:20 +00:00
screen_capturer_helper.cc Replace RWLockWrapper --> Mutex in ScreenCapturerHelper 2020-11-03 07:52:42 +00:00
screen_capturer_helper.h Replace RWLockWrapper --> Mutex in ScreenCapturerHelper 2020-11-03 07:52:42 +00:00
screen_capturer_integration_test.cc Fully qualify googletest symbols. 2019-04-09 17:18:20 +00:00
screen_capturer_linux.cc Improve screen sharing with PipeWire on Wayland 2020-12-03 17:33:19 +00:00
screen_capturer_mac_unittest.cc Fully qualify googletest symbols. 2019-04-09 17:18:20 +00:00
screen_capturer_null.cc
screen_capturer_unittest.cc Don't crash the test process when X11 isn't available. 2019-12-16 09:57:59 +00:00
screen_capturer_win.cc Reformat the WebRTC code base 2018-06-19 14:00:39 +00:00
screen_drawer_linux.cc Use std::make_unique instead of absl::make_unique. 2019-09-17 15:47:29 +00:00
screen_drawer_lock_posix.cc Stop using LOG macros in favor of RTC_ prefixed macros. 2017-11-09 11:56:32 +00:00
screen_drawer_lock_posix.h
screen_drawer_mac.cc Use std::make_unique instead of absl::make_unique. 2019-09-17 15:47:29 +00:00
screen_drawer_unittest.cc Reland "Refactor the PlatformThread API." 2021-05-07 14:14:43 +00:00
screen_drawer_win.cc
screen_drawer.cc
screen_drawer.h [Cleanup] Add missing #include. Remove useless ones. IWYU part 2. 2018-11-28 18:25:07 +00:00
shared_desktop_frame.cc [Cleanup] Add missing #include. Remove useless ones. IWYU part 2. 2018-11-28 18:25:07 +00:00
shared_desktop_frame.h Make RefCountedObject require overriding virtual methods 2021-04-26 11:05:19 +00:00
shared_memory.cc Reformat the WebRTC code base 2018-06-19 14:00:39 +00:00
shared_memory.h Add missing RTC_EXPORT for the component build. 2019-10-15 09:07:44 +00:00
test_utils_unittest.cc Don't crash the test process when X11 isn't available. 2019-12-16 09:57:59 +00:00
test_utils.cc [Cleanup] Add missing #include. Remove useless ones. IWYU part 2. 2018-11-28 18:25:07 +00:00
test_utils.h
window_capturer_linux.cc Improve screen sharing with PipeWire on Wayland 2020-12-03 17:33:19 +00:00
window_capturer_mac.mm Add Presentation Mode Support for Capturing OpenOffice Impress document windows 2020-11-05 21:22:19 +00:00
window_capturer_null.cc (4) Rename files to snake_case: update BUILD.gn, include paths, header guards, and DEPS entries 2019-01-11 17:11:39 +00:00
window_capturer_unittest.cc Don't crash the test process when X11 isn't available. 2019-12-16 09:57:59 +00:00
window_capturer_win.cc Reland "Begin implementing WGC CaptureFrame" 2020-10-02 07:29:31 +00:00
window_finder_mac.h Remove rtc_base/scoped_ref_ptr.h. 2019-01-25 20:29:58 +00:00
window_finder_mac.mm Implement handling for MS PowerPoint Presentation Mode. 2019-12-03 19:17:24 +00:00
window_finder_unittest.cc Explicitly set and use WEBRTC_USE_X11 instead of USE_X11. 2019-12-13 09:36:25 +00:00
window_finder_win.cc Use std::make_unique instead of absl::make_unique. 2019-09-17 15:47:29 +00:00
window_finder_win.h
window_finder.cc [Window Capturer] Implement scaling in GetWindowBounds() 2017-11-07 01:49:35 +00:00
window_finder.h Explicitly set and use WEBRTC_USE_X11 instead of USE_X11. 2019-12-13 09:36:25 +00:00