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

Unified Diff: chrome/browser/extensions/bookmark_app_helper.cc

Issue 289283004: Add ability to constrain dominant color selection to a HSL range. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/ui/webui/ntp/favicon_webui_handler.cc » ('j') | ui/gfx/color_analysis.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/bookmark_app_helper.cc
diff --git a/chrome/browser/extensions/bookmark_app_helper.cc b/chrome/browser/extensions/bookmark_app_helper.cc
index a44c002a1d22e2dee5d1f8573234960223eded56..b15c91d3cde84c1ca2fabe4424177147d57c9665 100644
--- a/chrome/browser/extensions/bookmark_app_helper.cc
+++ b/chrome/browser/extensions/bookmark_app_helper.cc
@@ -110,13 +110,9 @@ void BookmarkAppHelper::GenerateContainerIcon(std::map<int, SkBitmap>* bitmaps,
// Draw a rounded rect of the |base_icon|'s dominant color.
SkPaint color_strip_paint;
- color_utils::GridSampler sampler;
color_strip_paint.setFlags(SkPaint::kAntiAlias_Flag);
- color_strip_paint.setColor(color_utils::CalculateKMeanColorOfPNG(
- gfx::Image::CreateFrom1xBitmap(base_icon).As1xPNGBytes(),
- 100,
- 665,
- &sampler));
+ color_strip_paint.setColor(
+ color_utils::CalculateKMeanColorOfBitmap(base_icon));
color_strip_canvas->drawRoundRect(SkRect::MakeWH(output_size, output_size),
kBorderRadius,
kBorderRadius,
« no previous file with comments | « no previous file | chrome/browser/ui/webui/ntp/favicon_webui_handler.cc » ('j') | ui/gfx/color_analysis.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698