summaryrefslogtreecommitdiffstats
path: root/components/favicon_base/select_favicon_frames.h
diff options
context:
space:
mode:
authoroshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-06-20 23:20:53 +0000
committeroshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-06-20 23:20:53 +0000
commitabe29e2ae1ad6d9bd8a7bfa23b3316a203d39ef2 (patch)
treea86028978d5e3258dfbf7040de93a4e1fb4be54b /components/favicon_base/select_favicon_frames.h
parent87ab8a7db8754aa193cc3b5aa4f7a77b439f2141 (diff)
downloadchromium_src-abe29e2ae1ad6d9bd8a7bfa23b3316a203d39ef2.zip
chromium_src-abe29e2ae1ad6d9bd8a7bfa23b3316a203d39ef2.tar.gz
chromium_src-abe29e2ae1ad6d9bd8a7bfa23b3316a203d39ef2.tar.bz2
Convert ui::ScaleFactor -> float in favicon/history code
First stop to fix favicon for fractional scale factor. I'll convert the rest of ui::ScaleFactor in 38 BUG=376367,381601 R=pkotwicz@chromium.org, sky@chromium.org Review URL: https://codereview.chromium.org/335233003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@278853 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'components/favicon_base/select_favicon_frames.h')
-rw-r--r--components/favicon_base/select_favicon_frames.h26
1 files changed, 12 insertions, 14 deletions
diff --git a/components/favicon_base/select_favicon_frames.h b/components/favicon_base/select_favicon_frames.h
index 34ffef3..9c1b80e 100644
--- a/components/favicon_base/select_favicon_frames.h
+++ b/components/favicon_base/select_favicon_frames.h
@@ -7,7 +7,7 @@
#include <vector>
-#include "ui/base/layout.h"
+#include "base/basictypes.h"
class SkBitmap;
@@ -22,24 +22,23 @@ extern const float kSelectFaviconFramesInvalidScore;
// Takes a list of all bitmaps found in a .ico file, and creates an
// ImageSkia that's |desired_size_in_dip| x |desired_size_in_dip| big. This
-// function adds a representation at every desired scale factor.
+// function adds a representation at every entry in |favicon_scales|.
// If |desired_size_in_dip| is 0, the largest bitmap is returned unmodified.
// |original_sizes| are the original sizes of the bitmaps. (For instance,
// WebContents::DownloadImage() does resampling if it is passed a max size.)
// If score is non-NULL, it receives a score between 0 (bad) and 1 (good)
// that describes how well |bitmaps| were able to produce an image at
-// |desired_size_in_dip| for |scale_factors|.
+// |desired_size_in_dip| for |favicon_scales|.
// The score is arbitrary, but it's best for exact size matches,
// and gets worse the more resampling needs to happen.
// If the resampling algorithm is modified, the resampling done in
// FaviconUtil::SelectFaviconFramesFromPNGs() should probably be modified too as
// it inspired by this method.
-gfx::ImageSkia SelectFaviconFrames(
- const std::vector<SkBitmap>& bitmaps,
- const std::vector<gfx::Size>& original_sizes,
- const std::vector<ui::ScaleFactor>& scale_factors,
- int desired_size_in_dip,
- float* score);
+gfx::ImageSkia SelectFaviconFrames(const std::vector<SkBitmap>& bitmaps,
+ const std::vector<gfx::Size>& original_sizes,
+ const std::vector<float>& favicon_scales,
+ int desired_size_in_dip,
+ float* score);
// Takes a list of the pixel sizes of a favicon's favicon bitmaps and returns
// the indices of the best sizes to use to create an ImageSkia with
@@ -53,10 +52,9 @@ gfx::ImageSkia SelectFaviconFrames(
// that the index of the largest size is requested.
// TODO(pkotwicz): Remove callers of this method for which |frame_pixel_sizes|
// are the sizes of the favicon bitmaps after they were resized.
-void SelectFaviconFrameIndices(
- const std::vector<gfx::Size>& frame_pixel_sizes,
- const std::vector<int>& desired_sizes,
- std::vector<size_t>* best_indices,
- float* score);
+void SelectFaviconFrameIndices(const std::vector<gfx::Size>& frame_pixel_sizes,
+ const std::vector<int>& desired_sizes,
+ std::vector<size_t>* best_indices,
+ float* score);
#endif // COMPONENTS_FAVICON_BASE_SELECT_FAVICON_FRAMES_H_