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

Issue 2665623002: Fix Jumplist favicons to have high resolution in HDPI Windows displays (Closed)

Created:
3 years, 10 months ago by chengx
Modified:
3 years, 10 months ago
Reviewers:
sky
CC:
chromium-reviews, brucedawson
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix Jumplist favicons to have high-resolution in HDPI Windows displays On a HDPI windows machine, if right-click Chrome in the taskbar, the jumplist favicons are not displayed in high-resolution. They look blurry, different from other favicons in the rest of Chrome, e.g., tabs. As reported, Internet Explorer doesn't have this issue. The root cause is that 1x bitmap (16x16) is always used to create jumplist icon file by the current jumplist implementation. This CL fixes this issue. The idea is that for all the display scales supported by the platform, get/compute all corresponding bitmaps and write them to the disk. In this way, the appropriate icon bitmap is used when a user changes the screen display scale. BUG=676901 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.win:win10_chromium_x64_rel_ng Review-Url: https://codereview.chromium.org/2665623002 Cr-Commit-Position: refs/heads/master@{#449134} Committed: https://chromium.googlesource.com/chromium/src/+/ae6956325bca345ff31425adc8597d33e45ce3f7

Patch Set 1 #

Total comments: 4

Patch Set 2 : Add faviconSize parameter to GetFaviconImageForPageURL() #

Total comments: 4

Patch Set 3 : Resize large favicon to 32x32 #

Patch Set 4 : Use 2x bitmap if any monitor is not at 1x. #

Patch Set 5 : Update comments and remove redundant .h files. #

Total comments: 6

Patch Set 6 : Make code local to jumplist. #

Patch Set 7 : Get bitmap of suitable size. #

Total comments: 3

Patch Set 8 : Remove superflous checks. #

Patch Set 9 : Write all bitmaps needed to the disk. #

Total comments: 10

Patch Set 10 : Use gfx::ImageSkia in ShellLinkItem for thread safety. #

Total comments: 2

Patch Set 11 : Better function names and parameters. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+27 lines, -13 lines) Patch
M chrome/browser/win/jumplist.cc View 1 2 3 4 5 6 7 8 9 10 5 chunks +21 lines, -7 lines 0 comments Download
M chrome/browser/win/jumplist_updater.h View 1 2 3 4 5 6 7 8 9 10 4 chunks +6 lines, -6 lines 0 comments Download

Messages

