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

Issue 1214693005: Introduce some util code for drawing vector assets. (Closed)

Created:
5 years, 5 months ago by Evan Stade
Modified:
5 years, 5 months ago
CC:
chromium-reviews, tfarina, oshima+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Introduce some util code for drawing vector assets. Replace a couple icons with vector versions (check_circle and photo_camera). The end result for the camera icon is pixel identical, although the vertical alignment is slightly different. I believe the new vertical alignment is correct (it aligns the center of the camera lens with the center of the user profile photo, instead of ~4px below), so I'm leaving that change in. The end result for the checkmark icon is pixel identical. BUG=505953 TBR=thestig@chromium.org Committed: https://crrev.com/33b823af3e63287dbe850c253ae97593411d4f43 Cr-Commit-Position: refs/heads/master@{#337893}

Patch Set 1 #

Patch Set 2 : . #

Total comments: 15

Patch Set 3 : sky review #

Total comments: 31

Patch Set 4 : pksating review #

Patch Set 5 : remove constexpr (msvc doesn't support it yet) #

Patch Set 6 : fix compile and rebase #

Total comments: 9

Patch Set 7 : sadrul review #

Total comments: 2

Patch Set 8 : compile? #

Unified diffs Side-by-side diffs Delta from patch set Stats (+313 lines, -40 lines) Patch
M chrome/app/theme/theme_resources.grd View 1 chunk +3 lines, -1 line 0 comments Download
A chrome/browser/resources/help/check_circle.svg View 1 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/browser/resources/help/help_content.css View 1 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/resources_util_unittest.cc View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/views/profiles/profile_chooser_view.cc View 1 2 3 4 5 1 chunk +3 lines, -2 lines 0 comments Download
M ui/gfx/BUILD.gn View 1 2 3 4 5 2 chunks +10 lines, -0 lines 0 comments Download
M ui/gfx/gfx.gyp View 1 2 3 4 5 2 chunks +4 lines, -0 lines 0 comments Download
A ui/gfx/vector_icons.h View 1 2 3 4 5 6 1 chunk +33 lines, -0 lines 0 comments Download
A ui/gfx/vector_icons.cc View 1 2 3 4 5 6 7 1 chunk +199 lines, -0 lines 0 comments Download
D ui/resources/default_100_percent/common/checkmark.png View 1 Binary file 0 comments Download
D ui/resources/default_200_percent/common/checkmark.png View 1 Binary file 0 comments Download
M ui/resources/ui_resources.grd View 1 1 chunk +0 lines, -1 line 0 comments Download
M ui/views/controls/image_view.h View 1 2 3 4 chunks +18 lines, -5 lines 0 comments Download
M ui/views/controls/image_view.cc View 1 2 3 4 5 6 5 chunks +21 lines, -9 lines 0 comments Download
M ui/views/controls/throbber.h View 2 chunks +0 lines, -7 lines 0 comments Download
M ui/views/controls/throbber.cc View 1 2 3 4 5 6 3 chunks +16 lines, -13 lines 0 comments Download

Messages

Total messages: 37 (8 generated)
Evan Stade
What do you guys think of this approach? The reason for the kooky code in ...
5 years, 5 months ago (2015-06-30 23:03:40 UTC) #2
sky
This seems fine to me. https://codereview.chromium.org/1214693005/diff/20001/ui/gfx/vector_icons.cc File ui/gfx/vector_icons.cc (right): https://codereview.chromium.org/1214693005/diff/20001/ui/gfx/vector_icons.cc#newcode43 ui/gfx/vector_icons.cc:43: static PathElement path[] = ...
5 years, 5 months ago (2015-07-01 16:19:52 UTC) #3
sky
https://codereview.chromium.org/1214693005/diff/20001/ui/views/controls/image_view.h File ui/views/controls/image_view.h (right): https://codereview.chromium.org/1214693005/diff/20001/ui/views/controls/image_view.h#newcode59 ui/views/controls/image_view.h:59: void SetVectorIcon(gfx::VectorIconId id, SkColor color); Maybe this should take ...
5 years, 5 months ago (2015-07-01 16:42:35 UTC) #4
Evan Stade
https://codereview.chromium.org/1214693005/diff/20001/ui/gfx/vector_icons.cc File ui/gfx/vector_icons.cc (right): https://codereview.chromium.org/1214693005/diff/20001/ui/gfx/vector_icons.cc#newcode43 ui/gfx/vector_icons.cc:43: static PathElement path[] = { On 2015/07/01 16:19:52, sky ...
5 years, 5 months ago (2015-07-01 21:52:59 UTC) #5
sky
https://codereview.chromium.org/1214693005/diff/20001/ui/gfx/vector_icons.cc File ui/gfx/vector_icons.cc (right): https://codereview.chromium.org/1214693005/diff/20001/ui/gfx/vector_icons.cc#newcode43 ui/gfx/vector_icons.cc:43: static PathElement path[] = { On 2015/07/01 21:52:58, Evan ...
5 years, 5 months ago (2015-07-01 22:00:56 UTC) #6
Peter Kasting
https://codereview.chromium.org/1214693005/diff/40001/ui/gfx/vector_icons.cc File ui/gfx/vector_icons.cc (right): https://codereview.chromium.org/1214693005/diff/40001/ui/gfx/vector_icons.cc#newcode32 ui/gfx/vector_icons.cc:32: PathElement(SkScalar arg) { this->arg = arg; } Nit: explicit? ...
5 years, 5 months ago (2015-07-01 22:26:58 UTC) #7
tfarina
https://codereview.chromium.org/1214693005/diff/40001/ui/gfx/vector_icons.cc File ui/gfx/vector_icons.cc (right): https://codereview.chromium.org/1214693005/diff/40001/ui/gfx/vector_icons.cc#newcode13 ui/gfx/vector_icons.cc:13: const SkScalar reference_size = 48.0; kReferenceSize?
5 years, 5 months ago (2015-07-01 22:57:52 UTC) #8
Evan Stade
https://codereview.chromium.org/1214693005/diff/20001/ui/gfx/vector_icons.cc File ui/gfx/vector_icons.cc (right): https://codereview.chromium.org/1214693005/diff/20001/ui/gfx/vector_icons.cc#newcode43 ui/gfx/vector_icons.cc:43: static PathElement path[] = { On 2015/07/01 22:00:55, sky ...
5 years, 5 months ago (2015-07-02 00:08:06 UTC) #9
Peter Kasting
https://codereview.chromium.org/1214693005/diff/40001/ui/gfx/vector_icons.cc File ui/gfx/vector_icons.cc (right): https://codereview.chromium.org/1214693005/diff/40001/ui/gfx/vector_icons.cc#newcode44 ui/gfx/vector_icons.cc:44: CIRCLE, 24, 24, 20, On 2015/07/02 00:08:05, Evan Stade ...
5 years, 5 months ago (2015-07-02 00:23:53 UTC) #10
Evan Stade
https://codereview.chromium.org/1214693005/diff/20001/ui/gfx/vector_icons.cc File ui/gfx/vector_icons.cc (right): https://codereview.chromium.org/1214693005/diff/20001/ui/gfx/vector_icons.cc#newcode43 ui/gfx/vector_icons.cc:43: static PathElement path[] = { On 2015/07/02 00:08:05, Evan ...
5 years, 5 months ago (2015-07-02 00:58:24 UTC) #11
Peter Kasting
https://codereview.chromium.org/1214693005/diff/40001/ui/gfx/vector_icons.cc File ui/gfx/vector_icons.cc (right): https://codereview.chromium.org/1214693005/diff/40001/ui/gfx/vector_icons.cc#newcode44 ui/gfx/vector_icons.cc:44: CIRCLE, 24, 24, 20, On 2015/07/02 00:58:24, Evan Stade ...
5 years, 5 months ago (2015-07-02 08:06:11 UTC) #12
Peter Kasting
Whatever, I'm tired, land it however you want, LGTM
5 years, 5 months ago (2015-07-02 08:11:55 UTC) #13
Evan Stade
https://codereview.chromium.org/1214693005/diff/40001/ui/gfx/vector_icons.cc File ui/gfx/vector_icons.cc (right): https://codereview.chromium.org/1214693005/diff/40001/ui/gfx/vector_icons.cc#newcode44 ui/gfx/vector_icons.cc:44: CIRCLE, 24, 24, 20, On 2015/07/02 08:06:11, Peter Kasting ...
5 years, 5 months ago (2015-07-06 18:36:00 UTC) #14
Peter Kasting
On 2015/07/06 18:36:00, Evan Stade wrote: > Since you said "I suppose that could wait ...
5 years, 5 months ago (2015-07-06 22:44:30 UTC) #15
Evan Stade
+sadrul for views/ as sky is ooo
5 years, 5 months ago (2015-07-06 23:42:55 UTC) #17
sadrul
https://codereview.chromium.org/1214693005/diff/100001/ui/gfx/vector_icons.cc File ui/gfx/vector_icons.cc (right): https://codereview.chromium.org/1214693005/diff/100001/ui/gfx/vector_icons.cc#newcode38 ui/gfx/vector_icons.cc:38: }; Would it make sense for PathElement to have ...
5 years, 5 months ago (2015-07-07 04:18:11 UTC) #18
Peter Kasting
https://codereview.chromium.org/1214693005/diff/100001/ui/gfx/vector_icons.cc File ui/gfx/vector_icons.cc (right): https://codereview.chromium.org/1214693005/diff/100001/ui/gfx/vector_icons.cc#newcode38 ui/gfx/vector_icons.cc:38: }; On 2015/07/07 04:18:11, sadrul wrote: > Would it ...
5 years, 5 months ago (2015-07-07 04:55:17 UTC) #19
Evan Stade
https://codereview.chromium.org/1214693005/diff/100001/ui/gfx/vector_icons.cc File ui/gfx/vector_icons.cc (right): https://codereview.chromium.org/1214693005/diff/100001/ui/gfx/vector_icons.cc#newcode133 ui/gfx/vector_icons.cc:133: path.getLastPt(&last_point); On 2015/07/07 04:18:11, sadrul wrote: > DCHECK that ...
5 years, 5 months ago (2015-07-07 16:47:51 UTC) #20
Evan Stade
5 years, 5 months ago (2015-07-07 16:47:51 UTC) #21
Evan Stade
https://codereview.chromium.org/1214693005/diff/100001/ui/views/controls/image_view.cc File ui/views/controls/image_view.cc (right): https://codereview.chromium.org/1214693005/diff/100001/ui/views/controls/image_view.cc#newcode34 ui/views/controls/image_view.cc:34: vector_id_(gfx::VectorIconId::VECTOR_ICON_NONE), On 2015/07/07 04:18:11, sadrul wrote: > Initialize color ...
5 years, 5 months ago (2015-07-07 17:55:04 UTC) #22
sadrul
lgtm (The test failures look relevant, btw) https://codereview.chromium.org/1214693005/diff/120001/ui/views/controls/image_view.cc File ui/views/controls/image_view.cc (right): https://codereview.chromium.org/1214693005/diff/120001/ui/views/controls/image_view.cc#newcode35 ui/views/controls/image_view.cc:35: vector_color_(SK_ColorGREEN), Hm, ...
5 years, 5 months ago (2015-07-07 21:45:04 UTC) #23
Evan Stade
https://codereview.chromium.org/1214693005/diff/120001/ui/views/controls/image_view.cc File ui/views/controls/image_view.cc (right): https://codereview.chromium.org/1214693005/diff/120001/ui/views/controls/image_view.cc#newcode35 ui/views/controls/image_view.cc:35: vector_color_(SK_ColorGREEN), On 2015/07/07 21:45:04, sadrul wrote: > Hm, are ...
5 years, 5 months ago (2015-07-07 22:30:31 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1214693005/140001
5 years, 5 months ago (2015-07-08 19:56:17 UTC) #27
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/77130)
5 years, 5 months ago (2015-07-08 20:05:19 UTC) #29
Evan Stade
TBR thestig for: chrome/app/theme/theme_resources.grd chrome/browser/resources_util_unittest.cc
5 years, 5 months ago (2015-07-08 20:09:14 UTC) #31
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1214693005/140001
5 years, 5 months ago (2015-07-08 20:10:38 UTC) #33
commit-bot: I haz the power
Committed patchset #8 (id:140001)
5 years, 5 months ago (2015-07-08 20:17:13 UTC) #34
commit-bot: I haz the power
Patchset 8 (id:??) landed as https://crrev.com/33b823af3e63287dbe850c253ae97593411d4f43 Cr-Commit-Position: refs/heads/master@{#337893}
5 years, 5 months ago (2015-07-08 20:18:04 UTC) #35
Mattias Nissler (ping if slow)
5 years, 5 months ago (2015-07-09 09:37:01 UTC) #37
Message was sent while issue was closed.
I've landed a speculative revert to see whether this CL caused Mac bot breakage:
https://codereview.chromium.org/1228923002/

There's another suspect for the breakage here though:
https://codereview.chromium.org/1212443005

Will revert the revert if it doesn't improve things.

Powered by Google App Engine
This is Rietveld 408576698