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

Unified Diff: components/enhanced_bookmarks/image_store_util.h

Issue 875463003: ★ Record the image dominant color in the image database. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix GN Created 5 years, 11 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
Index: components/enhanced_bookmarks/image_store_util.h
diff --git a/components/enhanced_bookmarks/image_store_util.h b/components/enhanced_bookmarks/image_store_util.h
index 0b9ecaf1afcf73554e2b80ff6cbccdd10e697d91..8537197e31a846eda9bfeb151e4f0a2247355637 100644
--- a/components/enhanced_bookmarks/image_store_util.h
+++ b/components/enhanced_bookmarks/image_store_util.h
@@ -6,6 +6,7 @@
#define COMPONENTS_ENHANCED_BOOKMARKS_IMAGE_STORE_UTIL_H_
#include "base/memory/ref_counted_memory.h"
+#include "third_party/skia/include/core/SkColor.h"
#include "ui/gfx/geometry/size.h"
#include "ui/gfx/image/image.h"
@@ -22,6 +23,9 @@ scoped_refptr<base::RefCountedMemory> BytesForImage(const gfx::Image& image);
// returns a gfx::Image. If decoding fails, returns an empty image.
gfx::Image ImageForBytes(const scoped_refptr<base::RefCountedMemory>& data);
+// Returns the dominant color for |image|. This method can be slow on very large
+// images.
+SkColor DominantColorForImage(const gfx::Image& image);
}
#endif // COMPONENTS_ENHANCED_BOOKMARKS_IMAGE_STORE_UTIL_H_
« no previous file with comments | « components/enhanced_bookmarks/image_store_unittest.cc ('k') | components/enhanced_bookmarks/image_store_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698