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

Issue 2553763002: Fix cursor missing in tabCapture on OSX Sierra (Closed)

Created:
4 years ago by braveyao
Modified:
3 years, 11 months ago
Reviewers:
Robert Sesek, miu, boliu
CC:
chromium-reviews, jam, feature-media-reviews_chromium.org, darin-cc_chromium.org, mcasas+watch+vc_chromium.org, mac-reviews_chromium.org, xjz+watch_chromium.org, miu+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix cursor missing in tabCapture on OSX Sierra Since OSX Sierra, when we ask for the CGImage of a cursor image, it will return a double-size CGImage with Retina display, which can't pass the sanity check. =========================(deprecated)================================== In this cl, we try to pass a half-size Rect hint to get CGImage with original cursor size on both Retina and non-Retina display. Also it fixs another issue that we render the cursor based on window coordinate to a target in physical coordinate. ====================================================================== In this cl, we implemented a new common base class, CursorRenderer , to merge the two implementations. Then we can handle the scaling and rendering of cursor same on all platforms, also with other advantages: caching scaled cursor image for better performance and only caring about view coordinates (same handling to Retina and non-Retina). BUG=659183 Review-Url: https://codereview.chromium.org/2553763002 Cr-Commit-Position: refs/heads/master@{#441975} Committed: https://chromium.googlesource.com/chromium/src/+/2f9c8630f029d251af62445f88357d0edbf0543c

Patch Set 1 #

Total comments: 11

Patch Set 2 : address common comments #

Patch Set 3 : implement CursorRenderer #

Total comments: 44

Patch Set 4 : address comments and implement mouse tracking on Mac #

Total comments: 12

Patch Set 5 : address comments #

Total comments: 2

Patch Set 6 : address comments #

