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

Issue 2404983002: Use kCGDisplayStreamUpdateDirtyRects. (Closed)

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

Description

Use kCGDisplayStreamUpdateDirtyRects. It combines the information from kCGDisplayStreamUpdateMovedRects and kCGDisplayStreamUpdateRefreshedRects. BUG=

Patch Set 1 #

Total comments: 2

Patch Set 2 : Minor fix. #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+1 line, -36 lines) Patch
M webrtc/modules/desktop_capture/screen_capturer_mac.mm View 1 3 chunks +1 line, -36 lines 1 comment Download

Depends on Patchset:

Messages

Total messages: 6 (2 generated)
erikchen
sergeyu: Please review. https://codereview.chromium.org/2404983002/diff/1/webrtc/modules/desktop_capture/screen_capturer_mac.mm File webrtc/modules/desktop_capture/screen_capturer_mac.mm (right): https://codereview.chromium.org/2404983002/diff/1/webrtc/modules/desktop_capture/screen_capturer_mac.mm#newcode944 webrtc/modules/desktop_capture/screen_capturer_mac.mm:944: rects = CGDisplayStreamUpdateGetRects( It's not clear ...
4 years, 2 months ago (2016-10-10 21:54:42 UTC) #2
Sergey Ulanov
lgtm when my comment is addressed https://codereview.chromium.org/2404983002/diff/20001/webrtc/modules/desktop_capture/screen_capturer_mac.mm File webrtc/modules/desktop_capture/screen_capturer_mac.mm (right): https://codereview.chromium.org/2404983002/diff/20001/webrtc/modules/desktop_capture/screen_capturer_mac.mm#newcode997 webrtc/modules/desktop_capture/screen_capturer_mac.mm:997: ScreenRefresh(count, rect_array); ScreenRefresh() ...
4 years, 2 months ago (2016-10-11 17:32:10 UTC) #3
erikchen
On 2016/10/11 17:32:10, Sergey Ulanov wrote: > lgtm when my comment is addressed > > ...
4 years, 2 months ago (2016-10-11 17:41:35 UTC) #4
Sergey Ulanov
4 years, 2 months ago (2016-10-11 17:59:22 UTC) #5
Sorry I missed your question

https://codereview.chromium.org/2404983002/diff/1/webrtc/modules/desktop_capt...
File webrtc/modules/desktop_capture/screen_capturer_mac.mm (right):

https://codereview.chromium.org/2404983002/diff/1/webrtc/modules/desktop_capt...
webrtc/modules/desktop_capture/screen_capturer_mac.mm:944: rects =
CGDisplayStreamUpdateGetRects(
On 2016/10/10 21:54:42, erikchen wrote:
> It's not clear to me whether CGDisplayStreamUpdateGetRects is still necessary,
> and how it functions on refresh rects. Do we have a way of testing this?

Dirty rects are passed to helper_ and then Capture() gets dirty region from
helper_ and captures it for the new frame. Test coverage is lacking there :-(.
There are some unittests in screen_capturer_mac_unittest.cc, but they perform
only very minimal checks. There are also tests in screen_capturer_unittest.cc,
but they are disabled on Mac because there is currently no ScreenDrawer
implementation for Mac.

To test this change you can build chrome with this CL and then load this app:
//chrome/common/extensions/docs/examples/api/desktopCapture
It should show correct screen updates when something changes on the screen.

Powered by Google App Engine
This is Rietveld 408576698