New issue
Advanced search Search tips

Issue 604966 link

Starred by 3 users

Issue metadata

Status: Fixed
Owner:
Closed: Jun 2016
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 3
Type: Bug



Sign in to add a comment

DevTools: capturing screenshot while emulating on a mac results in a lowres image

Project Member Reported by pfeldman@chromium.org, Apr 20 2016

Issue description

1) Open DevTools
2) Emulate any device
3) Three dots menu on the emulation toolbar -> Capture screenshot

It seems like CGWindowListCreateImage in GrabViewSnapshot produces a lowres image.

@ccameron: do you have any hints for me?
 
No ideas offhand. Poking around online I do see lots of people asking about CGWindowListCreateImage retina displays, but no clear answers.

It may be that we should be taking snapshots by doing:
  -[CALayer renderInContext]
I haven't attempted this personally (it may be completely unsuitable), but it seems likely to work.


Tried that, but the view layer is blank. The window's contentLayer gives Chrome frame.
Bummer. We were reducing resolution elsewhere along the way... Mac is fine...
Project Member

Comment 4 by bugdroid1@chromium.org, Apr 27 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/d94011da06615c62c7c20a48359c509f664099ad

commit d94011da06615c62c7c20a48359c509f664099ad
Author: pfeldman <pfeldman@chromium.org>
Date: Wed Apr 27 23:07:12 2016

DevTools: account for client devicePixelRatio while capturing screenshots.

BUG= 604966 

Review-Url: https://codereview.chromium.org/1928453002
Cr-Commit-Position: refs/heads/master@{#390226}

[modify] https://crrev.com/d94011da06615c62c7c20a48359c509f664099ad/third_party/WebKit/Source/devtools/front_end/emulation/DeviceModeView.js

Cc: -ccameron@chromium.org
Labels: Merge-Request-51
Status: Started (was: Assigned)
This is a new feature launched in M51, it has a major flaw that was reported against beta. Fix has been running on canary for 3+ days with no issues.

Comment 6 by tin...@google.com, May 2 2016

Labels: -Merge-Request-51 Merge-Approved-51 Hotlist-Merge-Approved
Your change meets the bar and is auto-approved for M51 (branch: 2704)
Project Member

Comment 7 by bugdroid1@chromium.org, May 2 2016

Labels: -merge-approved-51 merge-merged-2704
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/4414b92d098d92322adefeceb1f1b33949aef446

commit 4414b92d098d92322adefeceb1f1b33949aef446
Author: Pavel Feldman <pfeldman@chromium.org>
Date: Mon May 02 17:19:59 2016

DevTools: account for client devicePixelRatio while capturing screenshots.

BUG= 604966 

Review-Url: https://codereview.chromium.org/1928453002
Cr-Commit-Position: refs/heads/master@{#390226}
(cherry picked from commit d94011da06615c62c7c20a48359c509f664099ad)

Review URL: https://codereview.chromium.org/1936243002 .

Cr-Commit-Position: refs/branch-heads/2704@{#333}
Cr-Branched-From: 6e53600def8f60d8c632fadc70d7c1939ccea347-refs/heads/master@{#386251}

[modify] https://crrev.com/4414b92d098d92322adefeceb1f1b33949aef446/third_party/WebKit/Source/devtools/front_end/emulation/DeviceModeView.js

Labels: TE-Verified-M51 TE-Verified-51.0.2704.36
Tested the same on mac 10.11 chrome version 51.0.2704.36 - capturing screenshot while emulating results in a clear image as shown in the screenshot
www.yahoo.com-.png
825 KB View Download
Status: Fixed (was: Started)

Sign in to add a comment