Total messages: 120 (83 generated)
chengx
This CL is ready for review. PTAL~
3 years, 10 months ago (2017-01-30 06:43:39 UTC) #9
grt (UTC plus 2)
This looks okay to me from a stylistic standpoint, but I'm not sure about the ...
3 years, 10 months ago (2017-01-30 10:02:40 UTC) #10
chengx
Hi Scott, I notice that you are the owner of favicon_base, so could you please ...
3 years, 10 months ago (2017-01-30 17:51:25 UTC) #12
sky
https://codereview.chromium.org/2665623002/diff/1/chrome/browser/win/jumplist.cc File chrome/browser/win/jumplist.cc (right): https://codereview.chromium.org/2665623002/diff/1/chrome/browser/win/jumplist.cc#newcode526 chrome/browser/win/jumplist.cc:526: url, favicon_base::FAVICON, 0, Supplying 0 for a size may ...
3 years, 10 months ago (2017-01-30 23:56:11 UTC) #13
chengx
Please see my replies to your comments. Thanks! https://codereview.chromium.org/2665623002/diff/1/chrome/browser/win/jumplist.cc File chrome/browser/win/jumplist.cc (right): https://codereview.chromium.org/2665623002/diff/1/chrome/browser/win/jumplist.cc#newcode526 chrome/browser/win/jumplist.cc:526: url, ...
3 years, 10 months ago (2017-01-31 00:39:38 UTC) #14
sky
There is no guarantee that you'll get the favicon at 32x32, it may be much ...
3 years, 10 months ago (2017-01-31 05:06:55 UTC) #15
grt (UTC plus 2)
On 2017/01/31 05:06:55, sky wrote: > There is no guarantee that you'll get the favicon ...
3 years, 10 months ago (2017-01-31 07:47:13 UTC) #18
sky
Yes, in history everything is mapped to a png. -Scott On Mon, Jan 30, 2017 ...
3 years, 10 months ago (2017-01-31 18:12:58 UTC) #21
chengx
On 2017/01/31 05:06:55, sky wrote: > There is no guarantee that you'll get the favicon ...
3 years, 10 months ago (2017-01-31 18:33:38 UTC) #22
chengx
I searched CreateFrom1xPNGBytes() in chromium code base. It seems that it is pretty common that ...
3 years, 10 months ago (2017-01-31 18:41:16 UTC) #23
sky
https://codereview.chromium.org/2665623002/diff/20001/components/favicon/core/favicon_service.h File components/favicon/core/favicon_service.h (right): https://codereview.chromium.org/2665623002/diff/20001/components/favicon/core/favicon_service.h#newcode108 components/favicon/core/favicon_service.h:108: const int faviconSize = gfx::kFaviconSize); You shouldn't need to ...
3 years, 10 months ago (2017-01-31 23:28:45 UTC) #24
chengx
Thanks for the feedback! Please allow me to briefly explain how the jumplist code is ...
3 years, 10 months ago (2017-02-01 08:15:29 UTC) #29
grt (UTC plus 2)
Removing myself from R list, as sky@ is clearly in a better position to review ...
3 years, 10 months ago (2017-02-01 12:45:36 UTC) #31
sky
Thanks for the detailed analysis. I think you should continue using GetFaviconImageForPageURL and extract the ...
3 years, 10 months ago (2017-02-01 16:48:57 UTC) #32
chengx
I agree this is the right way to fix this issue. I have implemented this ...
3 years, 10 months ago (2017-02-02 20:52:35 UTC) #49
chengx
https://codereview.chromium.org/2665623002/diff/20001/components/favicon/core/favicon_service.h File components/favicon/core/favicon_service.h (right): https://codereview.chromium.org/2665623002/diff/20001/components/favicon/core/favicon_service.h#newcode108 components/favicon/core/favicon_service.h:108: const int faviconSize = gfx::kFaviconSize); On 2017/01/31 23:28:44, sky ...
3 years, 10 months ago (2017-02-02 20:52:58 UTC) #50
sky
Please try to keep the changes specific to jumplist. It is the only place that ...
3 years, 10 months ago (2017-02-02 22:41:16 UTC) #58
chengx
Thanks for the feedback! I have made the code local to jumplist. Now jumplist.cc is ...
3 years, 10 months ago (2017-02-03 01:51:13 UTC) #66
sky
On 2017/02/03 01:51:13, chengx wrote: > Thanks for the feedback! I have made the code ...
3 years, 10 months ago (2017-02-03 16:39:22 UTC) #67
chengx
The line of code "if (it->scale() == scale)" as you mentioned will be tested as ...
3 years, 10 months ago (2017-02-03 20:58:29 UTC) #77
sky
LGTM with the following. No worries about the number of changes, it happens. https://codereview.chromium.org/2665623002/diff/240001/chrome/browser/win/jumplist.cc File ...
3 years, 10 months ago (2017-02-04 00:01:59 UTC) #79
chengx
Please see my reply to your comment below. I am a little confused though. https://codereview.chromium.org/2665623002/diff/240001/chrome/browser/win/jumplist.cc ...
3 years, 10 months ago (2017-02-04 00:18:59 UTC) #80
sky
I do have another question about this. What does the underlying API we're using say ...
3 years, 10 months ago (2017-02-06 16:50:46 UTC) #81
chengx
Please see my replies below. > I do have another question about this. What does ...
3 years, 10 months ago (2017-02-07 01:38:34 UTC) #86
sky
On Mon, Feb 6, 2017 at 5:38 PM, <chengx@chromium.org> wrote: > Please see my replies ...
3 years, 10 months ago (2017-02-07 04:16:19 UTC) #87
chengx
> > Actually, I have thought about this before thinking of how to determine the ...
3 years, 10 months ago (2017-02-07 08:43:28 UTC) #88
sky
On 2017/02/07 08:43:28, chengx wrote: > > > Actually, I have thought about this before ...
3 years, 10 months ago (2017-02-07 18:43:01 UTC) #89
chengx
> According to the docs ImageFamily isn't meant to be used for storing images at ...
3 years, 10 months ago (2017-02-07 21:04:58 UTC) #90
sky
Is there any documentation of the api we're using? I seem to remember the ability ...
3 years, 10 months ago (2017-02-07 22:42:41 UTC) #91
chengx
Managed to make IE show jumplist on my machine. Edge doesn't support the jumplist anymore, ...
3 years, 10 months ago (2017-02-08 01:11:42 UTC) #97
sky
https://codereview.chromium.org/2665623002/diff/300001/chrome/browser/win/jumplist.cc File chrome/browser/win/jumplist.cc (right): https://codereview.chromium.org/2665623002/diff/300001/chrome/browser/win/jumplist.cc#newcode93 chrome/browser/win/jumplist.cc:93: const gfx::ImageSkia* imageskia = image.ToImageSkia(); image_skia. https://codereview.chromium.org/2665623002/diff/300001/chrome/browser/win/jumplist.cc#newcode95 chrome/browser/win/jumplist.cc:95: std::vector<float> ...
3 years, 10 months ago (2017-02-08 03:14:54 UTC) #100
chengx
PTAL~ https://codereview.chromium.org/2665623002/diff/300001/chrome/browser/win/jumplist.cc File chrome/browser/win/jumplist.cc (right): https://codereview.chromium.org/2665623002/diff/300001/chrome/browser/win/jumplist.cc#newcode93 chrome/browser/win/jumplist.cc:93: const gfx::ImageSkia* imageskia = image.ToImageSkia(); On 2017/02/08 03:14:54, ...
3 years, 10 months ago (2017-02-08 07:42:26 UTC) #105
sky
Thanks for the patience! https://codereview.chromium.org/2665623002/diff/320001/chrome/browser/win/jumplist_updater.h File chrome/browser/win/jumplist_updater.h (right): https://codereview.chromium.org/2665623002/diff/320001/chrome/browser/win/jumplist_updater.h#newcode46 chrome/browser/win/jumplist_updater.h:46: void set_image(std::unique_ptr<gfx::ImageSkia> image) { Can ...
3 years, 10 months ago (2017-02-08 16:56:09 UTC) #107
chengx
PTAL~ Thanks! https://codereview.chromium.org/2665623002/diff/320001/chrome/browser/win/jumplist_updater.h File chrome/browser/win/jumplist_updater.h (right): https://codereview.chromium.org/2665623002/diff/320001/chrome/browser/win/jumplist_updater.h#newcode46 chrome/browser/win/jumplist_updater.h:46: void set_image(std::unique_ptr<gfx::ImageSkia> image) { On 2017/02/08 16:56:09, ...
3 years, 10 months ago (2017-02-08 19:24:18 UTC) #110
sky
LGTM
3 years, 10 months ago (2017-02-08 23:12:04 UTC) #115
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/2665623002/340001
3 years, 10 months ago (2017-02-08 23:17:21 UTC) #117
commit-bot: I haz the power
3 years, 10 months ago (2017-02-08 23:24:24 UTC) #120
Message was sent while issue was closed.
Committed patchset #11 (id:340001) as
https://chromium.googlesource.com/chromium/src/+/ae6956325bca345ff31425adc859...

Powered by Google App Engine
This is Rietveld 408576698