Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(88)

Issue 2391743004: Use non-deprecated screen update callbacks. (Closed)

Created:
4 years, 2 months ago by erikchen
Modified:
4 years, 2 months ago
CC:
webrtc-reviews_webrtc.org
Target Ref:
refs/pending/heads/master
Project:
webrtc
Visibility:
Public.

Description

Use non-deprecated screen update callbacks. CGRegisterScreenRefreshCallback (and similar) have been replaced by CGDisplayStream. Most of the structure is pretty comparable. The main difference is that a CGDisplayStream needs to be destroyed asynchronously, potentially after ScreenCapturerMac has been destroyed. This CL creates a self-owned DisplayStreamManager which will destroy itself once all streams have been destroyed. BUG=webrtc:6029 Committed: https://crrev.com/440b4be4b7609680e39898730f76ce2ec5ab3253 Cr-Commit-Position: refs/heads/master@{#14590}

Patch Set 1 #

Patch Set 2 : Clean up. #

Patch Set 3 : vector -> map #

Total comments: 22

Patch Set 4 : Add a comment. #

Patch Set 5 : Comments from eugenbut. #

Patch Set 6 : Clang format. #

Total comments: 11

Patch Set 7 : Use a self-owned object. #

Patch Set 8 : cleanup and clang format. #

Patch Set 9 : Comments from sergeyu. #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+155 lines, -47 lines) Patch
M webrtc/modules/desktop_capture/screen_capturer_mac.mm View 1 2 3 4 5 6 7 8 8 chunks +155 lines, -47 lines 2 comments Download

Dependent Patchsets:

Messages

