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

Issue 1408063012: Replaced GetAppIconForSize with GetAppIconImageFamily. (Closed)

Created:
5 years, 1 month ago by Matt Giuca
Modified:
5 years, 1 month ago
Reviewers:
danakj, calamity, Nico
CC:
chromium-reviews, tfarina, rsesek+watch_chromium.org, chrome-apps-syd-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master-plus
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Replaced GetAppIconForSize with GetAppIconImageFamily. The old API gets a single icon from a Windows ICO of a desired size, but it would use a Windows API that automatically scales the icon using a hideous scaling algorithm. The new API loads all images of the icon into an ImageFamily which can be used with CreateExact to perform a high-quality scaling if necessary. Updated ProfileShortcutManagerWin to use GetAppIconImageFamily. Currently should have no visible effects, but will enable us to replace some other code and use much higher quality scaling (specifically, the system tray icon; see crbug.com/124141). BUG=551256 Committed: https://crrev.com/3e9e69dc9fbd729e77c66bfbabf4c7416ee2ecf8 Cr-Commit-Position: refs/heads/master@{#360256}

Patch Set 1 #

Patch Set 2 : Split off ImageFamily stuff into CL 1424913007. #

Total comments: 2

Patch Set 3 : Rebase. #

Patch Set 4 : Return null scoped_ptr instead of empty SkBitmap. #

Total comments: 4

Patch Set 5 : Deleted GetAppIconForSize. #

Patch Set 6 : Fix IconUtilTest. #

Patch Set 7 : Fix unit_tests by loading from the current module if chrome.dll is not loaded. #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+115 lines, -77 lines) Patch
M chrome/browser/app_icon_win.h View 1 2 3 4 1 chunk +11 lines, -4 lines 0 comments Download
M chrome/browser/app_icon_win.cc View 1 2 3 4 5 6 3 chunks +28 lines, -5 lines 2 comments Download
M chrome/browser/profiles/profile_shortcut_manager_win.cc View 1 chunk +20 lines, -11 lines 0 comments Download
M ui/gfx/icon_util.h View 1 chunk +3 lines, -3 lines 0 comments Download
M ui/gfx/icon_util.cc View 1 2 2 chunks +35 lines, -39 lines 0 comments Download
M ui/gfx/icon_util_unittest.cc View 1 2 3 4 5 2 chunks +18 lines, -15 lines 0 comments Download

Messages

