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

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: 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
« no previous file with comments | « chrome/browser/favicon/favicon_util.h ('k') | ui/gfx/image/image.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..70a2dbe5fdacfd3972a2322a4826643c37f633fb 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) && !defined(OS_IOS)
+#include "base/mac/mac_util.h"
+#endif // defined(OS_MACOSX) && !defined(OS_IOS)
+
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) && !defined(OS_IOS)
+ image->SetSourceColorSpace(base::mac::GetSystemColorSpace());
+#endif // defined(OS_MACOSX) && !defined(OS_IOS)
+}
+
+// static
gfx::Image FaviconUtil::SelectFaviconFramesFromPNGs(
const std::vector<chrome::FaviconBitmapResult>& png_data,
const std::vector<ui::ScaleFactor>& scale_factors,
« no previous file with comments | « chrome/browser/favicon/favicon_util.h ('k') | ui/gfx/image/image.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698