Patch Set 7 : rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+443 lines, -401 lines) Patch
M content/browser/BUILD.gn View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/media/capture/aura_window_capture_machine.cc View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M content/browser/media/capture/cursor_renderer.h View 1 2 3 2 chunks +74 lines, -10 lines 0 comments Download
A content/browser/media/capture/cursor_renderer.cc View 1 2 3 1 chunk +206 lines, -0 lines 0 comments Download
M content/browser/media/capture/cursor_renderer_aura.h View 1 2 3 3 chunks +5 lines, -51 lines 0 comments Download
M content/browser/media/capture/cursor_renderer_aura.cc View 1 2 3 2 chunks +42 lines, -169 lines 0 comments Download
M content/browser/media/capture/cursor_renderer_aura_unittest.cc View 1 2 3 2 chunks +2 lines, -3 lines 0 comments Download
M content/browser/media/capture/cursor_renderer_mac.h View 1 2 3 4 5 1 chunk +32 lines, -21 lines 0 comments Download
M content/browser/media/capture/cursor_renderer_mac.mm View 1 2 3 4 5 1 chunk +79 lines, -145 lines 0 comments Download
M content/browser/media/capture/web_contents_video_capture_device.cc View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 87 (66 generated)
braveyao
Hi Miu, please take a look.
4 years ago (2016-12-05 19:42:48 UTC) #6
miu
I went through reviewing the changes, but then I realized something: There's a ton of ...
4 years ago (2016-12-06 22:06:23 UTC) #7
braveyao
Hi Miu, Huge thanks for the review comments! Learn a lot from them. Will give ...
4 years ago (2016-12-07 00:56:03 UTC) #8
miu
https://codereview.chromium.org/2553763002/diff/1/content/browser/media/capture/cursor_renderer_mac.mm File content/browser/media/capture/cursor_renderer_mac.mm (right): https://codereview.chromium.org/2553763002/diff/1/content/browser/media/capture/cursor_renderer_mac.mm#newcode133 content/browser/media/capture/cursor_renderer_mac.mm:133: last_cursor_width_ = nssize.width * x_scale; On 2016/12/07 00:56:03, braveyao ...
4 years ago (2016-12-07 20:53:44 UTC) #9
braveyao
Hi miu@, thanks for the advice! Now have CursorRenderer done and it's really better than ...
4 years ago (2016-12-20 22:32:07 UTC) #14
miu
Looks great! Comments on PS3: A bunch of small things, plus we seem to need ...
3 years, 12 months ago (2016-12-27 23:21:03 UTC) #28
braveyao
Hi Miu, all comments are addressed. PTAL. https://codereview.chromium.org/2553763002/diff/100001/content/browser/media/capture/cursor_renderer.cc File content/browser/media/capture/cursor_renderer.cc (right): https://codereview.chromium.org/2553763002/diff/100001/content/browser/media/capture/cursor_renderer.cc#newcode11 content/browser/media/capture/cursor_renderer.cc:11: #if defined(USE_AURA) ...
3 years, 11 months ago (2017-01-04 01:57:49 UTC) #59
Robert Sesek
Some additional comments on cursor_renderer_mac.mm. Also, can we get a unittest for the new code? ...
3 years, 11 months ago (2017-01-04 16:10:17 UTC) #61
braveyao
All comments are addressed. PTAL. As to the unittest, we have one for Aura, in ...
3 years, 11 months ago (2017-01-04 18:05:07 UTC) #62
Robert Sesek
On 2017/01/04 18:05:07, braveyao wrote: > All comments are addressed. PTAL. > As to the ...
3 years, 11 months ago (2017-01-04 21:27:43 UTC) #63
miu
PS5 lgtm % one concern: https://codereview.chromium.org/2553763002/diff/260001/content/browser/media/capture/cursor_renderer_mac.mm File content/browser/media/capture/cursor_renderer_mac.mm (right): https://codereview.chromium.org/2553763002/diff/260001/content/browser/media/capture/cursor_renderer_mac.mm#newcode36 content/browser/media/capture/cursor_renderer_mac.mm:36: [capturedView_ removeTrackingArea:trackingArea_.get()]; It seems ...
3 years, 11 months ago (2017-01-05 01:26:57 UTC) #64
miu
And, thanks rsesek, for helping us out with the Mac specifics! :)
3 years, 11 months ago (2017-01-05 01:28:49 UTC) #65
braveyao
Thanks rsesek@ for the great hints. Filed a crbug/678783 for following up the unittest on ...
3 years, 11 months ago (2017-01-05 22:34:49 UTC) #72
braveyao
+ boliu@, for the owner's review for content/browser/BUILD.gn (note: patchset 7 is a rebase). Thanks!
3 years, 11 months ago (2017-01-05 22:38:49 UTC) #74
Robert Sesek
On 2017/01/05 22:34:49, braveyao wrote: > Thanks rsesek@ for the great hints. Filed a crbug/678783 ...
3 years, 11 months ago (2017-01-05 23:07:38 UTC) #75
boliu
content/browser/BUILD.gn lgtm
3 years, 11 months ago (2017-01-05 23:26:50 UTC) #76
braveyao
On 2017/01/05 23:26:50, boliu wrote: > content/browser/BUILD.gn lgtm rsesek@, I just don't have confidence to ...
3 years, 11 months ago (2017-01-05 23:44:54 UTC) #79
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2553763002/300001
3 years, 11 months ago (2017-01-06 18:00:16 UTC) #82
Robert Sesek
On 2017/01/05 23:44:54, braveyao wrote: > On 2017/01/05 23:26:50, boliu wrote: > > content/browser/BUILD.gn lgtm ...
3 years, 11 months ago (2017-01-06 18:06:29 UTC) #83
commit-bot: I haz the power
Committed patchset #7 (id:300001) as https://chromium.googlesource.com/chromium/src/+/2f9c8630f029d251af62445f88357d0edbf0543c
3 years, 11 months ago (2017-01-06 18:07:06 UTC) #86
braveyao
3 years, 11 months ago (2017-01-06 18:26:03 UTC) #87
Message was sent while issue was closed.
On 2017/01/06 18:06:29, Robert Sesek wrote:
> On 2017/01/05 23:44:54, braveyao wrote:
> > On 2017/01/05 23:26:50, boliu wrote:
> > > content/browser/BUILD.gn lgtm
> > 
> > rsesek@, I just don't have confidence to add it now, lacking experience of
> > object-c and content capture(this is the first time I touch this two
fields.).
> > But I really want to practice in this area so I filed the crbug to remind
me.
> > Would you excuse me for doing it later? Thanks!
> 
> In my experience bugs to write tests later don't typically get addressed. But
> I'm not going to press the point.

rsesek@, "TODO" is a typical lie, but not the crbugs (especially to me) ^_^
I definitely need your help on this. So I suppose you'll get the updates soon.

Powered by Google App Engine
This is Rietveld 408576698