Total messages: 47 (19 generated)
Matt Giuca
calamity: What do you think of this approach? I will probably split the ImageFamily changes ...
5 years, 1 month ago (2015-11-04 07:39:30 UTC) #2
Matt Giuca
On 2015/11/04 07:39:30, Matt Giuca wrote: > calamity: What do you think of this approach? ...
5 years, 1 month ago (2015-11-05 02:56:05 UTC) #5
calamity
lgtm. As discussed, this code is only run during profile shortcut creation and on startup. ...
5 years, 1 month ago (2015-11-09 02:12:11 UTC) #8
Matt Giuca
On 2015/11/09 02:12:11, calamity wrote: > lgtm. > > As discussed, this code is only ...
5 years, 1 month ago (2015-11-10 04:32:29 UTC) #9
Matt Giuca
Crap, those were all from a Debug build. Here are the Release build figures: old ...
5 years, 1 month ago (2015-11-10 05:07:17 UTC) #10
Matt Giuca
OK, it turns out it's quite easy to post this as an after-startup task. However, ...
5 years, 1 month ago (2015-11-10 06:32:51 UTC) #11
Matt Giuca
https://codereview.chromium.org/1408063012/diff/20001/chrome/browser/app_icon_win.cc File chrome/browser/app_icon_win.cc (right): https://codereview.chromium.org/1408063012/diff/20001/chrome/browser/app_icon_win.cc#newcode70 chrome/browser/app_icon_win.cc:70: return make_scoped_ptr(new SkBitmap); On 2015/11/09 02:12:11, calamity wrote: > ...
5 years, 1 month ago (2015-11-10 06:56:53 UTC) #12
Matt Giuca
Hi Nico, Dana: PTAL. This CL is a bit weird because it refactors GetAppIconForSize and ...
5 years, 1 month ago (2015-11-10 07:04:21 UTC) #15
Nico
lgtm with a few nit-like comments, the first one is maybe the most interesting https://codereview.chromium.org/1408063012/diff/100001/chrome/browser/app_icon_win.cc ...
5 years, 1 month ago (2015-11-10 07:13:31 UTC) #16
Matt Giuca
Removing GetAppIconForSize kind of changes the whole focus of the CL, so rewrote the CL ...
5 years, 1 month ago (2015-11-11 02:36:23 UTC) #19
Matt Giuca
On 2015/11/11 02:36:23, Matt Giuca wrote: > Removing GetAppIconForSize kind of changes the whole focus ...
5 years, 1 month ago (2015-11-12 03:55:03 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1408063012/140001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1408063012/140001
5 years, 1 month ago (2015-11-12 03:55:58 UTC) #23
Nico
yeah, still lgtm sorry about the latency, both Dana and I were at blinkon
5 years, 1 month ago (2015-11-12 04:30:53 UTC) #24
Matt Giuca
On 2015/11/12 04:30:53, Nico wrote: > yeah, still lgtm > > sorry about the latency, ...
5 years, 1 month ago (2015-11-12 04:32:27 UTC) #25
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_rel_ng on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_ng/builds/133909) win_chromium_x64_rel_ng on tryserver.chromium.win (JOB_FAILED, ...
5 years, 1 month ago (2015-11-12 04:38:30 UTC) #27
Matt Giuca
Blerg, I had to update some tests which I forgot to do before (when the ...
5 years, 1 month ago (2015-11-13 08:07:56 UTC) #28
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1408063012/160001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1408063012/160001
5 years, 1 month ago (2015-11-13 08:08:39 UTC) #31
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_x64_rel_ng on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_x64_rel_ng/builds/130343)
5 years, 1 month ago (2015-11-13 09:31:58 UTC) #33
danakj
On 2015/11/12 04:30:53, Nico wrote: > yeah, still lgtm > > sorry about the latency, ...
5 years, 1 month ago (2015-11-13 19:59:38 UTC) #34
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1408063012/180001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1408063012/180001
5 years, 1 month ago (2015-11-16 00:50:21 UTC) #36
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
5 years, 1 month ago (2015-11-16 01:33:08 UTC) #38
Matt Giuca
Hi Nico, Sorry to do this but would you be able to review the delta ...
5 years, 1 month ago (2015-11-16 03:13:46 UTC) #39
Nico
https://codereview.chromium.org/1408063012/diff/180001/chrome/browser/app_icon_win.cc File chrome/browser/app_icon_win.cc (right): https://codereview.chromium.org/1408063012/diff/180001/chrome/browser/app_icon_win.cc#newcode66 chrome/browser/app_icon_win.cc:66: // unit_tests.exe, that has the same resource IDs as ...
5 years, 1 month ago (2015-11-16 19:04:28 UTC) #40
Matt Giuca
https://codereview.chromium.org/1408063012/diff/180001/chrome/browser/app_icon_win.cc File chrome/browser/app_icon_win.cc (right): https://codereview.chromium.org/1408063012/diff/180001/chrome/browser/app_icon_win.cc#newcode66 chrome/browser/app_icon_win.cc:66: // unit_tests.exe, that has the same resource IDs as ...
5 years, 1 month ago (2015-11-17 07:11:45 UTC) #41
Nico
lgtm
5 years, 1 month ago (2015-11-17 07:28:26 UTC) #42
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1408063012/180001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1408063012/180001
5 years, 1 month ago (2015-11-18 00:24:48 UTC) #45
commit-bot: I haz the power
Committed patchset #7 (id:180001)
5 years, 1 month ago (2015-11-18 02:02:52 UTC) #46
commit-bot: I haz the power
5 years, 1 month ago (2015-11-18 02:04:00 UTC) #47
Message was sent while issue was closed.
Patchset 7 (id:??) landed as
https://crrev.com/3e9e69dc9fbd729e77c66bfbabf4c7416ee2ecf8
Cr-Commit-Position: refs/heads/master@{#360256}

Powered by Google App Engine
This is Rietveld 408576698