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

Issue 1424913007: Added ImageFamily::CreateExact, which scales the best image to size. (Closed)

Created:
5 years, 1 month ago by Matt Giuca
Modified:
5 years, 1 month ago
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

Added ImageFamily::CreateExact, which scales the best image to size. Updated clients that were doing manual scaling to use CreateExact. BUG=551256 Committed: https://crrev.com/9bc56d60a64a0fff461d25ac479606a7b32a148c Cr-Commit-Position: refs/heads/master@{#358744}

Patch Set 1 #

Patch Set 2 : Exit early if possible. #

Patch Set 3 : Added test for CreateExact on an non-N32 bitmap. #

Total comments: 13

Patch Set 4 : Add extra test and nullcheck. #

Patch Set 5 : IconUtil: Fix behaviour if wrong pixel format. #

Patch Set 6 : Rename bigger_than_medium to has_bigger_than_medium. #

Patch Set 7 : IconUtil: Rewrite comment. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+126 lines, -50 lines) Patch
M chrome/browser/ui/views/create_application_shortcut_view.cc View 1 chunk +5 lines, -18 lines 0 comments Download
M ui/gfx/icon_util.cc View 1 2 3 4 5 6 1 chunk +25 lines, -31 lines 0 comments Download
M ui/gfx/image/image_family.h View 1 chunk +11 lines, -0 lines 0 comments Download
M ui/gfx/image/image_family.cc View 1 2 chunks +23 lines, -0 lines 0 comments Download
M ui/gfx/image/image_family_unittest.cc View 1 2 3 4 chunks +62 lines, -1 line 0 comments Download

Messages

Total messages: 14 (3 generated)
Matt Giuca
rsesek: image_family pkasting: create_application_shortcut_views danakj: icon_util Thanks. Rationale: This seems like a common pattern (GetBest, ...
5 years, 1 month ago (2015-11-05 02:49:54 UTC) #2
Peter Kasting
LGTM https://codereview.chromium.org/1424913007/diff/40001/ui/gfx/image/image_family.h File ui/gfx/image/image_family.h (right): https://codereview.chromium.org/1424913007/diff/40001/ui/gfx/image/image_family.h#newcode148 ui/gfx/image/image_family.h:148: gfx::Image CreateExact(const gfx::Size& size) const; Does anyone call ...
5 years, 1 month ago (2015-11-05 05:49:27 UTC) #3
Matt Giuca
https://codereview.chromium.org/1424913007/diff/40001/ui/gfx/image/image_family.h File ui/gfx/image/image_family.h (right): https://codereview.chromium.org/1424913007/diff/40001/ui/gfx/image/image_family.h#newcode148 ui/gfx/image/image_family.h:148: gfx::Image CreateExact(const gfx::Size& size) const; On 2015/11/05 05:49:27, Peter ...
5 years, 1 month ago (2015-11-05 06:22:50 UTC) #4
Peter Kasting
https://codereview.chromium.org/1424913007/diff/40001/ui/gfx/image/image_family.h File ui/gfx/image/image_family.h (right): https://codereview.chromium.org/1424913007/diff/40001/ui/gfx/image/image_family.h#newcode148 ui/gfx/image/image_family.h:148: gfx::Image CreateExact(const gfx::Size& size) const; On 2015/11/05 06:22:50, Matt ...
5 years, 1 month ago (2015-11-05 06:24:57 UTC) #5
Robert Sesek
LGTM https://codereview.chromium.org/1424913007/diff/40001/ui/gfx/image/image_family.h File ui/gfx/image/image_family.h (right): https://codereview.chromium.org/1424913007/diff/40001/ui/gfx/image/image_family.h#newcode148 ui/gfx/image/image_family.h:148: gfx::Image CreateExact(const gfx::Size& size) const; On 2015/11/05 06:24:57, ...
5 years, 1 month ago (2015-11-05 16:05:56 UTC) #6
danakj
https://codereview.chromium.org/1424913007/diff/40001/ui/gfx/icon_util.cc File ui/gfx/icon_util.cc (left): https://codereview.chromium.org/1424913007/diff/40001/ui/gfx/icon_util.cc#oldcode61 ui/gfx/icon_util.cc:61: // Optimize for the "Large icons" view in Windows ...
5 years, 1 month ago (2015-11-05 19:03:10 UTC) #7
Matt Giuca
https://codereview.chromium.org/1424913007/diff/40001/ui/gfx/icon_util.cc File ui/gfx/icon_util.cc (left): https://codereview.chromium.org/1424913007/diff/40001/ui/gfx/icon_util.cc#oldcode61 ui/gfx/icon_util.cc:61: // Optimize for the "Large icons" view in Windows ...
5 years, 1 month ago (2015-11-06 04:15:18 UTC) #8
danakj
LGTM thanks
5 years, 1 month ago (2015-11-09 23:49:26 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1424913007/120001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1424913007/120001
5 years, 1 month ago (2015-11-10 00:07:59 UTC) #12
commit-bot: I haz the power
Committed patchset #7 (id:120001)
5 years, 1 month ago (2015-11-10 01:58:18 UTC) #13
commit-bot: I haz the power
5 years, 1 month ago (2015-11-10 01:59:09 UTC) #14
Message was sent while issue was closed.
Patchset 7 (id:??) landed as
https://crrev.com/9bc56d60a64a0fff461d25ac479606a7b32a148c
Cr-Commit-Position: refs/heads/master@{#358744}

Powered by Google App Engine
This is Rietveld 408576698