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

Unified Diff: chrome/browser/favicon/favicon_util.cc

Issue 16370006: Make the favicons look visually the same after refreshing (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed avi@'s comments Created 7 years, 6 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: chrome/browser/favicon/favicon_util.cc
diff --git a/chrome/browser/favicon/favicon_util.cc b/chrome/browser/favicon/favicon_util.cc
index df96a4709f28080fc9c4290eae74e5745773c58a..430d3decbbc1698feac33fa61ae523ee0acc37c6 100644
--- a/chrome/browser/favicon/favicon_util.cc
+++ b/chrome/browser/favicon/favicon_util.cc
@@ -16,6 +16,10 @@
#include "ui/gfx/image/image_skia.h"
#include "webkit/glue/image_decoder.h"
+#if defined(OS_MACOSX)
+#include "base/mac/mac_util.h"
+#endif
+
namespace {
// Creates image reps of DIP size |favicon_size| for the subset of
@@ -105,6 +109,13 @@ std::vector<ui::ScaleFactor> FaviconUtil::GetFaviconScaleFactors() {
}
// static
+void FaviconUtil::SetFaviconColorSpace(gfx::Image* image) {
+#if defined(OS_MACOSX)
+ image->SetSourceColorSpace(base::mac::GetSystemColorSpace());
+#endif // OS_MACOSX
+}
+
+// static
gfx::Image FaviconUtil::SelectFaviconFramesFromPNGs(
const std::vector<chrome::FaviconBitmapResult>& png_data,
const std::vector<ui::ScaleFactor>& scale_factors,

Powered by Google App Engine
This is Rietveld 408576698