Total messages: 35 (11 generated)
Eugene But (OOO till 7-30)
Mostly trying to understand threading. https://codereview.chromium.org/2391743004/diff/40001/webrtc/modules/desktop_capture/screen_capturer_mac.mm File webrtc/modules/desktop_capture/screen_capturer_mac.mm (right): https://codereview.chromium.org/2391743004/diff/40001/webrtc/modules/desktop_capture/screen_capturer_mac.mm#newcode48 webrtc/modules/desktop_capture/screen_capturer_mac.mm:48: struct DisplayStreamWrapper { Do ...
4 years, 2 months ago (2016-10-04 23:13:53 UTC) #4
erikchen
> https://codereview.chromium.org/2391743004/diff/40001/webrtc/modules/desktop_capture/screen_capturer_mac.mm#newcode862 > webrtc/modules/desktop_capture/screen_capturer_mac.mm:862: desktop_config_ = > desktop_config_monitor_->desktop_configuration(); > Is this thing can be called ...
4 years, 2 months ago (2016-10-04 23:52:35 UTC) #5
erikchen
https://codereview.chromium.org/2391743004/diff/40001/webrtc/modules/desktop_capture/screen_capturer_mac.mm File webrtc/modules/desktop_capture/screen_capturer_mac.mm (right): https://codereview.chromium.org/2391743004/diff/40001/webrtc/modules/desktop_capture/screen_capturer_mac.mm#newcode48 webrtc/modules/desktop_capture/screen_capturer_mac.mm:48: struct DisplayStreamWrapper { On 2016/10/04 23:13:52, Eugene But wrote: ...
4 years, 2 months ago (2016-10-04 23:52:40 UTC) #6
Eugene But (OOO till 7-30)
So if everything is called on the same thread why would we want to use ...
4 years, 2 months ago (2016-10-05 00:19:53 UTC) #7
erikchen
henrika: Please review. As per offline discussion with eugenebut@, there are two open questions: 1) ...
4 years, 2 months ago (2016-10-05 00:28:24 UTC) #9
henrika (OOO until Aug 14)
erikchen@: I don't work in this code base and am not an owner. Please check ...
4 years, 2 months ago (2016-10-05 08:30:48 UTC) #12
Sergey Ulanov
Does the new API work on 10.9? https://developer.apple.com/reference/coregraphics/cgdisplaystream says that it's only supported on 10.10+
4 years, 2 months ago (2016-10-05 22:47:15 UTC) #13
erikchen
On 2016/10/05 22:47:15, Sergey Ulanov wrote: > Does the new API work on 10.9? > ...
4 years, 2 months ago (2016-10-05 22:50:11 UTC) #14
Sergey Ulanov
https://codereview.chromium.org/2391743004/diff/100001/webrtc/modules/desktop_capture/screen_capturer_mac.mm File webrtc/modules/desktop_capture/screen_capturer_mac.mm (right): https://codereview.chromium.org/2391743004/diff/100001/webrtc/modules/desktop_capture/screen_capturer_mac.mm#newcode67 webrtc/modules/desktop_capture/screen_capturer_mac.mm:67: void* owner = nullptr; Maybe make this ScreenCapturerMac*? https://codereview.chromium.org/2391743004/diff/100001/webrtc/modules/desktop_capture/screen_capturer_mac.mm#newcode76 ...
4 years, 2 months ago (2016-10-06 23:51:33 UTC) #15
Sergey Ulanov
https://codereview.chromium.org/2391743004/diff/40001/webrtc/modules/desktop_capture/screen_capturer_mac.mm File webrtc/modules/desktop_capture/screen_capturer_mac.mm (right): https://codereview.chromium.org/2391743004/diff/40001/webrtc/modules/desktop_capture/screen_capturer_mac.mm#newcode58 webrtc/modules/desktop_capture/screen_capturer_mac.mm:58: static std::map<int, DisplayStreamWrapper> g_display_stream_wrappers; On 2016/10/05 00:19:53, Eugene But ...
4 years, 2 months ago (2016-10-06 23:57:24 UTC) #16
Sergey Ulanov
On 2016/10/05 00:28:24, erikchen wrote: > henrika: Please review. > > As per offline discussion ...
4 years, 2 months ago (2016-10-06 23:59:15 UTC) #17
Eugene But (OOO till 7-30)
> Yes. In Chrome ScreenCapturerMac is created on a separate thread. So one process can ...
4 years, 2 months ago (2016-10-07 00:14:54 UTC) #18
Sergey Ulanov
On 2016/10/07 00:14:54, Eugene But wrote: > > Yes. In Chrome ScreenCapturerMac is created on ...
4 years, 2 months ago (2016-10-07 00:21:33 UTC) #19
erikchen
On 2016/10/07 00:21:33, Sergey Ulanov wrote: > On 2016/10/07 00:14:54, Eugene But wrote: > > ...
4 years, 2 months ago (2016-10-07 01:06:33 UTC) #20
erikchen
sergeyu: PTAL https://codereview.chromium.org/2391743004/diff/100001/webrtc/modules/desktop_capture/screen_capturer_mac.mm File webrtc/modules/desktop_capture/screen_capturer_mac.mm (right): https://codereview.chromium.org/2391743004/diff/100001/webrtc/modules/desktop_capture/screen_capturer_mac.mm#newcode67 webrtc/modules/desktop_capture/screen_capturer_mac.mm:67: void* owner = nullptr; On 2016/10/06 23:51:33, ...
4 years, 2 months ago (2016-10-07 17:56:20 UTC) #22
erikchen
On 2016/10/07 17:56:20, erikchen wrote: > sergeyu: PTAL > > https://codereview.chromium.org/2391743004/diff/100001/webrtc/modules/desktop_capture/screen_capturer_mac.mm > File webrtc/modules/desktop_capture/screen_capturer_mac.mm (right): ...
4 years, 2 months ago (2016-10-10 19:07:14 UTC) #23
Sergey Ulanov
I still think that it's not necessary to get moved and updated rects separately instead ...
4 years, 2 months ago (2016-10-10 21:03:51 UTC) #24
Sergey Ulanov
LGTM, please add TODO for kCGDisplayStreamUpdateDirtyRects
4 years, 2 months ago (2016-10-10 21:37:41 UTC) #25
erikchen
On 2016/10/10 21:37:41, Sergey Ulanov wrote: > LGTM, > please add TODO for kCGDisplayStreamUpdateDirtyRects Done.
4 years, 2 months ago (2016-10-10 21:45:28 UTC) #26
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.webrtc.org/2391743004/160001
4 years, 2 months ago (2016-10-10 21:45:40 UTC) #29
commit-bot: I haz the power
Committed patchset #9 (id:160001)
4 years, 2 months ago (2016-10-10 22:18:34 UTC) #30
commit-bot: I haz the power
Patchset 9 (id:??) landed as https://crrev.com/440b4be4b7609680e39898730f76ce2ec5ab3253 Cr-Commit-Position: refs/heads/master@{#14590}
4 years, 2 months ago (2016-10-10 22:18:40 UTC) #32
Nico
https://codereview.webrtc.org/2391743004/diff/160001/webrtc/modules/desktop_capture/screen_capturer_mac.mm File webrtc/modules/desktop_capture/screen_capturer_mac.mm (right): https://codereview.webrtc.org/2391743004/diff/160001/webrtc/modules/desktop_capture/screen_capturer_mac.mm#newcode82 webrtc/modules/desktop_capture/screen_capturer_mac.mm:82: #pragma clang diagnostic ignored "-Wunguarded-availability" A nicer workaround for ...
4 years, 2 months ago (2016-10-11 02:05:36 UTC) #34
erikchen
4 years, 2 months ago (2016-10-12 01:11:39 UTC) #35
Message was sent while issue was closed.
A revert of this CL (patchset #9 id:160001) has been created in
https://codereview.chromium.org/2404193004/ by erikchen@chromium.org.

The reason for reverting is: unit test coverage is poor. Local testing shows
that this code doesn't work. Reverting..

Powered by Google App Engine
This is Rietveld 408576698