commit | eaf337a1411c26e707449b805e605fc723898172 | [log] [tgz] |
---|---|---|
author | Emircan Uysaler <emircan@webrtc.org> | Mon Oct 29 23:32:00 2018 |
committer | Commit Bot <commit-bot@chromium.org> | Tue Oct 30 16:05:21 2018 |
tree | da7c9a9e1c259b9270202f14010c057a6db2fc4f | |
parent | 746d46bec9799479a2a24f805e714b20e1c5ce6c [diff] |
Remove event wait logic from DesktopConfigurationMonitor This class exposes Wait()-Set() logic to synchronize events. - There is a bug in checking EventWrapper::Wait() as it returns [1,2]. Negating these values cause us to always pass timeout checks. - There is a general problem in this class with waiter. There are 2 scenarios: 1) Lock()-Unlock()-DisplaysReconfigured() In this scenario, Wait() in DisplaysReconfigured() immediately passes as event is already signaled. Next Lock() call won't continue until Set() is called in DisplaysReconfigured(). This blocks capture thread from accessing display until reconfiguration completes. 2) Lock()-DisplaysReconfigured()-Unlock() In this scenario, Wait() in DisplaysReconfigured() passes when Unlock() called. Capture thread accesses display while reconfiguration happens. Note that we are only delaying the OS delegate thread here. As an experiment, adding Sleep() in DisplaysReconfigured() results in no change, because it looks like OS uses this thread for only delegates but not for the actual display switch. Overall, (1) doesnt seem necessary as (2) already accesses display while reconfiguration happens. (2) doesn't seem necessary as blocking system delegate thread doesn't help. Therefore, I changed the class to only protect from race condition on |desktop_configuration_|. Bug: chromium:796889 Change-Id: I37263305e5ac629e21ff9e977952cf4a21bae19f Reviewed-on: https://webrtc-review.googlesource.com/c/108560 Commit-Queue: Emircan Uysaler <emircan@webrtc.org> Reviewed-by: Tommi <tommi@webrtc.org> Cr-Commit-Position: refs/heads/master@{#25437}
WebRTC is a free, open software project that provides browsers and mobile applications with Real-Time Communications (RTC) capabilities via simple APIs. The WebRTC components have been optimized to best serve this purpose.
Our mission: To enable rich, high-quality RTC applications to be developed for the browser, mobile platforms, and IoT devices, and allow them all to communicate via a common set of protocols.
The WebRTC initiative is a project supported by Google, Mozilla and Opera, amongst others.
See http://www.webrtc.org/native-code/development for instructions on how to get started developing with the native code.
Authoritative list of directories that contain the native API header files.