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

Issue 2496413002: mac: Fix screen capture on secondary displays. (Closed)

Created:
4 years, 1 month ago by erikchen
Modified:
3 years, 9 months ago
CC:
webrtc-reviews_webrtc.org, tterriberry_mozilla.com
Target Ref:
refs/pending/heads/master
Project:
webrtc
Visibility:
Public.

Description

mac: Fix screen capture on secondary displays. The old API CGScreenRegisterMoveCallback returned update rects in desktop coordinates [secondary display has an origin != 0,0]. The new CGDisplayStream API returns update rects in display coordinates [origin == 0,0]. Translating the update rect based on the display's position on the desktop is now incorrect. BUG=webrtc:6702 Committed: https://crrev.com/2a3eb9f367a70e2f5060d9dea6edd5ccd326de61 Cr-Commit-Position: refs/heads/master@{#15092}

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+0 lines, -4 lines) Patch
M webrtc/modules/desktop_capture/screen_capturer_mac.mm View 1 chunk +0 lines, -4 lines 0 comments Download

Messages

Total messages: 16 (6 generated)
erikchen
kjellander: Please review.
4 years, 1 month ago (2016-11-14 21:55:58 UTC) #2
kjellander_webrtc
I'm not an OWNER here, so I'm deferring this review to Sergey.
4 years, 1 month ago (2016-11-15 08:26:13 UTC) #5
Sergey Ulanov
lgtm
4 years, 1 month ago (2016-11-15 08:28:35 UTC) #6
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/2496413002/1
4 years, 1 month ago (2016-11-15 18:07:29 UTC) #8
commit-bot: I haz the power
Committed patchset #1 (id:1)
4 years, 1 month ago (2016-11-15 18:24:46 UTC) #10
commit-bot: I haz the power
Patchset 1 (id:??) landed as https://crrev.com/2a3eb9f367a70e2f5060d9dea6edd5ccd326de61 Cr-Commit-Position: refs/heads/master@{#15092}
4 years, 1 month ago (2016-11-15 18:32:48 UTC) #12
nicholss
This patch introduced a breaking bug for Chrome Remote Desktop when remoting to a host ...
3 years, 9 months ago (2017-03-07 16:40:52 UTC) #13
nicholss
On 2017/03/07 16:40:52, nicholss wrote: > This patch introduced a breaking bug for Chrome Remote ...
3 years, 9 months ago (2017-03-08 00:10:56 UTC) #14
erikchen
On 2017/03/08 00:10:56, nicholss wrote: > On 2017/03/07 16:40:52, nicholss wrote: > > This patch ...
3 years, 9 months ago (2017-03-08 00:14:00 UTC) #15
Sergey Ulanov
3 years, 9 months ago (2017-03-08 19:15:58 UTC) #16
Message was sent while issue was closed.
On 2017/03/08 00:14:00, erikchen wrote:
> On 2017/03/08 00:10:56, nicholss wrote:
> > On 2017/03/07 16:40:52, nicholss wrote:
> > > This patch introduced a breaking bug for Chrome Remote Desktop when
remoting
> > to
> > > a host with two monitors. The mouse location is off by the size of the
left
> > most
> > > screen when interacting with the right most screen. Please revert.
> 
> That is surprising because this CL was introduced to fix a very similar
sounding
> issue. Perhaps there's a configuration difference that's causing this? Do you
> have more specific details about your macOS version, Chrome version, minimal
> repro, etc?

If I understand correctly before this CL the capturer worked correctly only with
kFullDesktopScreenId, but not with individual displays. After this change it
works correctly for individual displays, but not for kFullDesktopScreenId. CRD
always uses kFullDesktopScreenId, while Desktop Capture API never uses it.

Before https://codereview.webrtc.org/2391743004 we were always getting update
notifications from the OS in screen coordinates.
ScreenCapturerMac::ScreenRefresh() accounted for it by shifting rect coordinates
according to screen position relative to desktop origin. After
ScreenCapturerMac::ScreenRefresh() gets updates in display coordinates. In the
current version (with this change) it works for individual display, but not for
kFullDesktopScreenId. ScreenRefresh() gets updates in display coordinates, but
doesn't translate them to desktop coordinates (and it has no idea which display
they belong to).

Powered by Google App Engine
This is Rietveld 408576698