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

Issue 2943333003: Extracting more than one wallpaper prominent color (Closed)

Created:
3 years, 6 months ago by Qiang(Joe) Xu
Modified:
3 years, 6 months ago
CC:
chromium-reviews, kalyank, sadrul
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Extracting more than one wallpaper prominent color Changes: This is basically a refactor of code to support more than one wallpaper prominent color extracting. (1) group LumaRange and SaturationRange to ColorProfile, and a vector of color_profiles are passed as parameter for calculation. (2) updated UMA for Ash.Wallpaper.ColorExtractionResult to enumeration. R=xdai@chromium.org, bruthig@chromium.org, estade@chromium.org, danakj@chromium.org, isherman@chromium.org, jamescook@chromium.org BUG=734761 TEST=covered by tests Review-Url: https://codereview.chromium.org/2943333003 Cr-Commit-Position: refs/heads/master@{#481667} Committed: https://chromium.googlesource.com/chromium/src/+/31e3bc75709ac8c54da431bee36fcec5b4d432c5

Patch Set 1 #

Total comments: 6

Patch Set 2 : rebase #

Patch Set 3 : mostly on CalculateProminentColor suggestion #

Patch Set 4 : UMA #

Total comments: 18

Patch Set 5 : feedback from ps4 #

Total comments: 17

Patch Set 6 : feedback from xdai/bruthig/isherman #

Patch Set 7 : rebase #

Patch Set 8 : possible uninitialized local value #

Unified diffs Side-by-side diffs Delta from patch set Stats (+457 lines, -228 lines) Patch
M ash/shelf/shelf_background_animator.cc View 1 2 3 4 5 2 chunks +39 lines, -3 lines 0 comments Download
M ash/wallpaper/wallpaper_controller.h View 1 2 3 4 5 6 chunks +18 lines, -12 lines 0 comments Download
M ash/wallpaper/wallpaper_controller.cc View 1 2 3 4 5 8 chunks +79 lines, -37 lines 0 comments Download
M chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager.h View 1 2 3 4 1 chunk +4 lines, -1 line 0 comments Download
M chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager.cc View 1 2 3 4 5 3 chunks +9 lines, -3 lines 0 comments Download
M components/wallpaper/BUILD.gn View 1 2 3 2 chunks +2 lines, -0 lines 0 comments Download
M components/wallpaper/wallpaper_color_calculator.h View 1 2 3 4 3 chunks +19 lines, -18 lines 0 comments Download
M components/wallpaper/wallpaper_color_calculator.cc View 1 2 3 4 5 6 7 5 chunks +70 lines, -25 lines 0 comments Download
M components/wallpaper/wallpaper_color_calculator_unittest.cc View 1 2 3 4 5 7 chunks +36 lines, -24 lines 0 comments Download
A components/wallpaper/wallpaper_color_extraction_result.h View 1 2 3 4 5 1 chunk +45 lines, -0 lines 0 comments Download
M tools/metrics/histograms/enums.xml View 1 2 3 4 5 6 1 chunk +15 lines, -0 lines 0 comments Download
M tools/metrics/histograms/histograms.xml View 1 2 3 4 5 6 3 chunks +15 lines, -2 lines 0 comments Download
M ui/gfx/color_analysis.h View 1 2 3 4 1 chunk +15 lines, -8 lines 0 comments Download
M ui/gfx/color_analysis.cc View 1 2 3 4 5 5 chunks +72 lines, -64 lines 0 comments Download
M ui/gfx/color_analysis_unittest.cc View 1 2 3 4 4 chunks +19 lines, -31 lines 0 comments Download

Messages

Total messages: 39 (18 generated)
Qiang(Joe) Xu
Hi all, would you mind take a look at this CL first? I would also ...
3 years, 6 months ago (2017-06-19 22:51:30 UTC) #1
bruthig
+estade@ for guidance on color_analysis.* I've posted my suggestions for UMA on the crbug Issue. ...
3 years, 6 months ago (2017-06-20 15:32:15 UTC) #3
Evan Stade
https://codereview.chromium.org/2943333003/diff/1/ash/shelf/shelf_background_animator.cc File ash/shelf/shelf_background_animator.cc (right): https://codereview.chromium.org/2943333003/diff/1/ash/shelf/shelf_background_animator.cc#newcode219 ash/shelf/shelf_background_animator.cc:219: wallpaper_controller_->GetShelfColorProfileIndex()) seems like the shelf color profile index should ...
3 years, 6 months ago (2017-06-20 17:11:08 UTC) #4
Qiang(Joe) Xu
Thanks, I think it is ready for a full review. xdai, bruthig for wallpaper/ review ...
3 years, 6 months ago (2017-06-20 22:48:55 UTC) #15
James Cook
What is the performance of the new color extraction code relative to the old code?
3 years, 6 months ago (2017-06-20 22:53:37 UTC) #16
Qiang(Joe) Xu
On 2017/06/20 22:53:37, James Cook wrote: > What is the performance of the new color ...
3 years, 6 months ago (2017-06-20 22:58:01 UTC) #17
Ilya Sherman
https://codereview.chromium.org/2943333003/diff/60001/components/wallpaper/wallpaper_color_calculator.cc File components/wallpaper/wallpaper_color_calculator.cc (right): https://codereview.chromium.org/2943333003/diff/60001/components/wallpaper/wallpaper_color_calculator.cc#newcode92 components/wallpaper/wallpaper_color_calculator.cc:92: NUM_COLOR_EXTRACTION_RESULTS); Please move the histogram macro invocation out of ...
3 years, 6 months ago (2017-06-20 23:00:00 UTC) #18
Evan Stade
lgtm with nits https://codereview.chromium.org/2943333003/diff/60001/ui/gfx/color_analysis.cc File ui/gfx/color_analysis.cc (right): https://codereview.chromium.org/2943333003/diff/60001/ui/gfx/color_analysis.cc#newcode399 ui/gfx/color_analysis.cc:399: return std::vector<SkColor>(goals.size(), SK_ColorTRANSPARENT); nit: maybe put ...
3 years, 6 months ago (2017-06-20 23:07:53 UTC) #19
danakj
LGTM % estade https://codereview.chromium.org/2943333003/diff/60001/ui/gfx/color_analysis.cc File ui/gfx/color_analysis.cc (right): https://codereview.chromium.org/2943333003/diff/60001/ui/gfx/color_analysis.cc#newcode737 ui/gfx/color_analysis.cc:737: std::vector<HSL> lower_bounds(size, {-1}); 3 mallocs per ...
3 years, 6 months ago (2017-06-20 23:22:03 UTC) #20
Qiang(Joe) Xu
feedback from ps4 is addressed, PTAL thanks https://codereview.chromium.org/2943333003/diff/60001/components/wallpaper/wallpaper_color_calculator.cc File components/wallpaper/wallpaper_color_calculator.cc (right): https://codereview.chromium.org/2943333003/diff/60001/components/wallpaper/wallpaper_color_calculator.cc#newcode92 components/wallpaper/wallpaper_color_calculator.cc:92: NUM_COLOR_EXTRACTION_RESULTS); On ...
3 years, 6 months ago (2017-06-21 01:10:53 UTC) #21
bruthig
https://codereview.chromium.org/2943333003/diff/80001/ash/wallpaper/wallpaper_controller.cc File ash/wallpaper/wallpaper_controller.cc (right): https://codereview.chromium.org/2943333003/diff/80001/ash/wallpaper/wallpaper_controller.cc#newcode420 ash/wallpaper/wallpaper_controller.cc:420: !image.isNull(); nitty-nit-nit: This could return false if color_profiles_.empty(). https://codereview.chromium.org/2943333003/diff/80001/ash/wallpaper/wallpaper_controller.h ...
3 years, 6 months ago (2017-06-21 15:54:17 UTC) #22
xdai1
lgtm with nits https://codereview.chromium.org/2943333003/diff/80001/ash/wallpaper/wallpaper_controller.h File ash/wallpaper/wallpaper_controller.h (right): https://codereview.chromium.org/2943333003/diff/80001/ash/wallpaper/wallpaper_controller.h#newcode72 ash/wallpaper/wallpaper_controller.h:72: static const SkColor kInvalidColor; I think ...
3 years, 6 months ago (2017-06-21 16:29:30 UTC) #23
Ilya Sherman
Metrics LGTM % comments: https://codereview.chromium.org/2943333003/diff/80001/tools/metrics/histograms/histograms.xml File tools/metrics/histograms/histograms.xml (right): https://codereview.chromium.org/2943333003/diff/80001/tools/metrics/histograms/histograms.xml#newcode2559 tools/metrics/histograms/histograms.xml:2559: +<histogram name="Ash.Wallpaper.ColorExtractionResultEnum" Optional nit: I'd ...
3 years, 6 months ago (2017-06-21 17:07:52 UTC) #24
James Cook
ash LGTM but please resolve xdai and bruthig comments before landing.
3 years, 6 months ago (2017-06-21 18:05:08 UTC) #25
Qiang(Joe) Xu
feedback from ps5 is addressed. xdai/bruthig/isherman, you might want to take another look. Thanks! https://codereview.chromium.org/2943333003/diff/80001/ash/wallpaper/wallpaper_controller.cc ...
3 years, 6 months ago (2017-06-21 22:35:27 UTC) #26
bruthig
lgtm https://codereview.chromium.org/2943333003/diff/80001/ash/wallpaper/wallpaper_controller.h File ash/wallpaper/wallpaper_controller.h (right): https://codereview.chromium.org/2943333003/diff/80001/ash/wallpaper/wallpaper_controller.h#newcode88 ash/wallpaper/wallpaper_controller.h:88: WallpaperController::ColorProfileIndex GetColorProfileIndex( On 2017/06/21 22:35:27, Qiang(Joe) Xu wrote: ...
3 years, 6 months ago (2017-06-22 15:31:09 UTC) #27
xdai1
still lgtm
3 years, 6 months ago (2017-06-22 16:50:42 UTC) #28
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/2943333003/120001
3 years, 6 months ago (2017-06-22 17:20:05 UTC) #31
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_x64_rel_ng on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_x64_rel_ng/builds/455431)
3 years, 6 months ago (2017-06-22 18:12:39 UTC) #33
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/2943333003/140001
3 years, 6 months ago (2017-06-22 20:18:50 UTC) #36
commit-bot: I haz the power
3 years, 6 months ago (2017-06-22 21:25:19 UTC) #39
Message was sent while issue was closed.
Committed patchset #8 (id:140001) as
https://chromium.googlesource.com/chromium/src/+/31e3bc75709ac8c54da431bee36f...

Powered by Google App Engine
This is Rietveld 408576698